EJB3 Migration: Problem with CMRs

Hi.

We are trying to migrate a large project from EJB2 (using entity beans and xdoclet) to EJB3 (using JPA and POJOs).

IntelliJ converts all our fields and finders, but does not convert any CMRs. Is this a bug or do we have to add these in by hand (which would be a very big job!)?

Also, IntelliJ does not put in any database annotation attributes, such as "length" or "nullable" (as it would if we created the bean from scratch); is there an easy way to add these to an existing bean?

1 comment
Comment actions Permalink

Hello Robert,

Robert Lee wrote:

Hi.

We are trying to migrate a large project from EJB2 (using entity
beans and xdoclet) to EJB3 (using JPA and POJOs).

IntelliJ converts all our fields and finders, but does not convert
any CMRs. Is this a bug or do we have to add these in by hand (which
would be a very big job!)?


I cannot reproduce the problem.
All CMRs and CMPs from the ejb-jar.xml are converted if the "Replace
Entity Beans with CMP to Persistence Unit" checkbox is selected.

Also, IntelliJ does not put in any database annotation attributes,
such as "length" or "nullable" (as it would if we created the bean
from scratch); is there an easy way to add these to an existing bean?


Migration doesn't take into account vendor specific XMLs therefore
no database metadata is created.

You can use "Replace Text" in "regular expressions" mode to add some
missing attributes to existing annotations.

Regards,
Gregory Shrago

0

Please sign in to leave a comment.