You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Thomas Dudziak <to...@first.fhg.de> on 2004/06/27 11:59:51 UTC

Problem with new persistent field auto-proxy impl

Armin,

I've converted the old auto-proxy impl to the new schema, but the old 
persistent field base impl did provide some crucial functionality 
(computeField) that the new one does not, so it does not fully work. To 
be precise, the nested test in PersistentFieldTest fails.
Could you have a look ? I've added a TODO in line 159 where I didn't 
know exactly how to handle nested fields.

Tom

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


Re: Problem with new persistent field auto-proxy impl

Posted by Armin Waibel <ar...@apache.org>.
Add the privileged PF impl support. Order of checks is now

  protected Class[] persistentFieldClasses = new Class[]{
         PersistentFieldDirectAccessImplNew.class
         , PersistentFieldIntrospectorImplNew.class
         , PersistentFieldPrivilegedImplNew.class
         , PersistentFieldDynaBeanAccessImpl.class};

Think the order represents the performance of implementations.

Armin

Thomas Dudziak wrote:

> Armin Waibel wrote:
> 
>> Hi Tom,
>>
>> Thomas Dudziak wrote:
>>
>> I started with a new auto-proxy implementation too ;-)
>> Is in CVS now. This new version can easily be enhanced (in future or 
>> by user) by adding more PF classes.
> 
> 
> I think, the non-privileged vs. privileged check that I added to the old 
> impl, should be in the new impl, as well, because in environments with a 
> security manager in place (j2ee ?), you'll otherwise require bean 
> properties to be present (direct access will probably raise a security 
> exception).
> 
> Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

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


Re: Problem with new persistent field auto-proxy impl

Posted by Thomas Dudziak <to...@first.fhg.de>.
Armin Waibel wrote:

> Hi Tom,
> 
> Thomas Dudziak wrote:
> 
> I started with a new auto-proxy implementation too ;-)
> Is in CVS now. This new version can easily be enhanced (in future or by 
> user) by adding more PF classes.

I think, the non-privileged vs. privileged check that I added to the old 
impl, should be in the new impl, as well, because in environments with a 
security manager in place (j2ee ?), you'll otherwise require bean 
properties to be present (direct access will probably raise a security 
exception).

Tom

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


Re: Problem with new persistent field auto-proxy impl

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

Thomas Dudziak wrote:
> Armin,
> 
> I've converted the old auto-proxy impl to the new schema, but the old 
> persistent field base impl did provide some crucial functionality 
> (computeField) that the new one does not, so it does not fully work. To 
> be precise, the nested test in PersistentFieldTest fails.
> Could you have a look ? I've added a TODO in line 159 where I didn't 
> know exactly how to handle nested fields.
> 

I started with a new auto-proxy implementation too ;-)
Is in CVS now. This new version can easily be enhanced (in future or by 
user) by adding more PF classes.

Now only the DynaBean implementation rely on the 'old' classes. I never 
used DynaBeans before, but I will try to port this implementation too in 
near future.

=========================================
Field performance, set/get 30000 times a field
----------------------------------------
PersistentFieldDirectAccessImpl: getter=16 setter=16
PersistentFieldDirectAccessImplNew: getter=0 setter=16
PersistentFieldIntrospectorImpl: getter=16 setter=0
PersistentFieldIntrospectorImplNew: getter=0 setter=0
PersistentFieldPrivilegedImpl: getter=516 setter=469
PersistentFieldPrivilegedImplNew: getter=515 setter=485
PersistentFieldAutoProxyImpl: getter=0 setter=0
PersistentFieldAutoProxyImplNew: getter=0 setter=0
----------------------------------------
PersistentFieldDirectAccessImpl: getter=0 setter=0
PersistentFieldDirectAccessImplNew: getter=0 setter=0
PersistentFieldIntrospectorImpl: getter=0 setter=0
PersistentFieldIntrospectorImplNew: getter=0 setter=0
PersistentFieldPrivilegedImpl: getter=500 setter=484
PersistentFieldPrivilegedImplNew: getter=515 setter=469
PersistentFieldAutoProxyImpl: getter=0 setter=0
PersistentFieldAutoProxyImplNew: getter=0 setter=0
----------------------------------------
.
=========================================
Nested Field performance, set/get 30000 times a nested field
----------------------------------------
PersistentFieldDirectAccessImpl: nestedGetter=7640 nestedSetter=7500
PersistentFieldDirectAccessImplNew: nestedGetter=78 nestedSetter=157
PersistentFieldIntrospectorImpl: nestedGetter=7593 nestedSetter=8501
PersistentFieldIntrospectorImplNew: nestedGetter=94 nestedSetter=156
PersistentFieldPrivilegedImpl: nestedGetter=7485 nestedSetter=7515
PersistentFieldPrivilegedImplNew: nestedGetter=1500 nestedSetter=2578
PersistentFieldAutoProxyImpl: nestedGetter=7673 nestedSetter=7468
PersistentFieldAutoProxyImplNew: nestedGetter=78 nestedSetter=156
----------------------------------------
PersistentFieldDirectAccessImpl: nestedGetter=7500 nestedSetter=7468
PersistentFieldDirectAccessImplNew: nestedGetter=78 nestedSetter=172
PersistentFieldIntrospectorImpl: nestedGetter=7719 nestedSetter=7828
PersistentFieldIntrospectorImplNew: nestedGetter=79 nestedSetter=156
PersistentFieldPrivilegedImpl: nestedGetter=7609 nestedSetter=7923
PersistentFieldPrivilegedImplNew: nestedGetter=1532 nestedSetter=2626
PersistentFieldAutoProxyImpl: nestedGetter=8234 nestedSetter=7657
PersistentFieldAutoProxyImplNew: nestedGetter=78 nestedSetter=156
----------------------------------------

Time: 177,672

OK (2 tests)


Armin

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

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