• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Deploy EJB and Web separately

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ..
If I have 3 machines, machine I is a managed server, dedicated for application server (EJBs). Machine II is a managed server, dedicated for web applications (the war file). Machine III is an admin server. All run under 1 domain.
What I do now:
1. I start machine III as admin server.
2. I deploy the EJB components at machine I
3. I deploy the Web components at machine II (which contains only web application war) at machine II
Problem:
I browse the JNDI tree on machine II, and it cannot found the EJBs at machine I, thus, machine II cannot access the beans.. But, if I deploy the EJBs at machine II, then EJB will be used in machine II (which should not be happened - for security purpose).
Please help.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why would you expect the EJBs to be bound to the JNDI tree for Machine II? Your web application is going to have to get a Context for Machine I in order to use any EJB, right? In which case the JNDI lookup for the EJB would be taking place on Machine I... where it belongs.
[ September 15, 2002: Message edited by: Chris Mathews ]
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
If we are writing simple client for the EJBs deployed in a different system say clients for MDBs deployed in different system do we need weblogic.jar to be present in the local system for enabling the following code segment to work
.....
Hashtable ht = new Hasttable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,"t3://<remote_server_ip>:<port>");
InitialConetxt ictx = new InitialContext(ht);
........
Then do all sorts of activities based on
ccontext obtained
.........
I guess that the weblogic.jar must be present in the local system and must be included in the classpath in order to successfully reach the JNDI tree of the remote machine
This is because i tried writing a MDB client on a virgin system having no traces of weblogic installation and got
ClassNotFoundException wrt weblogic.jndi.WLInitialContextFactory
May be because the InitialContext creation method requires the class in the local system
Please clarify if I am right. and please let me know in case i need to pack the weblogic.jar with the client classes what are the other basic essential files to be packed along with
Regards
K.Muthukumaran
 
Pearlo Muthukumaran
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found out that when i copy the weblogic.jar in the different client system and include in the classpath, the initial Context lookup works fine and the JMS Client is able to perform the JNDI lookup of the server.
May be protocol handler for "t3://.." stuff and host of other helper classes are present in weblogic.jar file and therefore it works
Rgds
K.Muthukumaran
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you�ve got a remote client you must have the required stubs included in the classpath: the EJB�s stubs & the helper classes stubs.
So the most typical option is to generate a JAR with all those classes.
 
Don't touch me. And dont' touch this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic