• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

rmiregistry running in SCJD

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A user can specify port number
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic