- This topic has 6 replies, 3 voices, and was last updated 20 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
sjonesMember– System Setup ——————————-
Operating System and version: WINXP Pro, SP1
Eclipse version: Version: 2.1.2
Eclipse build id: Build id: 200311030802
Fresh Eclipse install (y/n): y
If not, was it upgraded to its current version using the update manager?
Other installed external plugins:
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 7
MyEclipse version: 2.7.0
Eclipse JDK version: SUN 1.4.2_03-b02
Application Server JDK version: SUN 1.4.2_03-b02
Are there any exceptions in the Eclipse log file? No– Message Body ——————————-
I’m experiencing difficultiies looking up a Local EJB Home Interface when running Weblogic 7, sp4 inside of Eclipse.I recieve the following error message when performing the JNDI name lookup:
2004-08-09 09:12:46,522 ERROR [ExecuteThread: '1' for queue: 'default'] com.erac.vaa.util.EJBLocator.getEJBLocalHome(Class) - Error creating EJB Local Home [com.erac.vaa.model.org.AdminGroupEJBLocalHome]. Class not found. javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/CostAnalysisFolderManagerBean.jar#AdminGroup/local-home in /app/webapp/eurveh/27562370.; remaining name '/app/ejb/CostAnalysisFolderManagerBean/jar#AdminGroup/local-home']; Link Remaining Name: 'java:app/ejb/CostAnalysisFolderManagerBean.jar#AdminGroup/local-home'
If I change my application to use remote interfaces I successfully lookup the EJB (with Weblogic running inside of Eclipse)
If I use Local Interfaces with a Weblogic instance OUTSIDE of eclipse, I successfully look up the EJB.Here is the “guts” of method I use for RemoteHome Lookup:
ejbHome = (EJBHome) PortableRemoteObject.narrow(getInitialContext().lookup(homeClass.getName()), homeClass);
and here is the “guts” of the method I use for LocalHome Lookup
ejbLocalHome = (EJBLocalHome) getInitialContext().lookup(homeClass.getName());
One interesting thing to note: In the weblogic-ejb-jar file I specify the JNDI names as follows:
<jndi-name>com.erac.vaa.model.org.AdminGroupEJBHome</jndi-name> <local-jndi-name>com.erac.vaa.model.org.AdminGroupEJBLocalHome</local-jndi-name>
However the error message reported when looking up the local EJB home appears to be using the “java:app/ejb/” naming convention, even though I have specifed the JNDI name as an explicit package path in the EJB deployment desciptor.
The Weblogic Console reports the EJB as being bound with the following names:
Name Class Name AdminGroupEJBHome ==> com.erac.vaa.model.org.AdminGroupEJBBean_r1srjk_HomeImpl AdminGroupEJBLocalHome ==> javax.naming.LinkRef
Any thoughts? Is this caused by the fact Weblogic is running inside another JVM and EJB context is getting confused?
Riyad KallaMemberI have asked our EJB guy to have a look at this.
HCIMemberAny thoughts? Is this caused by the fact Weblogic is running inside another JVM and EJB context is getting confused?
I think local beans can be accessed only from clients in the same JVM. Additionally with weblogic (according to my experience) you can access local beans only from clients deploied in the same ear as local beans.
sjonesMemberI agree local EJBs can only be accessed from clients in the same JVM, but I am directly accessing the Weblogic instance started inside of Eclipse and the EJB jar is deployed in the application directory of this Weblogic instance.
However, you bring up an interesting point regarding local (Weblogic) EJB clients are only available if they are deployed in the same EAR.
I’m currently deploying my applicaiton as an exploded Web Project, to allow hot jsp and java changes. Since I do not have EJB projects created, I have chosen to build the EJB jar with my ant task and manually copy this jar into the appliations directory of the Eclipse Weblogic instance.
Does Weblogic support local EJB access in an exploded deployment format?
HCIMember@sjones wrote:
Does Weblogic support local EJB access in an exploded deployment format?
I’m not sure. I tried but without good result. Try ear deployment – it works well.
sjonesMemberl use the EAR deployment for my production environment.
But I really want to use the exploded format in development to allow for near “real time” code change/deployment capabilities.
I’m going to continue investigating the exploded format – Maybe all I need to do is create a J2EE project thru MyEclipse and then add my EJB jar; or possibly explode my EJB jar somewhere inside the MyEclipse Weblogic deployment directory.
Thanks for you help! You got me thinking in another direction.
Riyad KallaMembersjones,
For some application servers the way to do it is to deploy the packaged EAR file, then deploy it using your app server’s console, THEN go back into ME and remove the packaged deployment and setup an exploded deployment, it should deploy the files “on top” of the app that the application server deployed and give you the real-time updates. -
AuthorPosts