File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes ejbLoad() is not called??????in JBOSS and WebSphere????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "ejbLoad() is not called??????in JBOSS and WebSphere?????" Watch "ejbLoad() is not called??????in JBOSS and WebSphere?????" New topic
Author

ejbLoad() is not called??????in JBOSS and WebSphere?????

dhananjayan karnam
Greenhorn

Joined: May 23, 2003
Posts: 3
Hi we are using JBOSS3.0 and we have the following requirement.
This is the architecture we are using.
From JSP we are calling session bean and from there we are calling entity bean(BMP).
For both the entity bean and session bean method we are setting the transaction-attribute as 'Required'.
The session bean method is like this
public void createMethod()
{
// getting initial context code
EJBHome home = context.lookup() // entity bean
EJBRemote remote = home.create()
// here actually it has to call the ejbStore() method of
// entity bean, that is one requirement
// here it has to call ejbLoad() method b'z getValue() is
// a business method
S.O.P(remote.getValue());
// here it has to call ejbStore() method b'z getValue() is
// a business method

}
but it is not calling the ejbLoad method(). I modified standardjboss.xml commit option to B and C . If both are in the same transaction it is not calling the ejbLoad() method at all. If session bean is in required, and entity bean is in requiresNew stage then it is calling.
But entire method we want to be in the same transaction, we are not able(server) to call the ejbLoad() method, so whatever value (bean values) we are setting in ejbcreate() method we are not getting reflected in the session bean when calling business method call.
Can any one please tell me why this is happening and how to solve this problem. Even i am facing problem in case of websphere., But the same thing is working in weblogic???
can anyone please help, the requirement is urgent....
Thanks in advance
dhananjayan
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Moving discussion to JBoss forum...


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
bor
Greenhorn

Joined: Dec 26, 2002
Posts: 11
Dear karnam,
Please try to think about Bean-Managed Transaction, BMP and Entity bean. It will help you to know why and how to resolve the problem.


bor
Mathews P Srampikal
Ranch Hand

Joined: Nov 26, 2002
Posts: 211
As you are using BMP.you have to pass the values (better to pass a Value object)to create a record....this is different from CMP as it will be mapped as CMR fields.
In this case you are not created one....and trying to display which is Non-Existing.


Thanks,
Mathews
 
jQuery in Action, 2nd edition
 
subject: ejbLoad() is not called??????in JBOSS and WebSphere?????