Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic call of session beans

Status
Not open for further replies.

jonatan

Programmer
Mar 24, 2003
14
BR
During our development, we're going to call some session beans, but not by the normal way. We have the session bean A, that contains some data such like the name for the remote and home interface and JNDI Name for a session bean B. It also contains the name of a method that shall be called in the session bean B. We can call the method using the specific classes for that (Class, Method, invoke, and so on). Our matter is: how to refer the session bean B in the "ejb-jar.xml" (and in "jboss.xml", since we use JBoss 3.0.0)? To invoke the session bean B, it must exist an "
Code:
<ejb-ref>
&quot; tag in the &quot;ejb-jar.xml&quot;, so that I can call the lookup and the session bean is found.

Can anybody help us, or tell where can we find some help?

Thanks,

--
Jonatan Schroeder
Medisoft Ltda. - Brazil
System Development
Project Coordination
 
I use something like this in WebLogic Server
I hope this shuld be the same for JBoss also.
<session>
<ejb-name>Hello2Bean</ejb-name>
<home>com.its.ejb.Hello2Home</home>
<remote>com.its.ejb.Hello2</remote>
<ejb-class>com.its.ejb.Hello2Bean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
 
I have no problems with creating the ejb-jar.xml or jboss.xml. My question was about ejb-ref. But, anywhere, I did already solve my problem. I was using &quot;java:comp/env/...&quot; to reference my EJB. I modified the reference to use directly the JNDI name for the EJB, and it works.

Even so, thanks

Jonatan

---
Jonatan Schroeder
Medisoft Ltda. - Brazil
System Development
Project Coordination
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top