-
1. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
wdfink Feb 6, 2013 4:58 AM (in response to shaikhdahood)Yes, before EJB3.1 the naming of EJB's has no standard.
Because of this standartisation of JNDI names in AS7 follow the EJB3.1 spec.
You need to change the naming.
If you have further questions you should state what kind of application you use and post the relevant part of sources.
The documentation might help.
-
2. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
sfcoy Feb 6, 2013 5:19 AM (in response to shaikhdahood)1 of 1 people found this helpfulGlobal JNDI names were not standardised until JEE6.
Prior to that (if you wanted to write portable code) you were expected to map ENC names (ie java:env/ejb/BeanName) to a vendor specific global name in a vendor specific deployment descriptor.
You would have given your EJBs their global names in a weblogic specific deployment descriptor, right?
With JBoss AS 7.x, the JNDI names of each of your EJBs is listed in the server log:
{code}
[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-2) JNDI bindings for session bean named EchoBean in deployment unit subdeployment "ejb.jar" of deployment "ejb-remote-client-api-test.ear" are as follows:
java:global/ejb-remote-client-api-test/ejb/EchoBean!org.jboss.as.ejb.http.test.EchoRemote
java:app/ejb/EchoBean!org.jboss.as.ejb.http.test.EchoRemote
java:module/EchoBean!org.jboss.as.ejb.http.test.EchoRemote
java:jboss/exported/ejb-remote-client-api-test/ejb/EchoBean!org.jboss.as.ejb.http.test.EchoRemote
java:global/ejb-remote-client-api-test/ejb/EchoBean
java:app/ejb/EchoBean
java:module/EchoBean
{code}
If you must look EJBs up using JNDI, then you should select an appropriate name from the list as above.
You will find more information in the AS71 Developer Guide.
-
3. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
shaikhdahood Feb 6, 2013 5:48 AM (in response to sfcoy)Thanks for the reply Stephen.
But i am not using the weblogic deployment descriptor i.e weblogic-ejb-jar.xml , as I am using anootations.
And i do get the JNDI binding for session bean in my server log for JBoss AS 7.1.
As you see in the JNDI bindings we have ' ! ' should i replace my code(#) with ! to look up the JNDI ?
below is how i look up in weblogic
InitialContext ic = new InitialContext();
String lookupSession = GPUtilitySession#com.mycompany.ejb.GPUtilitySession;
session = (Object) ic.lookup(lookupSession);
-
4. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
sfcoy Feb 6, 2013 6:32 AM (in response to shaikhdahood)If you're using annotations why don't you just inject the reference and let the container worry about locating your EJBs?
BTW, I don't think AS7.x supports mappedName at the moment. It's certainly not required to do that.
-
5. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
sfcoy Feb 6, 2013 6:34 AM (in response to shaikhdahood)shaikh dahood wrote:
And i do get the JNDI binding for session bean in my server log for JBoss AS 7.1.
As you see in the JNDI bindings we have ' ! ' should i replace my code(#) with ! to look up the JNDI ?
below is how i look up in weblogic
InitialContext ic = new InitialContext();
String lookupSession = GPUtilitySession#com.mycompany.ejb.GPUtilitySession;
session = (Object) ic.lookup(lookupSession);
You have to use one of the names listed in the server.log.
-
6. Re: Migration of EJBs from Weblogic 10.3 to Jboss AS 7.1
wdfink Feb 9, 2013 3:10 PM (in response to shaikhdahood)You may havea look into the quickstarts. there are several examples. Inside a server youcan use the multi-server QS, there are different aproaches how to use EJB invocation.