You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2011/03/21 23:09:10 UTC

Revision 652176 and RMI Container

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


Re: Revision 652176 and RMI Container

Posted by Jacques Le Roux <jl...@les7arts.com>.
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 



Re: Revision 652176 and RMI Container

Posted by Adrian Crum <ad...@sandglass-software.com>.
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
>