aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Communication between two  EJB container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Communication between two  EJB container" Watch "Communication between two  EJB container" New topic
Author

Communication between two EJB container

Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
I want to know how to communicate between two EJB containers or two web Containers or simply J2EE containers? I will be glad if you people please help me regarding this with example.

Thank You...


SCJP 1.5, SCWCD 1.4, Next... SCBCD5
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Java-based application servers communicate with each other using the Java Naming and Directory Interface API.

http://java.sun.com/products/jndi/
Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
Thank You so Much..
Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
Can you please give me any Idea how can I call a remote Interface in a J2EE container from a remote J2EE container.
How can I do lookup for he EJB in another container???
Jetendra Ivaturi
Ranch Hand

Joined: Feb 08, 2007
Posts: 159
Get the address of the naming registry of the remote J2EE container.

And then lookup. Same as we do with single Container.

Properties p=new Properties();
p.put(Context.PROVIDER_URL,"t3://ipaddess:7001/");
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
Context ctx=new InitialContext(p);
followed by Lookup.

Please correct me if am wrong.

Thanks.


SCJP 1.4 & 1.5, SCWCD 1.5. Learn and Let Learn.
Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
Thank You so Much... Your code helped me a lot...
Jetendra Ivaturi
Ranch Hand

Joined: Feb 08, 2007
Posts: 159
Good congrates.

Which app server are you using?
Damodar Mukherjee
Ranch Hand

Joined: Mar 20, 2007
Posts: 135
I am using Glassfish, The application is just in design phase. I wouls ask you one more question. Can you please suggest me how ho I communicate a a remote C++ application with J2EE Container with out using web Services?

Is Socket and XML is right choice? if right how can I fit all those things?

My front end is in jsp/Servlet, want the database to access trough EJB and My database is populated by a C++ application

Can you please help me...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communication between two EJB container