Demystifying JINI: Non-Secure Server: Part 2

In Part 1, we had sieved through the example available on the JINI site and distilled the Rmi client server code to the bare minimum. But still, its far from production ready. Its not Spring-ified yet. Lets try to do that here. We will build this on top of Part 1.

Server

I need the following utility which can double up as a Spring bean, will do the export for me.

This is the main Spring configuration:

And, see how simple my main class has become, just loads the Spring file:

Client

The client is a bit tricky, as I need to lookup the remote service from the registry. In Spring’s nomenclature, this is nothing but a FactoryBean.

The Spring configuration is:

And this is the way we can use it.

Resources

The code can be found in GitHub, under the code/jini/unsecure/plain:

https://github.com/paawak/blog.git

 

One thought on “Demystifying JINI: Non-Secure Server: Part 2

Leave a Reply

Your email address will not be published. Required fields are marked *