Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rmiregistry running in SCJD

 
Manuel Gunkel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just managed to get RMI running for my SCJD assignment.

For that, rmiregistry must be run with a classpath pointing my classes.

My question:
- Can I rely that these two conditions are going to met when they evaluate the assignment?

-I didn't set java.rmi.server.codebase as it does not seem to be needed. Have you use it?

-I didn't use a security manager or a security file. I understand this is ok as the condition states " You must not require the installation of a security manager. "

-Another condition is "You must use RMI over JRMP (do not use IIOP)". What is that? Is JRMP used by default?

Thanks for the help!


Cheers,
Jungle

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

According to instructions:
Your programs must not require use of command line arguments other than the single mode flag, which must be supported.

So you can't set your classpath pointing to your classes in order to run.

And this link will answer your JRMP-question.

Please have a look at your private messages for an important administration message.

Kind regards,
Roel
 
Manuel Gunkel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The classpath is needed to be set from the environment rmiregistry runs, I have 0 control about it so I hope rmiregistry is running and pointing to my classes...


Btw, I just changed my name
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can start my application (server) without the need of any command line argument. It is a must requirement, you will fail if you violate such a requirement.

How do you create your RMI registry and how do you bind you server object in the RMI registry?

Manuel Gunkel wrote:Btw, I just changed my name



Kind regards,
Roel
 
Manuel Gunkel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel

I use these two lines to bind my server object in the rmiregistry:

Registry registry = LocateRegistry.getRegistry();
registry.rebind(RMI_OBJECT_NAME, dbClient);


Now I am assuming that rmiregistry exists. Should I use LocateRegitry.createRegistry to create a new one if it fails?

Thanks again for your help!
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manuel,

My code uses the createRegistry method:


Kind regards,
Roel
 
Manuel Gunkel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roel!

A related question: Do you allow the user to specify the port or is it ok to uses the default one?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A user can specify port number
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic