Starting the RMI Server  
Author Message
Mike





PostPosted: 2003-10-21 11:04:00 Top

java-programmer, Starting the RMI Server hi,

I have a class which tests to see if an rmi server is bound to the rmi
registry, if not it binds it and if the registry is not running it starts
one with
Process child = Runtime.getRuntime().exec("batch file").
then binds the server to the newly running registry
It does this in a while(true) with a break; when the server is bound to the
registry.
This class does what I want. I have now tried to convert this into a bean,
and have all of the variables and the get/set methods to access them via the
ide propery sheet. However, when I drop this onto a project the code runs
(straightaway in the ide forte & beanbox, without me compiling and running
the project I have dropped it into) - ie the while loop runs immediatly and
does not break; - it goes crazy and starts opening windows. What have I
done wrong - I don't think I have changed the code much since the standalone
calss (apart from the get/set methods, replacing strings with String vars) ?

The code which does all the work is in the default constructor (moved from
main in the original class). Does the ide instantiate the bean when dropped
from the palette onto a project? If so, how can I resolve the issue, if not
then why is the code running without me compiling/running the project?

I have also had trouble with the setSecurityManager(new
RMISecurityManager()) and have been tinkering with the polcy files to see if
that is fixable.

thanks

Mike


 
Mike





PostPosted: 2003-10-22 0:34:00 Top

java-programmer >> Starting the RMI Server I think there was something wrong with the skeleton and stubs, it seems to
be working now.

Mike

"Mike" <email***@***.com> wrote in message
news:mm1lb.4699$email***@***.com...
> hi,
>
> I have a class which tests to see if an rmi server is bound to the rmi
> registry, if not it binds it and if the registry is not running it starts
> one with
> Process child = Runtime.getRuntime().exec("batch file").
> then binds the server to the newly running registry
> It does this in a while(true) with a break; when the server is bound to
the
> registry.
> This class does what I want. I have now tried to convert this into a
bean,
> and have all of the variables and the get/set methods to access them via
the
> ide propery sheet. However, when I drop this onto a project the code runs
> (straightaway in the ide forte & beanbox, without me compiling and running
> the project I have dropped it into) - ie the while loop runs immediatly
and
> does not break; - it goes crazy and starts opening windows. What have I
> done wrong - I don't think I have changed the code much since the
standalone
> calss (apart from the get/set methods, replacing strings with String vars)
?
>
> The code which does all the work is in the default constructor (moved from
> main in the original class). Does the ide instantiate the bean when
dropped
> from the palette onto a project? If so, how can I resolve the issue, if
not
> then why is the code running without me compiling/running the project?
>
> I have also had trouble with the setSecurityManager(new
> RMISecurityManager()) and have been tinkering with the polcy files to see
if
> that is fixable.
>
> thanks
>
> Mike
>
>