Hi Gaurav,
I tried the same using Weblogic 7.0. No issues there.
I had written the lookup of the Local Session Bean in one of the business methods of the Remote one. Snippet of the code and both the xml is mentioned below.
Rgds,
Seetesh
public class PlayerBean implements SessionBean
{
......
public
String playercall()
{
try
{
Context ic= new InitialContext();
erHome= (ERHome) ic.lookup("JNDIERLocal");
System.out.println("SEETESH 1 : CREATING ER FROM PLAYER");
er = erHome.create();
//er = (ER) PortableRemoteObject.narrow(erHome.create(),ER.class);
System.out.println("SEETESH 2 : CREATED ER FROM PLAYER BEFORE CALLING DISPLAYSEET");
String aaa = er.displaySeet();
System.out.println("SEETESH 3 : AFTER CALLING DISPLAYSEET aaa : "+aaa);
return "success";
}
ejb-jar.xml
-----------
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC
'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN'
'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>PlayerEJB</ejb-name>
<home>ejb.stateless.er.PlayerHome</home>
<remote>ejb.stateless.er.Player</remote>
<ejb-class>ejb.stateless.er.PlayerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>WEBL</env-entry-name>
<env-entry-type>java.lang.Double </env-entry-type>
<env-entry-value>10.0</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>INTL</env-entry-name>
<env-entry-type>java.lang.Double </env-entry-type>
<env-entry-value>15.0</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>playerLimit</env-entry-name>
<env-entry-type>java.lang.Integer </env-entry-type>
<env-entry-value>100</env-entry-value>
</env-entry>
</session>
<session>
<ejb-name>EREJB</ejb-name>
<local-home>ejb.stateless.er.ERHome</local-home>
<local>ejb.stateless.er.ER</local>
<ejb-class>ejb.stateless.er.ERBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>erLimit</env-entry-name>
<env-entry-type>java.lang.Integer </env-entry-type>
<env-entry-value>300</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>PlayerEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>EREJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>ejb20_SB_local_remote.jar</ejb-client-jar>
</ejb-jar>
weblogic-ejb-jar.xml
---------------------
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>PlayerEJB</ejb-name>
<jndi-name>JNDIPlayer</jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>EREJB</ejb-name>
<local-jndi-name>JNDIERLocal</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>