• Post Reply Bookmark Topic Watch Topic
  • New Topic

Client and EJB Classes On Different Servers  RSS feed

 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to do some thing like:
EJB classes, jars are on a server. On the same network but on a different machine I have a Java Client. I need to connect the client to my EJBs but I am not allowed to keep any of the jars, classes on the Client side server. So I am not able to compile the client. Also even If I port its class file (compiled any where else), it won't run because of the unavailability of the EJB classes on the same machine. Is there any way to do it?
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vikinsa aggarwal:
Hi,
I am trying to do some thing like:
EJB classes, jars are on a server. On the same network but on a different machine I have a Java Client. I need to connect the client to my EJBs but I am not allowed to keep any of the jars, classes on the Client side server. So I am not able to compile the client. Also even If I port its class file (compiled any where else), it won't run because of the unavailability of the EJB classes on the same machine. Is there any way to do it?

your client should have access to the interfaces (remote and home) so you can create EJB's and work with them...
so, in my client jar I have a java file (with a main method), and the interfaces of the EJB's I need to access...
correct me if I'm wrong...
 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Andres!
But that only doesn't solve the problem. My client can not have access to the EJB remote or home physically. The only connection between 2 servers is that they are on the same Network. Is there a way for my client to know the location of the Remote and Home interfaces at the compile time over the network. My client has all the information like EJB Server port, JNDI etc.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vikinsa aggarwal:
Thanks Andres!
But that only doesn't solve the problem. My client can not have access to the EJB remote or home physically. The only connection between 2 servers is that they are on the same Network. Is there a way for my client to know the location of the Remote and Home interfaces at the compile time over the network. My client has all the information like EJB Server port, JNDI etc.

There is absolutely no way for you to connect from a client to an EJB server if your client cannot gain access to the appropriate JAR files containing the home and remote interfaces and the generated client stubs. Period, end of story.
Who came up with this requirement anyway? The only way for a client to work with a server without downloading code is with a browser/HTML based interface. It can't be done with an application client.
Kyle
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!