hi,
i have an architecture in which my ejbs are deployed in the server in one location and the SWING Client in another location , my problem is that how to access the ejbs in the swing client location.
I want to know how to lookup the ejb in swing app.
thanks in advance
srini
-
ejb lookup in swing client (3 messages)
- Posted by: Sreenivasa Murthy
- Posted on: December 03 2001 05:34 EST
Threaded Messages (3)
- ejb lookup in swing client by Weston Aiken on December 03 2001 09:02 EST
- ejb lookup in swing client by Sreenivasa Murthy on December 04 2001 04:16 EST
- ejb lookup in swing client by Weston Aiken on December 04 2001 10:31 EST
- ejb lookup in swing client by Sreenivasa Murthy on December 04 2001 04:16 EST
-
ejb lookup in swing client[ Go to top ]
- Posted by: Weston Aiken
- Posted on: December 03 2001 09:02 EST
- in response to Sreenivasa Murthy
As long as you have the necessary client code in your classpath, then your swing client looks up the EJB just like any other client.
snippet:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"your factory class");
p.put(Context.PROVIDER_URL, "protocol://server:port");
Context ctx = new InitialContext(p);
Object ref = ctx.lookup("EJB JNDI name");
...narrow the object to the home interface
Hope this helps
-
ejb lookup in swing client[ Go to top ]
- Posted by: Sreenivasa Murthy
- Posted on: December 04 2001 04:16 EST
- in response to Weston Aiken
hi,
thanks for replying i know that we can do that way and can access the ejbs from the remote client...but my problem is that in the client side i need to store all the dependent class and weblogic.jar also...can u please tell the how can i implement so that i can have one jar file of my application and do with this architecture....
thanks for replying
srini -
ejb lookup in swing client[ Go to top ]
- Posted by: Weston Aiken
- Posted on: December 04 2001 10:31 EST
- in response to Sreenivasa Murthy
Well I think you have pretty much 2 chioces. You either need to have the client code for your EJB's on the client, or you can have the client download the implementation over the network. You should probably do some research at java.sun.com for doing that.
I obviously dont know what your app is doing, by I will say that needing the weblogic.jar on the client sounds pretty strange. You might want to revisit the design and maybe introduce a beter facade(Session Bean) for your clients, so they dont need welogic implemenentation to do their tasks.
Good luck...hope Ive shed some light.