Revision 652176 and RMI Container

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Revision 652176 and RMI Container

Adrian Crum-3
ContainerLoader.java is not thread-safe and it also contains some
questionable code. I would like to clean it up a little, but the changes
in rev 652176 are puzzling and it isn't clear what was intended.

In the current code, the static loadContainers method checks to see if a
ContainerLoader instance was already loaded. If not, it creates an
instance and returns an rmi-dispatcher container if one was loaded. If a
ContainerLoader instance was not loaded already, the method returns
null. It seems to me, if an instance of ContainerLoader was already
loaded you would want to return the rmi-dispatcher instance, and not null.

Any help or insight would be appreciated.

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Revision 652176 and RMI Container

Adrian Crum-3
Oops, part of that description was worded backwards. It should say:

In the current code, the static loadContainers method checks to see if a
ContainerLoader instance was already loaded. If not, it creates an
instance and returns an rmi-dispatcher container if one was loaded. If a
ContainerLoader instance was loaded already, the method returns null. It
seems to me, if an instance of ContainerLoader was already loaded you
would want to return the rmi-dispatcher container instance, and not null.

-Adrian

On 3/21/2011 3:09 PM, Adrian Crum wrote:

> ContainerLoader.java is not thread-safe and it also contains some
> questionable code. I would like to clean it up a little, but the
> changes in rev 652176 are puzzling and it isn't clear what was intended.
>
> In the current code, the static loadContainers method checks to see if
> a ContainerLoader instance was already loaded. If not, it creates an
> instance and returns an rmi-dispatcher container if one was loaded. If
> a ContainerLoader instance was not loaded already, the method returns
> null. It seems to me, if an instance of ContainerLoader was already
> loaded you would want to return the rmi-dispatcher instance, and not
> null.
>
> Any help or insight would be appreciated.
>
> -Adrian
>
Reply | Threaded
Open this post in threaded view
|

Re: Revision 652176 and RMI Container

Jacques Le Roux-3
Hi Adrian,

Yes, this was introduced for Geronimo. We will see if  the company who asked me that will ever find an issue. Else I don't think
there is much interest about Geronimo in OFBiz community

Jacques

Adrian Crum wrote:

> Oops, part of that description was worded backwards. It should say:
>
> In the current code, the static loadContainers method checks to see if a
> ContainerLoader instance was already loaded. If not, it creates an
> instance and returns an rmi-dispatcher container if one was loaded. If a
> ContainerLoader instance was loaded already, the method returns null. It
> seems to me, if an instance of ContainerLoader was already loaded you
> would want to return the rmi-dispatcher container instance, and not null.
>
> -Adrian
>
> On 3/21/2011 3:09 PM, Adrian Crum wrote:
>> ContainerLoader.java is not thread-safe and it also contains some
>> questionable code. I would like to clean it up a little, but the
>> changes in rev 652176 are puzzling and it isn't clear what was intended.
>>
>> In the current code, the static loadContainers method checks to see if
>> a ContainerLoader instance was already loaded. If not, it creates an
>> instance and returns an rmi-dispatcher container if one was loaded. If
>> a ContainerLoader instance was not loaded already, the method returns
>> null. It seems to me, if an instance of ContainerLoader was already
>> loaded you would want to return the rmi-dispatcher instance, and not
>> null.
>>
>> Any help or insight would be appreciated.
>>
>> -Adrian