Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / July 2003

Tip: Looking for answers? Try searching our database.

Client for EJB

Thread view: 
Marc Weidner - 23 Jul 2003 02:06 GMT
Hello,

I want to write a client which can access an EJB.

The problem is, that this client should only get a XML-document with
information about the EJB and should access the EJB with the information of
the XML-Document. Any needed interfaces or jar-files should also only
transported to the client in the XML-file.

Is that possible and knows anyone an example where I can get more
information?

With kind regards

Marc Weidner
Christopher Blunck - 25 Jul 2003 06:13 GMT
> I want to write a client which can access an EJB.
That's easy.  :)

> The problem is, that this client should only get a XML-document with
> information about the EJB and should access the EJB with the information of
> the XML-Document. Any needed interfaces or jar-files should also only
> transported to the client in the XML-file.
That's hard.  :)

The only thing I could imagine you doing would be to transport the
bytecode files base64 encoded in an xml message from the server to the
client.  The client could then parse the xml message, determine JNDI
names, class names, etc, and then (using a custom classloader)
dynamically load the extracted client stub sent in the xml message,
narrow it, and return it to the caller.

Since the caller doesn't know the interface until runtime, the caller
is going to have to rely on reflection to load methods and execute
them.  This is going to be messy any way you cut it, if you use Java.

You might want to consider looking into a system whereby you expose
your server side ejbs via CORBA and use python to bind to them on the
client side.  This of course is a huge programming shift, but python
is a more dynamic language that's perfect for this kind of thing.

-c


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.