Currently, our applications are running on Websphere Community Edition 6, which internally uses the Geronimo application server.
Due to increased demand of our applications, we are evaluating the migration to Websphere Application Server 8.5. However, we are having several issues with the classloader. In case some of our libraries need to be performed without interference from the application server.
In geronimo, we get this effect by changing the file geronimo.xml and including in it all packages that we did not want interference by hidden-class tag.
Example:
<hidden-classes>
<filter>org.apache.commons.logging</filter>
<filter>org.apache.log4j</filter>
<filter>org.apache.axiom</filter>
<filter>org.apache.axis2</filter>
<filter>org.apache.commons.beanutils</filter>
<filter>org.apache.struts</filter>
<filter>org.directwebremoting</filter>
<filter>com.thoughtworks</filter>
</hidden-classes>
Is there an equivalent mechanism in Websphere Application Server 8.5? We tried to use the policy "parent last" for class loading but some things did not work as expected (using our version of xerces, for example).
Related
At the moment, I'm developing a java web application locally(localhost) on Windows, using Tomcat 8.5 .
Unofortunately, I have no developing enviroment, so I have to do everything locally and then deploy to production via .WAR .
The issue is that the production application server (Linux RedHat) is running on websphere, if I generate the .WAR on tomcat, Will I have any problems to run it on WebSphere? Should I change anything in my code or web xml?
My system does nothing fancy, no hibernate, no spring, just a very classic mvc web application.
Thanks in advance
In general you shouldn't have to make any changes, but there are some differences between the two environments that could cause issues.
IBM provides a tool that will analyze your application and suggest changes that may need to be made. You can find more information here: https://www.ibm.com/developerworks/library/mw-1701-was-migration/index.html
I maintain a server client system build upon JBoss Remoting library version 2.5.0.SP2. The system consists a modular client, a central server which runs as registry/router and specialized servers which contains the application logic, database access, etc.
For the communication it implements java.lang.reflect.InvocationHandler with a java.lang.reflect.Proxy object on the client side (internally uses org.jboss.remoting.Client and org.jboss.remoting.InvokerLocator) and uses org.jboss.remoting.transport.Connector on the server side to publish the application logic.
The whole system is around 7 years old and it should be modernized, because some components got incompatible with JRE 7 and 8, like JBoss Serialization, and on the security side it lacks for the support of authentication.
I found out that JBoss Remoting is actively developed and updated to version 5, but it seems that there is no documentation about it since version 3. The developers of JBoss Remoting say April 2016 about the missing documentation in a issue on github:
[...] it has grown into a very internal project, used to underpin several of our services but generally hidden from users.
I used a sample client and server and updated it to run with JBoss Remoting 5.0.6 to check if it runs (gist with the source). I noticed while developing that the org.jboss.remoting.Client is gone and I didn't find inside JBoss Remoting anymore.
The developers of JBoss Remoting mentioned that it's possible to implement RCP over it (see quote above). I figured out that JBoss Remoting is part of the WildFly application server which uses it.
Is it possible to implement RPC like JBoss Remoting version 2 without using the whole WildFly application server (using EJB)? If yes, how?
If not, is there a good alternative for it?
After fighting passwords on Glassfish 4.x remotely on Ubuntu 14.04 Tahr, I'm ready to proceed to installing my first remote EJB module -- just want make sure I'm on the right path. Going from the Netbeans example Creating and Running an Application Client on the GlassFish Server, How would I make a client for the EJB module which is deployed remotely?
The Netbeans example assumes that Glassfish is running on the localhost. The exact mechanics are unclear to me, as it's not explicitly configured for localhost. Presumably it's implicitly configured for localhost...
I would like to use the ACC to connect to, not a local, but rather a remote Glassfish server. For context, the ACC is:
Introducing the Application Client Container
The Application Client Container (ACC) includes a set of Java classes,
libraries, and other files that are required for and distributed with
Java client programs that execute in their own Java Virtual Machine
(JVM). The ACC manages the execution of Java EE application client
components (application clients), which are used to access a variety
of Java EE services (such as JMS resources, EJB components, web
services, security, and so on.) from a JVM outside the Oracle
GlassFish Server. The ACC communicates with the GlassFish Server using
RMI-IIOP protocol and manages the details of RMI-IIOP communication
using the client ORB that is bundled with it. Compared to other Java
EE containers, the ACC is lightweight. For information about debugging
application clients, see Application Client Debugging.
GlassFish Server Open Source Edition Application Development Guide Release 4.0
see also:
https://stackoverflow.com/questions/25830149/how-to-package-a-stand-alone-remote-ejb-application-client
From a client application, how does the ACC remotely invoke the EJB module?
There must be a configuration. Does the ACC pick this up from jndi.properties? I can't find much documentation or examples on ACC usage. If the ACC is unsuitable, then, of course, I'll use a different approach. Presumably there's a way to specify a remote Glassfish server for the ACC.
How do you intend to deploy your application?
In my days when i use to develop application clients for the ACC, i used to bundle everything in an EAR (I will still do that, cause it is easier).
Glassfish deploys the artifacts, generates required configurations (You can override configurations in application.xml anyway).
One thing that the ACC takes care is the CORBA properties needed for remote connection.
When you download the client jar from the glassfish admin, you download a java webstart application, that downloads all required libraries as appropriate and a configuration is automatically set from which host (paramount that you set glassfish domain host properly, or this will be an internal IP or localhost) it was downloaded from.
This might be duplicate of this and this question.
I have a java application in which i am using JAX-WS (WEB SERVICES). and many other features in it like apache-commons utils.
My application is swing application, that connects to my server code
and uploads and downloads, and sync files with the server. my
database is mysql.
I have compiled my server code and created a .WAR file. i deployed
that .WAR (containing all the required libraries for my server
side application) file on a JBoss server and its working fine.
Now my Management says me to why use JBoss instead of Tomcat, which
easy to manage and setup on a linux server. actualy they have a
linux server which supports tomcat, but not JBoss. so they said to
me to deploy on Tomcat on Linux Server. I installed and configured
tomcat on my windows and deployed a .WAR file. and also created
virtual directory for my resources its working fine[but not tested
completely]
My Application does not have EJB so I think that Tomcat is good enough.
Please suggest me is it fine to use Tomcat instead of JBoss server,
I am worried if it may get problems in the future, or it might not
support features of my application in future or after complete testing.
JBoss uses Tomcat under the hood to host war applications anyway.
Using Tomcat for you war application instead of JBoss should be perfectly fine.
Any commons-jars that you are using can be downloaded from http://commons.apache.org/. Put them in your lib directory and you should be good to go. Most apache commons libraries should allready be included with Tomcat though, you'll have to check.
PS:
JAX-WS is standard in the latest JDK6 updates. If your using a earlier version of the JDK then just download the JAX-WS jars. The standard reference implementation from Oracle/Sun can be downloaded from here http://jax-ws.java.net/
Do you have EJB? JBoss comes with its implementation of the EJB JSR specification.
For Tomcat, you require plugins like openEJB.
Many application servers use Tomcat internally as its Servlet container. But for compliance to JavaEE standards, most would choose a JBoss application server over Tomcat anyday.
Note that JBoss 7 Application Server Web Profile is certified.
Tomcat functions well as a plain vanilla Servlet container. Many enterprises when using Tomcat, couple it with Proxy and HTTPD servers for security and load balancing reasons.
I am starting to look into Enterprise Java and the book I am following mentions that it will use JBoss. Netbeans ships with Glassfish. I have used Tomcat in the past.
What are the differences between these three programs?
Tomcat is just a servlet container, i.e. it implements only the servlets and JSP specification. Glassfish and JBoss are full Java EE servers (including stuff like EJB, JMS, ...), with Glassfish being the reference implementation of the latest Java EE 6 stack, but JBoss in 2010 was not fully supporting it yet.
Tomcat is merely an HTTP server and Java servlet container. JBoss and GlassFish are full-blown Java EE application servers, including an EJB container and all the other features of that stack. On the other hand, Tomcat has a lighter memory footprint (~60-70 MB), while those Java EE servers weigh in at hundreds of megs. Tomcat is very popular for simple web applications, or applications using frameworks such as Spring that do not require a full Java EE server. Administration of a Tomcat server is arguably easier, as there are fewer moving parts.
However, for applications that do require a full Java EE stack (or at least more pieces that could easily be bolted-on to Tomcat)... JBoss and GlassFish are two of the most popular open source offerings (the third one is Apache Geronimo, upon which the free version of IBM WebSphere is built). JBoss has a larger and deeper user community, and a more mature codebase. However, JBoss lags significantly behind GlassFish in implementing the current Java EE specs. Also, for those who prefer a GUI-based admin system... GlassFish's admin console is extremely slick, whereas most administration in JBoss is done with a command-line and text editor. GlassFish comes straight from Sun/Oracle, with all the advantages that can offer. JBoss is NOT under the control of Sun/Oracle, with all the advantages THAT can offer.
You should use GlassFish for Java EE enterprise applications.
Some things to consider:
A web Server means: Handling HTTP requests (usually from
browsers).
A Servlet Container (e.g. Tomcat) means: It can handle
servlets & JSP.
An Application Server (e.g. GlassFish) means: *It can manage
Java EE applications (usually both servlet/JSP and EJBs).
Tomcat - is run by Apache community - Open source and has two flavors:
Tomcat - Web profile - lightweight which is only servlet container and does not support Java EE features like EJB, JMS etc.
Tomcat EE - This is a certified Java EE container, this supports all Java EE technologies.
No commercial support available (only community support)
JBoss - Run by RedHat
This is a full-stack support for JavaEE and it is a certified Java EE container.
This includes Tomcat as web container internally.
This also has two flavors:
Community version called Application Server (AS) - this will have only community support.
Enterprise Application Server (EAP) - For this, you can have a subscription-based license (It's based on the number of Cores you have on your servers.)
Glassfish - Run by Oracle
This is also a full stack certified Java EE Container. This has its own web container (not Tomcat).
This comes from Oracle itself, so all new specs will be tested and implemented with Glassfish first. So, always it would support the latest spec. I am not aware of its support models.
jboss and glassfish include a servlet container(like tomcat), however the two application servers (jboss and glassfish) also provide a bean container (and a few other things aswell I imagine)
It seems a bit discouraging to use Tomcat when you read these answers. However what most fail to mention is that you can get to identical or almost identical use cases with tomcat but that requires you to add the libraries needed (through Maven or whatever include system you use).
I have been running tomcat with JPA, EJBs with very small configuration efforts.
JBoss and Glassfish are basically full Java EE Application Server whereas Tomcat is only a Servlet container.
The main difference between JBoss, Glassfish but also WebSphere, WebLogic and so on respect to Tomcat but also Jetty, was in the functionality that an full app server offer. When you had a full stack Java EE app server you can benefit of all the implementation of the vendor of your choice, and you can benefit of EJB, JTA, CDI(JAVA EE 6+), JPA, JSF, JSP/Servlet of course and so on. With Tomcat on the other hands you can benefit only of JSP/Servlet. However to day with advanced Framework such as Spring and Guice, many of the main advantage of using an a full stack application server can be mitigate, and with the assumption of a one of this framework manly with Spring Ecosystem, you can benefit of many sub project that in the my work experience let me to left the use of a full stack app server in favour of lightweight app server like tomcat.
Both JBoss and Tomcat are Java servlet application servers, but JBoss is a whole lot more. The substantial difference between the two is that JBoss provides a full Java Enterprise Edition (Java EE) stack, including Enterprise JavaBeans and many other technologies that are useful for developers working on enterprise Java applications.
Tomcat is much more limited. One way to think of it is that JBoss is a Java EE stack that includes a servlet container and web server, whereas Tomcat, for the most part, is a servlet container and web server.
Apache tomcat is just an only serverlet container it does not support for Enterprise Java application(JEE). JBoss and Glassfish are supporting for JEE application but Glassfish much heavy than JBOSS server : Reference Slide