• Post Reply Bookmark Topic Watch Topic
  • New Topic

Weblogic local ejb reference scope ambiguity  RSS feed

 
Mark Gargin
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

Have been toiling with this problem for a couple of days now. Basically it all boils down to the scope of local references between beans.

I have two beans. One references the other. I've read in a couple of places that the requirement for local reference use is that the two beans must be in the same jvm. And then a few lines later they've specified that they must in fact be in the same ear file.

I've managed to get a local reference between beans where the beans are deployed in seperate jars but within the same EAR file. However the way our project is divided, this places an unwanted dependancy between teams.

Would anyone know if two beans in separate ear files but in the same jvm (Maybe the problem is my presuming that weblogic doesn't kick off a seperate jvm per deployed ear file.... say it ain't so!!!)

If indeed it is possible, could someone supply the appropriate deployment segements from the ejb-jar.xml and weblogic-ejb-jar.xml that allows this local reference? Am going a shade spare.

Thanks,
Mark.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not clear what problem you are having. I can't see how project organisation can affect how a bean is referenced. What matters is how the bean is accessed in production. If an EJB is only accessed by another EJB, then it need only expose a local interface and both EJBs must be in the same EAR.

If both EJBs have remote clients, then they must have remote interfaces. However, you can enable call by reference as WebLogic Server will attempt optimisation. Note that both the caller and callee still need to be in the same EAR file. But if the caller and callee are in two EARs, WebLogic Server will always call by value even if both EARs are in the same JVM.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!