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 Rice Yeh <ri...@yahoo.com> on 2003/06/19 12:09:31 UTC

suggestion on ClassHelper

Hi,
  When I read OJB source code, I find a ClassHelper
class, but it seems that its usage seems not wide.
What I mean is that there are many codes in OJB doing
object instantation do not use it but have their own.
There are ways to instantiate a new object in java.
The simplest one is Class.newInstance(). On the other
hand, we may first get a constructor and then set its
access flag to true and then invoke it to let private
constructor can be used (hence object model not
instrumented for ojb). I think the latter way seems
the best. However, ClassHelper itself have both these
two ways (but without setting access flag). Could it
be changed to be one way and the latter one?

  Maybe OJB developers have their own considerations. 

Regards,
Rice


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Re: suggestion on ClassHelper

Posted by Alexander Prozor <ap...@isd.dp.ua>.
Hi,
maybe you could provide the way to use our own ClassHelper.
We've created our persistent classes at runtime (and change DB and OJB
repository at runtime too). and there is no good way to say OJB to
take classes that has been changed. ( ClassLoader cashes classes after
first creating ).

RY> Hi,
RY>   When I read OJB source code, I find a ClassHelper
RY> class, but it seems that its usage seems not wide.
RY> What I mean is that there are many codes in OJB doing
RY> object instantation do not use it but have their own.
RY> There are ways to instantiate a new object in java.
RY> The simplest one is Class.newInstance(). On the other
RY> hand, we may first get a constructor and then set its
RY> access flag to true and then invoke it to let private
RY> constructor can be used (hence object model not
RY> instrumented for ojb). I think the latter way seems
RY> the best. However, ClassHelper itself have both these
RY> two ways (but without setting access flag). Could it
RY> be changed to be one way and the latter one?

RY>   Maybe OJB developers have their own considerations. 



-- 
Best regards,
 Alexander                            mailto:apro@isd.dp.ua