You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2008/01/06 19:02:10 UTC

Re: ejb-jar.xml to Annotations tool

Hi All,

Just wanted to give you an update on the plug-in work I've been doing. 
I've added another patch to OPENEJB-674 (many thanks to whoever applied 
the last patch. I've also attached a zip to the issue as I'm not sure if 
files I added made it into SVN last time.

With this patch, I think the plug-in will now generate most of the 
annotations for session and message driven beans. I'm hoping to use the 
plug-in to migrate the code at work (which doesn't have any entity 
beans) over to EJB 3 over the next week or so. I'll post with how I get on.

I've added some PDE tests, although I'm not completely sure how to get 
them to run from Maven, does anyone know how to do this?

I've also started working on generating annotations for Entity beans. 
The approach I've taken is to use the CmpJpaConversion class to get 
EntityMappings from both the ejb-jar.xml and openejb-jar.xml and using 
the EntityMappings structure to work out which annotations should be 
added to the entity bean classes. If I've understood it correctly, when 
an EJB 2 app is deployed, OpenEJB generates an intermediate orm.xml file 
that it passes to OpenJPA to handle the persistence, so I'm trying to do 
the same thing. Obviously, please let me know if you think I'm going 
about this the wrong way, or if I could be doing something better.

In terms of CMP beans, I guess we need to convert the CMP class into a 
regular class, I was thinking of just removing the abstract keyword, and 
turning them into very basic POJOs. I guess we'll also need to find some 
way of refactoring lookups to CMP beans to use the JPA EntityManager. 
Does anyone have any thoughts on this?

Sorry this has taken longer than I had hoped, I've been pretty busy with 
work lately.

Cheers


Jon

Re: ejb-jar.xml to Annotations tool

Posted by Jonathan Gallimore <jo...@gmail.com>.
Fantastic, many thanks Jacek.

Jon

Jacek Laskowski wrote:
> On Jan 6, 2008 7:02 PM, Jonathan Gallimore <jo...@gmail.com> wrote:
>
>   
>> Just wanted to give you an update on the plug-in work I've been doing.
>> I've added another patch to OPENEJB-674 (many thanks to whoever applied
>> the last patch. I've also attached a zip to the issue as I'm not sure if
>> files I added made it into SVN last time.
>>     
>
> The patch's committed. It built fine. I have not tried running it
> though. Will do it the next time a patch comes in.
>
> Jacek
>
>   


Re: ejb-jar.xml to Annotations tool

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On Jan 6, 2008 7:02 PM, Jonathan Gallimore <jo...@gmail.com> wrote:

> Just wanted to give you an update on the plug-in work I've been doing.
> I've added another patch to OPENEJB-674 (many thanks to whoever applied
> the last patch. I've also attached a zip to the issue as I'm not sure if
> files I added made it into SVN last time.

The patch's committed. It built fine. I have not tried running it
though. Will do it the next time a patch comes in.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl