Hi am trying following in the code in
java class .this is jar deployed in classes folder of C:\Program Files\IBM\WebSphere\AppServer\classes
String jndiName = "ejb/com/clearorbit/connect/service/WeblogicLoginModuleService";
InitialContext initialContext = new InitialContext();
Context context = (Context) initialContext.lookup("java:comp/env");
Object homeObject = context.lookup(jndiName);
But i get name not found exception at Object homeObject = context.lookup(jndiName);
I am calling a
ejb deployed within my application ear.
web.xml
<ejb-local-ref id="EJBLocalRef_1233977974926">
<ejb-ref-name>ejb/com/clearorbit/connect/service/WeblogicLoginModuleService</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.clearorbit.connect.service.home.WeblogicLoginModuleServiceHome</local-home>
<local>com.clearorbit.connect.service.WeblogicLoginModuleService</local>
<ejb-link>WeblogicLoginModuleService</ejb-link>
</ejb-local-ref>
ejb.jar.xml
<session id="Session_1233977973771">
<description><![CDATA[WeblogicLoginModuleService.]]></description>
<display-name>WeblogicLoginModuleService</display-name>
<ejb-name>WeblogicLoginModuleService</ejb-name>
<local-home>com.clearorbit.connect.service.home.WeblogicLoginModuleServiceHome</local-home>
<local>com.clearorbit.connect.service.WeblogicLoginModuleService</local>
<ejb-class>com.clearorbit.connect.service.DefaultWeblogicLoginModuleService</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<resource-ref id="ResourceRef_1233977973771">
<res-ref-name>jdbc/clr</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</session>
ibm-ejb-jar-bnd.xmi
<ejbBindings xmi:id="EnterpriseBeanBinding_1233977973771" jndiName="ejb/WeblogicLoginModuleService">
<enterpriseBean xmi:type="com.ibm.etools.ejb:Session" href="META-INF/ejb-jar.xml#Session_1233977973771"/>
<resRefBindings xmi:id="ResourceRefBinding_1233977973772" jndiName="jdbc/clr">
<bindingResourceRef href="META-INF/ejb-jar.xml#ResourceRef_1233977973771"/>
</resRefBindings>
</ejbBindings>