You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "DiCorpo, Phillip" <ph...@vontu.com> on 2006/01/11 21:03:50 UTC

Configurable interface for LockManagers

I've created my own LockManager implementation for OJB 1.0.4 that
implements the Configurable interface and I've added some of the
properties this implementation needs to the OJB.properties file.  By
doing so I was hoping that my LockManager would be configured at some
point, like in the LockManagerFactory, but it doesn't seem to be
happening and I can't find any evidence of it happening in the source.
Am I missing something?  In the meantime I'm explicitly getting the
OjbConfigurator and configuring the LockManager in it's default
constructor.  How is this working for LockManagerRemoteImpl?   Thanks in
advance,
 
--Phil
 

Re: Configurable interface for LockManagers

Posted by Armin Waibel <ar...@apache.org>.
Hi Bruno,

Bruno CROS wrote:
> Hello,
> 
> While waiting for the 1.0.5 release, which files should i get in CVS to
> get LockManagerRemoteImpl work?
> 

Try to check out ...odmg.locking.LockManagerFactory from SVN 
(OJB_1_0_RELEASE branch) or copy code from
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/locking/LockManagerFactory.java?view=markup

I'm not sure if this is backward compatible with 1.0.4 - give it a try. 
Then all user defined LockManager implementations should be initialized.

A howto about using LockManagerRemoteImpl can be found here
http://db.apache.org/ojb/docu/guides/lockmanager.html#Locking+in+distributed+environment

regards,
Armin

> Thanks Armin
> 
> 
> 
> 
> 
> 
> On 1/28/06, Armin Waibel <ar...@apache.org> wrote:
>>
>> Hi,
>>
>> is fixed in SVN and will be included in upcoming 1.0.5 maintenance
>> release.
>>
>> regards,
>> Armin
>>
>> Armin Waibel wrote:
>> > Armin Waibel wrote:
>> >> A workaround will be to configure once LockManagerRemoteImpl by hand
>> >> before the first use of odmg-api:
>> >>
>> >> LockManager lm = LockManagerFactory.getLockManager();
>> >> if(lm instanceof Configurable)
>> >> {
>> >> Configurator configurator = OjbConfigurator.getInstance();
>> >> configurator.configure((LockManager)lm);
>> >> }
>> >>
>> >
>> > Sorry this doesn't work, because the LockManagerFactory always wraps
>> > LockManager instances with LockManagerOdmgImpl.
>> >
>> > I try to fix the LockManagerFactory bug till tomorrow - stay tuned.
>> >
>> > regards,
>> > Armin
>> >
>> >
>> >
>> >> HTH
>> >> regards,
>> >> Armin
>> >>
>> >>
>> >>>
>> >>> --Phil
>> >>>
>> >>>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> >> For additional commands, e-mail: ojb-user-help@db.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> > For additional commands, e-mail: ojb-user-help@db.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Configurable interface for LockManagers

Posted by Bruno CROS <br...@gmail.com>.
Hello,

While waiting for the 1.0.5 release, which files should i get in CVS to
get LockManagerRemoteImpl work?

Thanks Armin






On 1/28/06, Armin Waibel <ar...@apache.org> wrote:
>
> Hi,
>
> is fixed in SVN and will be included in upcoming 1.0.5 maintenance
> release.
>
> regards,
> Armin
>
> Armin Waibel wrote:
> > Armin Waibel wrote:
> >> A workaround will be to configure once LockManagerRemoteImpl by hand
> >> before the first use of odmg-api:
> >>
> >> LockManager lm = LockManagerFactory.getLockManager();
> >> if(lm instanceof Configurable)
> >> {
> >> Configurator configurator = OjbConfigurator.getInstance();
> >> configurator.configure((LockManager)lm);
> >> }
> >>
> >
> > Sorry this doesn't work, because the LockManagerFactory always wraps
> > LockManager instances with LockManagerOdmgImpl.
> >
> > I try to fix the LockManagerFactory bug till tomorrow - stay tuned.
> >
> > regards,
> > Armin
> >
> >
> >
> >> HTH
> >> regards,
> >> Armin
> >>
> >>
> >>>
> >>> --Phil
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail: ojb-user-help@db.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>

Re: Configurable interface for LockManagers

Posted by Armin Waibel <ar...@apache.org>.
Hi,

is fixed in SVN and will be included in upcoming 1.0.5 maintenance release.

regards,
Armin

Armin Waibel wrote:
> Armin Waibel wrote:
>> A workaround will be to configure once LockManagerRemoteImpl by hand 
>> before the first use of odmg-api:
>>
>> LockManager lm = LockManagerFactory.getLockManager();
>> if(lm instanceof Configurable)
>> {
>> Configurator configurator = OjbConfigurator.getInstance();
>> configurator.configure((LockManager)lm);
>> }
>>
> 
> Sorry this doesn't work, because the LockManagerFactory always wraps 
> LockManager instances with LockManagerOdmgImpl.
> 
> I try to fix the LockManagerFactory bug till tomorrow - stay tuned.
> 
> regards,
> Armin
> 
> 
> 
>> HTH
>> regards,
>> Armin
>>
>>
>>>  
>>> --Phil
>>>  
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Configurable interface for LockManagers

Posted by Armin Waibel <ar...@apache.org>.
Armin Waibel wrote:
> A workaround will be to configure once LockManagerRemoteImpl by hand 
> before the first use of odmg-api:
> 
> LockManager lm = LockManagerFactory.getLockManager();
> if(lm instanceof Configurable)
> {
> Configurator configurator = OjbConfigurator.getInstance();
> configurator.configure((LockManager)lm);
> }
>

Sorry this doesn't work, because the LockManagerFactory always wraps 
LockManager instances with LockManagerOdmgImpl.

I try to fix the LockManagerFactory bug till tomorrow - stay tuned.

regards,
Armin



> HTH
> regards,
> Armin
> 
> 
>>  
>> --Phil
>>  
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Configurable interface for LockManagers

Posted by Armin Waibel <ar...@apache.org>.
Hi Phil,

DiCorpo, Phillip wrote:
> I've created my own LockManager implementation for OJB 1.0.4 that
> implements the Configurable interface and I've added some of the
> properties this implementation needs to the OJB.properties file.  By
> doing so I was hoping that my LockManager would be configured at some
> point, like in the LockManagerFactory, but it doesn't seem to be
> happening and I can't find any evidence of it happening in the source.
> Am I missing something?

This is a bug, the LockManagerFactory doesn't configure the LockManager 
instance - will fix this ASAP.

>  In the meantime I'm explicitly getting the
> OjbConfigurator and configuring the LockManager in it's default
> constructor.  How is this working for LockManagerRemoteImpl?   Thanks in
> advance,

A workaround will be to configure once LockManagerRemoteImpl by hand 
before the first use of odmg-api:

LockManager lm = LockManagerFactory.getLockManager();
if(lm instanceof Configurable)
{
Configurator configurator = OjbConfigurator.getInstance();
configurator.configure((LockManager)lm);
}

HTH
regards,
Armin


>  
> --Phil
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org