Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to - stateful session bean

 
Manish Kamat
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
 
Maximilian Trenks
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!