Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to - stateful session bean  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I call entity bean from stateful session bean it gives me error:ClassNotfoundException...
my entity bean is in package A, statefulbean is in package B and both packages are in project P.
If anyone can tell me how to call if i'm wrong..
thanks in advance
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can't just call a bean from the other.
you have to step through the usual procedure, looking it up (or use the servicelocator pattern to receive a reference to the bean) via JNDI.
to do so you need to add a bean reference to the deployment descriptors.
i don't know for sure, but in the j2ee tutorial you should find more infos about it:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/J2eeTutorialTOC.html
 
Manish Kamat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've given ejb-ref-name but still it gives error.
my weblogic-ejb-jar.xml is as follows:
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>project.packageA</ejb-name>
...
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>project.packageB</ejb-ref-name>
<jndi-name>project.packageB</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>project.packageA</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
anything wrong in ref given by me?
i'm looking up for entity bean from seesion bean usual way
e.g. ctx.lookup("project.packageB")
please correct me if I'm wrong...
 
Maximilian Trenks
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry, i am no weblogic expert, but you can post your question in the weblogic forum here on javaranch.com:
http://www.coderanch.com/forums/f-40/BEA-Weblogic
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!