• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI/RMI design problem

 
Dirk Schnelle
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have the following task to solve:

A client communicates via JNDI with a server. He uses the interface:

}

RMI is used as an layer underneath to enable remote method calls.
This means, a pure RMI implementation is used, invisble for users of
Access. Here, the following interfaceis used:



This means that I have to write Stub- and Skeleton-classes for RemoteAccess to handle the wrapping.

This works, but it does not look nice.

I have the following problems to solve:
1. All Stubs and Skeletons have to be written manually
2. RemoteAccess and Access have to be synced manually.

Any suggestions for improvement?

I cannot expect a JNDI naming server like JBOSS. I can start the RMI registry in my program and get support for the JNDI support by the JDK.

/dirk
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about storing something like this in JNDI?

This is only 2.) manually... stubs and skeletons are generated as usual.


[ April 21, 2006: Message edited by: Nathan Pruett ]
 
Dirk Schnelle
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer, but I think you misunderstood my problem.Maybe, I was not clear enough.

Your RemoteAccessHider is exactly the thing I called Stub. My terminology could obviously be confused with the RMI stub and skeleton.

My Skeleton is a delegate to the real API.

This is not my problem. I am looking for a more elegant way to synchronize the RemoteAccess interface and the Access interface.

Hope this is more clear now. Drop me a note if this is still not clear.

/dirk
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - sorry - I was thinking the stub and skeleton were the ones being generated by RMI.

You might be able to use something like XDoclet to generate your own custom Stub/Skeleton classes. I'm not sure how many of these you need to make, though - it would probably be overkill to customize something like XDoclet if you only need to make a few.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!