Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / July 2003

Tip: Looking for answers? Try searching our database.

EJB on Weblogic7 : accessing Ejb thru *Local interface*  fails due to JNDI lookup

Thread view: 
Mumbai Joe - 29 Jul 2003 17:16 GMT
We are facing a problem while accessing an EJB deployed as a 'Local'
EJB. (ejb2.0)

There is an entity bean X which is working perfectly.
Now I tried creating an similar EJB for "Local" access. I created
LocalHome & Local interfaces and the bean class itself was copied from
bean X.

In descriptors, the local EJB was specified as ...
------------------------------------------------------------
<ejb-jar>
   <enterprise-beans>

       ................
       <entity>
           <ejb-name> SiteUserEjbLocal </ejb-name>
           <local-home> SiteUserLocalHome </local-home>
           <local> SiteUserLocal </local>
           <ejb-class> SiteUserEjb2 </ejb-class>
           <persistence-type>Bean</persistence-type>
           <prim-key-class> SiteUserPK </prim-key-class>
           <reentrant> False </reentrant>
       </entity>
   
   .....
   </enterprise-beans>
 <assembly-descriptor />
</ejb-jar>

------------------------------------------------------------
<weblogic-ejb-jar>
   ..........
 <weblogic-enterprise-bean>
       <ejb-name>SiteUserEjbLocal</ejb-name>
       <local-jndi-name>SiteUserEjb2</local-jndi-name>
 </weblogic-enterprise-bean>

   .........
</weblogic-ejb-jar>

------------------------------------------------------------

Both bean X and new bean Y are packaged in same EJB jar and deployed
through weblogic console. The deployment is successful & console shows
EJB successful activated on target server.

However, on client side, the JNDI lookup for name 'SiteUserEjb2' fails
...
The error reported is
---------
Root exception is javax.naming.NameNotFoundException: Unable to
resolve 'app/ejb/WebUtils.jar#SiteUserEjb2/local-home' Resolved:
'app/ejb' Unresolved:'WebUtils.jar#SiteUserEjb2' ; remaining name
'WebUtils.jar#SiteUserEjb2/local-home'
<<no stack trace available>>
---------
I found another interesting thing :

We did a direct JNDI lookup using some other utility jndi program. The
program showed the JNDI name 'SiteUserEjb2' present in Weblogic's JNDI
tree -- but class of object bound was reported as
'javax.naming.LinkRef' whereas for all other EJBs, the class is
reported as 'weblogic.rmi.cluster.ClusterableRemoteObject'.

Any pointers ??

Thanks,
MJ
Marek Lange - 30 Jul 2003 08:48 GMT
> We are facing a problem while accessing an EJB deployed as a 'Local'
> EJB. (ejb2.0)
[quoted text clipped - 8 lines]
>  
> However, on client side, the JNDI lookup for name 'SiteUserEjb2' fails

Don't know much about WebLogic. Are you using a remote client? This will
not work. If you want to call the Bean Y using its local interface your
client has to be in the same VM, otherwise it is necessary to use the
remote interface of the bean. The access to the bean with local
interfaces is normally realized by using using a session bean facade
which has a remote interface.

-marek


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.