JBoss AS7 is now fully EE6 certified and provides a great flexibilty and performance to the enterprise world with the stability at better cost. Special thanks to the JBoss Community for bringing these great features and JBoss for us.
An EJB container is the component that manages a particular class of EJB. In JBoss there is one instance of the org.jboss.ejb.Container created for each unique configuration of an EJB that is deployed. The actual object that is instantiated is a subclass of Container and the creation of the container instance is managed by the EJBDeployer MBean.
The JBoss EJB container architecture employs a modular plug-in approach. All key aspects of the EJB container may be replaced by custom versions of a plug-in and/or an interceptor by a developer. This approach allows for fine tuned customization of the EJB container behavior to optimally suite your needs. Most of the EJB container behavior is configurable through the EJB JAR META-INF/jboss.xml descriptor and the default server-wide equivalent standardjboss.xml descriptor.
EJBs (Enterprise Java Beans) as back bone of any enterprise application to perform various operations. JBoss AS7 supports EJB3.1 specification. As part of this page (Series) we will see ……
How to migrate the EJB based applications from WebLogic to JBoss AS 5 and JBoss AS7?
Some reference documents which you can refer
- To know about EJBs in JBoss AS7
- To know about EJBs in JBoss AS5
- To go through various discussions on EJBs in JBoss
- To go through the discussions on various EJB/JBoss AS7 related discussions
- To know how to be always updated on JBoss World
- Migrating Simple EJBs from WebLogic to JBoss
- Minimum Jars required for the EJB Client in JBoss AS5/6.
- Securing EJBs inside JBoss.
- How to migrate MDBs from WebLogic to JBoss AS5/6
- Deployment descriptors differences in WebLogic and JBoss AS5/6
- Minimum Jars needed for JBoss As7 EJB client
- JPA with EJBs and Hibernate in JBoss AS7
- Simplified way of EJB Remote Lookup in JBoss AS7.1.0.Final
Some Videos on JBoss & EJBs
Developing Simple EJBs in JBoss Developers Studio for JBoss
JBoss AS and EJBs with EJB Clients
AS part of this series we will see various samples of WebLogic based EJBs and JBoss Based EJBs which will help us in easily migrating the EJB based applications from WebLogic to JBoss
If the application is developed purely based on the EE standards and if it does not have any WebLogic specific depoyment descriptors then it will be very easy to just deploy and run the same application on JBoss or any other Application Server, However if the application contains WebLogic specific annotations and deployment descriptors then we will have to alter the contents “weblogic-ejb-jar.xml” kind of deployment descriptors to “jboss.xml” (jboss-ejb3.xml in JBossAS7) while migrating to JBoss.
So here basically we will talk about the following migrations:
Migration of EJBs from WebLogic to JBoss AS5 or AS6
The above example demonstrates how to develop and deploy a simple EJB Based application in JBoss AS6. This example also demonstrates the changes in the EJB client side code which we need to keep in mind while specially while choosing the “Context.INITIAL_CONTEXT_FACTORY” and “Context.PROVIDER_URL”. Because in weblogic you would be using the Context.INITIAL_CONTEXT_FACTORY name as “weblogic.jndi.WLInitialContextFactory” where as in JBoss it is “org.jnp.interfaces.NamingContextFactory” usually but JBoss provides many other options as well “org.jboss.naming.HttpNamingContextFactory” or “org.jboss.security.jndi.JndiLoginInitialContextFactory”.
In WebLogic the client needs some set of jars to be present at the client side like “wlfullclient.jar” or you will need to place the whole “weblogic.jar” (around 36 to 50 MB in size in various versions of WebLogic) which has many issues like huge file size and Corba related issues like https://forums.oracle.com/forums/thread.jspa?threadID=2188580
The above sample demonstrates minimum number of Jars required by a JBoss based EJB client in order to invoke the JBoss deployed on JBoss AS5/6.
The above example demonstrates how easily you can secure the EJBs deployed on your JBoss using the JBoss specific deployment descriptor (jboss.xml). In weblogic the security related configuration foran EJB goes inside “weblogic-ejb-jar.xml”
The above example also demonstrates how to use the Context.INITIAL_CONTEXT_FACTORY as “org.jboss.security.jndi.JndiLoginInitialContextFactory” in JBoss.
The above sample demonstrates how to simply create a JMS Queue and then how to write a MDB3 inside JBoss As5/6 to consume the messages from the JMS Queue. This example basically focuses on allowing an MDB to access a Remote JMS Queue.
In order to migrate the EJB based application from WebLogic to JBoss most of the peoplefaces challenges specially when it comes to the container specific deployment descriptors. So here in this example we will see what kind of entries goes inside the WebLogic specific EJB Deployment descriptor “weblogic-ejb-jar.xml” and how those parameter and configurations can be moved insside the JBoss specific EJB Deployment descriptors like “jboss.xml” (for JBoss AS4/5/6) and “jboss-ejb3.xml” (for JBoss AS7).
More Coming Soon … Stay Tuned
Migration of EJBs from WebLogic to JBoss AS7
This example shows how to develop a simple EJB based application in JBoss AS7 and what all minimum jars required for the Client. Also it focuses on some JBoss specific features which allows a remote ejb client to access an EJB deployed on JBoss AS7.
Another example which demonstrates how to migrate the Hibernate4 and JPA2 based application from WebLogic to JBoss AS7.
In WebLogic we use WLInitialContextFactory in order to create the InitialContext. However from JBoss AS7.1.0.Final there is a very simple want to create the Initial Context, Wit the help of “org.jboss.naming.remote.client.InitialContextFactory”. And also weblogic usually uses “t3” protocol which is a kind of multiProtocol Wrapper suit, But while migrating to JBoss AS7.1.0.Final you will need to use the “remote://” protocol, which is by default Secured so you will always need a Username/Password in order to lookup a remote Object. This provides a Higher level of Security to the Enterprise World.
More Coming Soon … Stay Tuned
Middleware Magic Team