users@glassfish.java.net

Re: how to run load balancing for RMI server on glassfish?

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 Jan 2009 04:56:26 PST

I don't really understand what you are trying. I don't understand the RMI Server part of it.

So some questions:
1. Do you have an EJB remote interface and an implementing bean? The bean contains the server part of your application, which can communicate with a datasource on the server.

2. Are you deploying this bean to the glassfish server. Do you package it as ear?

3. Did you create a client for your service and is it packaged seperate with an manifest.mf containing a main-class entry?

OR
4. did you create a stand-alone application containing an RMI-server?
   4a. Do you start the rmiregistry from commandline
   4b. in your code do you export an rmi object
   4c. in you code do you register the object with a rmiregistry
5. Did you create a client that must communicate with your rmiserver?

What I do understand from your posting is that you have created a rmi-server containig you business logic and a client which must talk with that server. If that is the case, don't look at glassfish. If you put you businesslogic in an ejb, and deploy this on glassfish, then glassfish acts as your rmiserver, which you don't need then.

If you try to understand rmi create your rmiserver and client and start both from commandline. If you want to understand J2EE create an EJB and application client and deploy it on glassfish. Mixing both is very confusing.
[Message sent by forum member 'jcstover' (jcstover)]

http://forums.java.net/jive/thread.jspa?messageID=326198