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 Frédéric Trifiro <li...@trifiro.net> on 2003/08/12 10:16:43 UTC

Exception while inserting

Hi everyone,

My second mail to the list this morning :p !

Could anyone tell me how to catch an SQL error message while inserting a row in 
a table ? Whitch exception is concerned ?

Thanks, Frederic.

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


Re: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
The ones I know of:

OJB (Apache) (pre-release)
TJDO (SourceForge) (release)
Speedo (ObjectWeb) (pre-release)
JBossDO (JBoss) (pre-alpha)

-Brian

On Wednesday, August 13, 2003, at 09:44 AM, Alen Ribic wrote:

> Hmm, maybe TJDO @ SF. (Never looked into it...have fun...)
>
> ----- Original Message -----
> From: "Bruno Simon" <ls...@netra.com.br>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Wednesday, August 13, 2003 3:42 PM
> Subject: Re: JDO Enhancer Idea from JBoss
>
>
>> Except OJB !
>>
>> ----- Original Message -----
>> From: "Alen Ribic" <al...@mweb.co.za>
>> To: "OJB Developers List" <oj...@db.apache.org>
>> Sent: Wednesday, August 13, 2003 10:39 AM
>> Subject: Re: JDO Enhancer Idea from JBoss
>>
>>
>>> OJB 2 be ;)
>>>
>>> ----- Original Message -----
>>> From: "Bruno Simon" <ls...@netra.com.br>
>>> To: "OJB Developers List" <oj...@db.apache.org>
>>> Sent: Wednesday, August 13, 2003 3:23 PM
>>> Subject: JDO Enhancer Idea from JBoss
>>>
>>>
>>>>
>>>> Anybody know a free jdo implementation?
>>>>
>>>>
>>>>
>>>> Simon
>>>>
>>>>
>>>> -------------------------------------------------------------------- 
>>>> -
>>>> 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
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>



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


Re: JDO Enhancer Idea from JBoss

Posted by Alen Ribic <al...@mweb.co.za>.
Hmm, maybe TJDO @ SF. (Never looked into it...have fun...)

----- Original Message ----- 
From: "Bruno Simon" <ls...@netra.com.br>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Wednesday, August 13, 2003 3:42 PM
Subject: Re: JDO Enhancer Idea from JBoss


> Except OJB !
> 
> ----- Original Message ----- 
> From: "Alen Ribic" <al...@mweb.co.za>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Wednesday, August 13, 2003 10:39 AM
> Subject: Re: JDO Enhancer Idea from JBoss
> 
> 
> > OJB 2 be ;)
> > 
> > ----- Original Message ----- 
> > From: "Bruno Simon" <ls...@netra.com.br>
> > To: "OJB Developers List" <oj...@db.apache.org>
> > Sent: Wednesday, August 13, 2003 3:23 PM
> > Subject: JDO Enhancer Idea from JBoss
> > 
> > 
> > > 
> > > Anybody know a free jdo implementation?
> > > 
> > > 
> > > 
> > > Simon
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > 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
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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: JDO Enhancer Idea from JBoss

Posted by Bruno Simon <ls...@netra.com.br>.
Except OJB !

----- Original Message ----- 
From: "Alen Ribic" <al...@mweb.co.za>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Wednesday, August 13, 2003 10:39 AM
Subject: Re: JDO Enhancer Idea from JBoss


> OJB 2 be ;)
> 
> ----- Original Message ----- 
> From: "Bruno Simon" <ls...@netra.com.br>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Wednesday, August 13, 2003 3:23 PM
> Subject: JDO Enhancer Idea from JBoss
> 
> 
> > 
> > Anybody know a free jdo implementation?
> > 
> > 
> > 
> > Simon
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 


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


Re: JDO Enhancer Idea from JBoss

Posted by Alen Ribic <al...@mweb.co.za>.
OJB 2 be ;)

----- Original Message ----- 
From: "Bruno Simon" <ls...@netra.com.br>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Wednesday, August 13, 2003 3:23 PM
Subject: JDO Enhancer Idea from JBoss


> 
> Anybody know a free jdo implementation?
> 
> 
> 
> Simon
> 
> 
> ---------------------------------------------------------------------
> 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


JDO Enhancer Idea from JBoss

Posted by Bruno Simon <ls...@netra.com.br>.
Anybody know a free jdo implementation?



Simon


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


Re: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
> What are the rules around LGPL use anyway? ;)
>

iirc, we (well, ASF, not really "we" as I am not a member) can link to 
it if the ASF receives a specific ok from the copyright holder (which 
shouldn't be a problem for JBoss) but ASF cannot distribute it, 
regardless.

If we can avoid linking yet-another-external-library that would be a 
good thing, probably. Annoying sometimes, but a good thing.

-Brian



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


Re: JDO Enhancer Idea from JBoss

Posted by Alen Ribic <al...@mweb.co.za>.
I noticed that JBoss uses Javassist in their JDO enhancer.
License wise, I'm not to clued up in this department.
I didn't even know that Javassist was submitted to JBoss.
What are the rules around LGPL use anyway? ;)

--Alen



----- Original Message -----
From: "Brian McCallister" <mc...@forthillcompany.com>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Wednesday, August 13, 2003 3:07 PM
Subject: Re: JDO Enhancer Idea from JBoss


> Javassist looks good, concerns are license related. What are ASF rules
> regarding Mozilla Public License (MPL)? Right now Javassist is
> distributed as MPL and LGPL, but I suspect it will be LGPL only before
> long as it was just subsumed into JBoss.
>
> -Brian
>
> On Wednesday, August 13, 2003, at 07:03 AM, Alen Ribic wrote:
>
> > Javassist might be another lib to take a look at for bytecode level
> > manipulation.
> > http://www.csg.is.titech.ac.jp/~chiba/javassist/
> >
> > --Alen
> >
> >
> > ----- Original Message -----
> > From: "Brian McCallister" <mc...@forthillcompany.com>
> > To: "OJB Developers List" <oj...@db.apache.org>
> > Sent: Tuesday, August 12, 2003 4:25 PM
> > Subject: Re: JDO Enhancer Idea from JBoss
> >
> >
> >> Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do
> >> runtime bytecode enhancement! Need to look into this, even if we can't
> >> use it, the techniques it uses for enhancement could provide the
> >> insight into how to do what we want.
> >>
> >> -Brian
> >>
> >> On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:
> >>
> >>> I agree something like this would rock, but without having access to
> >>> pre-loaded bytecode you have to use some tricks that I don't think
> >>> Java actually supports (hmm, we could port all of J2EE to Ruby...)
> >>> such as wrapping a particular instance in a runtime subclass of
> >>> itself
> >>> in situ (easy in Ruby, impossible in Java).
> >>>
> >>> One thing that keeps coming to mind is how Aspect-ish JDO is, how
> >>> bytecode enhancement is the preferred means of implementing it, and
> >>> Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that
> >>> works via bytecode enhancement, as compared to AspectJ which is
> >>> sourcecode enhancement. It might be an easy way to build a bytecode
> >>> enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to
> >>> actually use it to make an official bytecode enhancer for OJB
> >>> (unfortunately).
> >>>
> >>> Will think about how to do runtime bytecode enhancement, but without
> >>> control over the classloader, I don't think it can be done.
> >>>
> >>> -Brian
> >>>
> >>> On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
> >>>
> >>>> Funny enough, I just had a discussion at our JUG about requirement
> >>>> for
> >>>> making things simplified for developers.
> >>>> And that was my main example. JBossDO deploy-time enhancer that I
> >>>> noticed
> >>>> recently. Very simple but very effective. Running a good facade for
> >>>> programmer interface to underling subsystems is very important from
> >>>> my point
> >>>> of view.
> >>>>
> >>>> I vote +1 for something like this for sure.
> >>>>
> >>>> 2c from me ;)
> >>>> --Alen
> >>>>
> >>>>
> >>>> ----- Original Message -----
> >>>> From: "Brian McCallister" <mc...@forthillcompany.com>
> >>>> To: "OJB Developers List" <oj...@db.apache.org>
> >>>> Sent: Tuesday, August 12, 2003 3:19 PM
> >>>> Subject: JDO Enhancer Idea from JBoss
> >>>>
> >>>>
> >>>>> JBoss did something very interesting with their recent JDO
> >>>>> announcement/release. They made it possible to do the enhancement
> >>>>> at
> >>>>> deployment time *by the container*. Apparently the container
> >>>>> enhances
> >>>>> the classes at deployment time if they are specified in the
> >>>>> descriptor
> >>>>> to be JDO's.
> >>>>>
> >>>>> I haven't looked into the details, but this seems like an awfully
> >>>>> convenient way to do it. As OJB doesn't provide a managed
> >>>>> environment
> >>>>> and have control over classloaders we couldn't do the same thing,
> >>>>> but
> >>>>> is quit interesting to see how they did it.
> >>>>>
> >>>>> -Brian
> >>>>>
> >>>>>
> >>>>>
> >>>>> -------------------------------------------------------------------
> >>>>> --
> >>>>> 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
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >>
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


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


Re: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
Javassist looks good, concerns are license related. What are ASF rules  
regarding Mozilla Public License (MPL)? Right now Javassist is  
distributed as MPL and LGPL, but I suspect it will be LGPL only before  
long as it was just subsumed into JBoss.

-Brian

On Wednesday, August 13, 2003, at 07:03 AM, Alen Ribic wrote:

> Javassist might be another lib to take a look at for bytecode level
> manipulation.
> http://www.csg.is.titech.ac.jp/~chiba/javassist/
>
> --Alen
>
>
> ----- Original Message -----
> From: "Brian McCallister" <mc...@forthillcompany.com>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Tuesday, August 12, 2003 4:25 PM
> Subject: Re: JDO Enhancer Idea from JBoss
>
>
>> Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do
>> runtime bytecode enhancement! Need to look into this, even if we can't
>> use it, the techniques it uses for enhancement could provide the
>> insight into how to do what we want.
>>
>> -Brian
>>
>> On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:
>>
>>> I agree something like this would rock, but without having access to
>>> pre-loaded bytecode you have to use some tricks that I don't think
>>> Java actually supports (hmm, we could port all of J2EE to Ruby...)
>>> such as wrapping a particular instance in a runtime subclass of  
>>> itself
>>> in situ (easy in Ruby, impossible in Java).
>>>
>>> One thing that keeps coming to mind is how Aspect-ish JDO is, how
>>> bytecode enhancement is the preferred means of implementing it, and
>>> Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that
>>> works via bytecode enhancement, as compared to AspectJ which is
>>> sourcecode enhancement. It might be an easy way to build a bytecode
>>> enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to
>>> actually use it to make an official bytecode enhancer for OJB
>>> (unfortunately).
>>>
>>> Will think about how to do runtime bytecode enhancement, but without
>>> control over the classloader, I don't think it can be done.
>>>
>>> -Brian
>>>
>>> On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
>>>
>>>> Funny enough, I just had a discussion at our JUG about requirement  
>>>> for
>>>> making things simplified for developers.
>>>> And that was my main example. JBossDO deploy-time enhancer that I
>>>> noticed
>>>> recently. Very simple but very effective. Running a good facade for
>>>> programmer interface to underling subsystems is very important from
>>>> my point
>>>> of view.
>>>>
>>>> I vote +1 for something like this for sure.
>>>>
>>>> 2c from me ;)
>>>> --Alen
>>>>
>>>>
>>>> ----- Original Message -----
>>>> From: "Brian McCallister" <mc...@forthillcompany.com>
>>>> To: "OJB Developers List" <oj...@db.apache.org>
>>>> Sent: Tuesday, August 12, 2003 3:19 PM
>>>> Subject: JDO Enhancer Idea from JBoss
>>>>
>>>>
>>>>> JBoss did something very interesting with their recent JDO
>>>>> announcement/release. They made it possible to do the enhancement  
>>>>> at
>>>>> deployment time *by the container*. Apparently the container  
>>>>> enhances
>>>>> the classes at deployment time if they are specified in the
>>>>> descriptor
>>>>> to be JDO's.
>>>>>
>>>>> I haven't looked into the details, but this seems like an awfully
>>>>> convenient way to do it. As OJB doesn't provide a managed  
>>>>> environment
>>>>> and have control over classloaders we couldn't do the same thing,  
>>>>> but
>>>>> is quit interesting to see how they did it.
>>>>>
>>>>> -Brian
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------- 
>>>>> --
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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: JDO Enhancer Idea from JBoss

Posted by Alen Ribic <al...@mweb.co.za>.
Javassist might be another lib to take a look at for bytecode level
manipulation.
http://www.csg.is.titech.ac.jp/~chiba/javassist/

--Alen


----- Original Message -----
From: "Brian McCallister" <mc...@forthillcompany.com>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Tuesday, August 12, 2003 4:25 PM
Subject: Re: JDO Enhancer Idea from JBoss


> Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do
> runtime bytecode enhancement! Need to look into this, even if we can't
> use it, the techniques it uses for enhancement could provide the
> insight into how to do what we want.
>
> -Brian
>
> On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:
>
> > I agree something like this would rock, but without having access to
> > pre-loaded bytecode you have to use some tricks that I don't think
> > Java actually supports (hmm, we could port all of J2EE to Ruby...)
> > such as wrapping a particular instance in a runtime subclass of itself
> > in situ (easy in Ruby, impossible in Java).
> >
> > One thing that keeps coming to mind is how Aspect-ish JDO is, how
> > bytecode enhancement is the preferred means of implementing it, and
> > Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that
> > works via bytecode enhancement, as compared to AspectJ which is
> > sourcecode enhancement. It might be an easy way to build a bytecode
> > enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to
> > actually use it to make an official bytecode enhancer for OJB
> > (unfortunately).
> >
> > Will think about how to do runtime bytecode enhancement, but without
> > control over the classloader, I don't think it can be done.
> >
> > -Brian
> >
> > On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
> >
> >> Funny enough, I just had a discussion at our JUG about requirement for
> >> making things simplified for developers.
> >> And that was my main example. JBossDO deploy-time enhancer that I
> >> noticed
> >> recently. Very simple but very effective. Running a good facade for
> >> programmer interface to underling subsystems is very important from
> >> my point
> >> of view.
> >>
> >> I vote +1 for something like this for sure.
> >>
> >> 2c from me ;)
> >> --Alen
> >>
> >>
> >> ----- Original Message -----
> >> From: "Brian McCallister" <mc...@forthillcompany.com>
> >> To: "OJB Developers List" <oj...@db.apache.org>
> >> Sent: Tuesday, August 12, 2003 3:19 PM
> >> Subject: JDO Enhancer Idea from JBoss
> >>
> >>
> >>> JBoss did something very interesting with their recent JDO
> >>> announcement/release. They made it possible to do the enhancement at
> >>> deployment time *by the container*. Apparently the container enhances
> >>> the classes at deployment time if they are specified in the
> >>> descriptor
> >>> to be JDO's.
> >>>
> >>> I haven't looked into the details, but this seems like an awfully
> >>> convenient way to do it. As OJB doesn't provide a managed environment
> >>> and have control over classloaders we couldn't do the same thing, but
> >>> is quit interesting to see how they did it.
> >>>
> >>> -Brian
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


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


Re: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
Yep, that is the problem. If you build your JDO impl around the desire  
to do runtime enhancement it is possible to implement the API in every  
way except the manager.makePeristent(object) where  ((object instanceof  
PersistenceCapable) == true ). You can fake it out by special casing /  
caching all of the "made persistent" objects in the manager and helper  
-- but this is ugly.

This will even work as long as you never try to cast the "made  
persistent" object to PersistenceCapable.

-Brian

On Tuesday, August 12, 2003, at 02:32 PM, Juozas Baliuka wrote:

> Hi,
> There is no way to implement JDO enhancement at runtime (it is  
> inpossible to
> undefine class or define two classes with the same name in the same  
> class
> loader), but you can do it at load time like Jboss doe's (this way  
> needs
> custom class loader).
> There is way to generate subclass at runtime, but it is not supported  
> by JDO
> spec. at this time , XORM and Hibernate use cglib for byte code
> enhancement at runtime, but this way can not be used to implement  
> "standard"
> JDO (runtime/dynamic code generation needs "factory" to create  
> instances and
> JDOImplHelper is not designed for JDO API user code)..
>
> ----- Original Message -----
> From: "Brian McCallister" <mc...@forthillcompany.com>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Tuesday, August 12, 2003 4:25 PM
> Subject: Re: JDO Enhancer Idea from JBoss
>
>
>> Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do
>> runtime bytecode enhancement! Need to look into this, even if we can't
>> use it, the techniques it uses for enhancement could provide the
>> insight into how to do what we want.
>>
>> -Brian
>>
>> On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:
>>
>>> I agree something like this would rock, but without having access to
>>> pre-loaded bytecode you have to use some tricks that I don't think
>>> Java actually supports (hmm, we could port all of J2EE to Ruby...)
>>> such as wrapping a particular instance in a runtime subclass of  
>>> itself
>>> in situ (easy in Ruby, impossible in Java).
>>>
>>> One thing that keeps coming to mind is how Aspect-ish JDO is, how
>>> bytecode enhancement is the preferred means of implementing it, and
>>> Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that
>>> works via bytecode enhancement, as compared to AspectJ which is
>>> sourcecode enhancement. It might be an easy way to build a bytecode
>>> enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to
>>> actually use it to make an official bytecode enhancer for OJB
>>> (unfortunately).
>>>
>>> Will think about how to do runtime bytecode enhancement, but without
>>> control over the classloader, I don't think it can be done.
>>>
>>> -Brian
>>>
>>> On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
>>>
>>>> Funny enough, I just had a discussion at our JUG about requirement  
>>>> for
>>>> making things simplified for developers.
>>>> And that was my main example. JBossDO deploy-time enhancer that I
>>>> noticed
>>>> recently. Very simple but very effective. Running a good facade for
>>>> programmer interface to underling subsystems is very important from
>>>> my point
>>>> of view.
>>>>
>>>> I vote +1 for something like this for sure.
>>>>
>>>> 2c from me ;)
>>>> --Alen
>>>>
>>>>
>>>> ----- Original Message -----
>>>> From: "Brian McCallister" <mc...@forthillcompany.com>
>>>> To: "OJB Developers List" <oj...@db.apache.org>
>>>> Sent: Tuesday, August 12, 2003 3:19 PM
>>>> Subject: JDO Enhancer Idea from JBoss
>>>>
>>>>
>>>>> JBoss did something very interesting with their recent JDO
>>>>> announcement/release. They made it possible to do the enhancement  
>>>>> at
>>>>> deployment time *by the container*. Apparently the container  
>>>>> enhances
>>>>> the classes at deployment time if they are specified in the
>>>>> descriptor
>>>>> to be JDO's.
>>>>>
>>>>> I haven't looked into the details, but this seems like an awfully
>>>>> convenient way to do it. As OJB doesn't provide a managed  
>>>>> environment
>>>>> and have control over classloaders we couldn't do the same thing,  
>>>>> but
>>>>> is quit interesting to see how they did it.
>>>>>
>>>>> -Brian
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------- 
>>>>> --
>>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>
>
> ---------------------------------------------------------------------
> 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: JDO Enhancer Idea from JBoss

Posted by Juozas Baliuka <ba...@mail.lt>.
Hi,
There is no way to implement JDO enhancement at runtime (it is inpossible to
undefine class or define two classes with the same name in the same class
loader), but you can do it at load time like Jboss doe's (this way needs
custom class loader).
There is way to generate subclass at runtime, but it is not supported by JDO
spec. at this time , XORM and Hibernate use cglib for byte code
enhancement at runtime, but this way can not be used to implement "standard"
JDO (runtime/dynamic code generation needs "factory" to create instances and
JDOImplHelper is not designed for JDO API user code)..

----- Original Message -----
From: "Brian McCallister" <mc...@forthillcompany.com>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Tuesday, August 12, 2003 4:25 PM
Subject: Re: JDO Enhancer Idea from JBoss


> Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do
> runtime bytecode enhancement! Need to look into this, even if we can't
> use it, the techniques it uses for enhancement could provide the
> insight into how to do what we want.
>
> -Brian
>
> On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:
>
> > I agree something like this would rock, but without having access to
> > pre-loaded bytecode you have to use some tricks that I don't think
> > Java actually supports (hmm, we could port all of J2EE to Ruby...)
> > such as wrapping a particular instance in a runtime subclass of itself
> > in situ (easy in Ruby, impossible in Java).
> >
> > One thing that keeps coming to mind is how Aspect-ish JDO is, how
> > bytecode enhancement is the preferred means of implementing it, and
> > Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that
> > works via bytecode enhancement, as compared to AspectJ which is
> > sourcecode enhancement. It might be an easy way to build a bytecode
> > enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to
> > actually use it to make an official bytecode enhancer for OJB
> > (unfortunately).
> >
> > Will think about how to do runtime bytecode enhancement, but without
> > control over the classloader, I don't think it can be done.
> >
> > -Brian
> >
> > On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
> >
> >> Funny enough, I just had a discussion at our JUG about requirement for
> >> making things simplified for developers.
> >> And that was my main example. JBossDO deploy-time enhancer that I
> >> noticed
> >> recently. Very simple but very effective. Running a good facade for
> >> programmer interface to underling subsystems is very important from
> >> my point
> >> of view.
> >>
> >> I vote +1 for something like this for sure.
> >>
> >> 2c from me ;)
> >> --Alen
> >>
> >>
> >> ----- Original Message -----
> >> From: "Brian McCallister" <mc...@forthillcompany.com>
> >> To: "OJB Developers List" <oj...@db.apache.org>
> >> Sent: Tuesday, August 12, 2003 3:19 PM
> >> Subject: JDO Enhancer Idea from JBoss
> >>
> >>
> >>> JBoss did something very interesting with their recent JDO
> >>> announcement/release. They made it possible to do the enhancement at
> >>> deployment time *by the container*. Apparently the container enhances
> >>> the classes at deployment time if they are specified in the
> >>> descriptor
> >>> to be JDO's.
> >>>
> >>> I haven't looked into the details, but this seems like an awfully
> >>> convenient way to do it. As OJB doesn't provide a managed environment
> >>> and have control over classloaders we couldn't do the same thing, but
> >>> is quit interesting to see how they did it.
> >>>
> >>> -Brian
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>


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


Re: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
Tilt, I misunderstood soemthing about Aspectwerkz - it *does* do 
runtime bytecode enhancement! Need to look into this, even if we can't 
use it, the techniques it uses for enhancement could provide the 
insight into how to do what we want.

-Brian

On Tuesday, August 12, 2003, at 10:22 AM, Brian McCallister wrote:

> I agree something like this would rock, but without having access to 
> pre-loaded bytecode you have to use some tricks that I don't think 
> Java actually supports (hmm, we could port all of J2EE to Ruby...) 
> such as wrapping a particular instance in a runtime subclass of itself 
> in situ (easy in Ruby, impossible in Java).
>
> One thing that keeps coming to mind is how Aspect-ish JDO is, how 
> bytecode enhancement is the preferred means of implementing it, and 
> Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that 
> works via bytecode enhancement, as compared to AspectJ which is 
> sourcecode enhancement. It might be an easy way to build a bytecode 
> enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to 
> actually use it to make an official bytecode enhancer for OJB 
> (unfortunately).
>
> Will think about how to do runtime bytecode enhancement, but without 
> control over the classloader, I don't think it can be done.
>
> -Brian
>
> On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:
>
>> Funny enough, I just had a discussion at our JUG about requirement for
>> making things simplified for developers.
>> And that was my main example. JBossDO deploy-time enhancer that I 
>> noticed
>> recently. Very simple but very effective. Running a good facade for
>> programmer interface to underling subsystems is very important from 
>> my point
>> of view.
>>
>> I vote +1 for something like this for sure.
>>
>> 2c from me ;)
>> --Alen
>>
>>
>> ----- Original Message -----
>> From: "Brian McCallister" <mc...@forthillcompany.com>
>> To: "OJB Developers List" <oj...@db.apache.org>
>> Sent: Tuesday, August 12, 2003 3:19 PM
>> Subject: JDO Enhancer Idea from JBoss
>>
>>
>>> JBoss did something very interesting with their recent JDO
>>> announcement/release. They made it possible to do the enhancement at
>>> deployment time *by the container*. Apparently the container enhances
>>> the classes at deployment time if they are specified in the 
>>> descriptor
>>> to be JDO's.
>>>
>>> I haven't looked into the details, but this seems like an awfully
>>> convenient way to do it. As OJB doesn't provide a managed environment
>>> and have control over classloaders we couldn't do the same thing, but
>>> is quit interesting to see how they did it.
>>>
>>> -Brian
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> ---------------------------------------------------------------------
> 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: JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
I agree something like this would rock, but without having access to 
pre-loaded bytecode you have to use some tricks that I don't think Java 
actually supports (hmm, we could port all of J2EE to Ruby...) such as 
wrapping a particular instance in a runtime subclass of itself in situ 
(easy in Ruby, impossible in Java).

One thing that keeps coming to mind is how Aspect-ish JDO is, how 
bytecode enhancement is the preferred means of implementing it, and 
Aspectwerkz, ( http://aspectwerkz.codehaus.org/ ) an aspect tool that 
works via bytecode enhancement, as compared to AspectJ which is 
sourcecode enhancement. It might be an easy way to build a bytecode 
enhancer, though as Aspectwerkz is LGPL, we wouldn't be able to 
actually use it to make an official bytecode enhancer for OJB 
(unfortunately).

Will think about how to do runtime bytecode enhancement, but without 
control over the classloader, I don't think it can be done.

-Brian

On Tuesday, August 12, 2003, at 09:32 AM, Alen Ribic wrote:

> Funny enough, I just had a discussion at our JUG about requirement for
> making things simplified for developers.
> And that was my main example. JBossDO deploy-time enhancer that I 
> noticed
> recently. Very simple but very effective. Running a good facade for
> programmer interface to underling subsystems is very important from my 
> point
> of view.
>
> I vote +1 for something like this for sure.
>
> 2c from me ;)
> --Alen
>
>
> ----- Original Message -----
> From: "Brian McCallister" <mc...@forthillcompany.com>
> To: "OJB Developers List" <oj...@db.apache.org>
> Sent: Tuesday, August 12, 2003 3:19 PM
> Subject: JDO Enhancer Idea from JBoss
>
>
>> JBoss did something very interesting with their recent JDO
>> announcement/release. They made it possible to do the enhancement at
>> deployment time *by the container*. Apparently the container enhances
>> the classes at deployment time if they are specified in the descriptor
>> to be JDO's.
>>
>> I haven't looked into the details, but this seems like an awfully
>> convenient way to do it. As OJB doesn't provide a managed environment
>> and have control over classloaders we couldn't do the same thing, but
>> is quit interesting to see how they did it.
>>
>> -Brian
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>



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


Re: JDO Enhancer Idea from JBoss

Posted by Alen Ribic <al...@mweb.co.za>.
Funny enough, I just had a discussion at our JUG about requirement for
making things simplified for developers.
And that was my main example. JBossDO deploy-time enhancer that I noticed
recently. Very simple but very effective. Running a good facade for
programmer interface to underling subsystems is very important from my point
of view.

I vote +1 for something like this for sure.

2c from me ;)
--Alen


----- Original Message -----
From: "Brian McCallister" <mc...@forthillcompany.com>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Tuesday, August 12, 2003 3:19 PM
Subject: JDO Enhancer Idea from JBoss


> JBoss did something very interesting with their recent JDO
> announcement/release. They made it possible to do the enhancement at
> deployment time *by the container*. Apparently the container enhances
> the classes at deployment time if they are specified in the descriptor
> to be JDO's.
>
> I haven't looked into the details, but this seems like an awfully
> convenient way to do it. As OJB doesn't provide a managed environment
> and have control over classloaders we couldn't do the same thing, but
> is quit interesting to see how they did it.
>
> -Brian
>
>
>
> ---------------------------------------------------------------------
> 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


JDO Enhancer Idea from JBoss

Posted by Brian McCallister <mc...@forthillcompany.com>.
JBoss did something very interesting with their recent JDO 
announcement/release. They made it possible to do the enhancement at 
deployment time *by the container*. Apparently the container enhances 
the classes at deployment time if they are specified in the descriptor 
to be JDO's.

I haven't looked into the details, but this seems like an awfully 
convenient way to do it. As OJB doesn't provide a managed environment 
and have control over classloaders we couldn't do the same thing, but 
is quit interesting to see how they did it.

-Brian



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