db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Problem borrowing a connection from pool
Date Tue, 07 Jun 2005 08:28:50 GMT
Hi Martin,

Martin Kalén wrote:
> Martin Kalén wrote:
> 
>> You are running OJB in a JVM with a security policy. The security 
>> policy in
>> effect does not allow OJB to programmatically change the access level of
>> the ConnectionManager implementation's constructor.
>>
>> You will need to add something like this to your security policy:
>>
>>  permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
> 
> 
> Google reveals that other user's have been experiencing the same problem:
>     http://forum.java.sun.com/thread.jspa?messageID=3614844
> 
> ...and that this seems to be OJB regression between 1.0rc4 and 1.0.1
> 
> 
> ConnectionManagerImpl has a public constructor, why do we need to use
> setAccessible? IMO it is a bad OJB pattern to use setAccessible and
> allow non-public constructors to be accessed from
> ConfigurableFactory#createNewInstance.
> Any other developers care to comment on this on the dev-list?
> 
> I would say that ClassHelper methods using setAccessible(true) should
> be removed, unless there is very good reason or major refactor effort
> to prevent it.
>

+1 agree.
All pluggable components have to had public constructors, so there is no 
need to suppress the java security police like e.g. 
ConfigurableFactory#createNewInstance it does.

regards,
Armin


> Regards,
>  Martin
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message