This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

calling ejb from tomcat  RSS feed

 
vijay chaudhary
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Have deployed the sessionBeans on oc4j.
and My web part is deployed in Tomcat.When i m trying to get the Home in Locator Class it is giving error.
In my Locator class i have a method getInitialContext() which used to get the context of the remote server,so that ejbHome can be returned.

I have putted entry in web.xml file also
<ejb-ref>
<ejb-ref-name>ejb/Login</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.igt.atg.ejb.common.LoginHome</home>
<remote>com.igt.atg.ejb.common.Login</remote>
</ejb-ref>




My Code for getInitialContext() is

private Context getInitialContext() {
try{
Properties props= new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
props.put (Context.SECURITY_PRINCIPAL,"admin");
props.put(Context.SECURITY_CREDENTIALS,"admin");
props.put (Context.PROVIDER_URL,"ormi://172.32.18.16:23791");
Context ctx=new InitialContext(props);

return ctx;
}catch(Exception e){
e.printStackTrace();

}
return null;
}


Its throwing exception.
Pls try to solve this problem.Thanks in advance
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you also post the Exception stack trace?

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!