1) For my clients who are now just instantiating a UPAWrapper, how will this change their implementation? Will they now need to call the UPAWrapperFactory to get the UPAWrapper (or actually the LocalUPAWrapperImpl)?
2) Who should make the decision on whether the UPAWrapperFactory returns a LocalUPAWrapperImpl or a UPAWrapperDelagate, my application or the client? I'm assuming it should be my application. If so, how do I determine if they need the LocalUPAWrapperImpl or the UPAWrapperDelagate? In my situation any client calling from the server where the RMI Server will be running will be local and any client not calling from this server will be remote, but how do I implement this logic in code?
Here's another question not directly related to our evolving solution. A colleague of mine utilizing RMI for a similar solution advocates using a "SessionController" which dynamically binds a new RMI server to the registry everytime a request is made to his application. The client then makes a request to this dynamically bound server. According to him this guarantees that there will be no concurrency problems if multiple clients are requesting his RMI application simultaneously. What are you thoughts on this implementation and how does it affect our evolving solution?
I guess the basic question is when 2 or more clients make a request from the RMI server for a remote object do they receive a reference to a common instantiation of the object or do they receive references to unique instantiations of the object??
Is there a way to determine from the my RMI Server (SessionController) whether a client is still using a reference to one of the sessions?
1) How do I programmatically (from my object pool) determine if the unreferenced() method has been called for a particular remote object?
2) If it's true I can't bind it to the registry how do I make it available for remote access? It seems like it's not very useful if you can't bind it to the rmiregistry.
Originally posted by Nilesh Pereira:
Well, you won't need to bind the individual instances of RemoteUPAWrapper to the registry. You will need to make the SessionController a Remote object, and bind it to the registry. The factory will then only lookup the SessionController, and the SessionController will return a RemoteUPAWrapper reference from the available pool.
Originally posted by Nilesh Pereira:
Right. And if you add thread pooling and transaction support you will have implemented an EJB 1.0 container! Are you sure this solution is not an overkill for your problem? Could you not just make your object a Stateful Session EJB and use an off-the-shelf EJB container? I must admit, though, that this would be fun to implement yourself...
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|