Re: No Maven2 Best Practices?

2008-05-13 Thread Gegas
David Blevins wrote: > > > That's what I get for not testing it first :) Forgot a break > statement. Updated code at the bottom of this page: > http://cwiki.apache.org/OPENEJBx30/hibernate.html > > The technique is that the code first tries to find the OpenEJB > TransactionManagerLookup

Re: JNDI lookup NameNotFoundException

2008-05-13 Thread Bård Magnus Kvalheim
My little test was finally a success! For my setup I have (names abbreviated): *common.jar * This library have the Local and Remote interfaces *core.war* Collapsed war which implements Local and Remote interfaces and creates EJB3 bean *client.war* uses ejb beans configured through spring *Cla

Re: Enhancer annoyance

2008-05-13 Thread David Blevins
I wonder if what's going on is that the test case is getting it's hands on the Entity classes before we're loaded and able to tell OpenJPA that the classes need to be dynamically enhanced. OpenJPA's unenhanced support is ok, but not feature complete. One way to verify would be to split you

Re: Enhancer annoyance

2008-05-13 Thread Dain Sundstrom
If you switch to Java6 OpenJPA will use the dynamic class rewriting stuff in the Java6 vm when enhancing. It also doesn't need the javaagent arg, since in Java6 you can late start the agent. -dain On May 13, 2008, at 11:23 AM, JimOR wrote: I'm running into a mild annoyance running a juni

Re: CMP Example with field mapping file

2008-05-13 Thread Dain Sundstrom
Looking at the conversion code, we currently detect if the field has a pkgen strategy associated, and if so we set @GeneratedValue(strategy=IDENTITY) on the field. The code has a nice todo on it to add support for other JPA generation strategies, so if IDENTITY isn't what you want we shou

Re: CMP Example with field mapping file

2008-05-13 Thread David Blevins
Rick or Dain might be able to help better -- CMP is not really my thing -- but I'll give it a shot. As far as I understand from briefly chatting with Dain is that you need the bits to specify your primary key mapping. Our CMP container is written on JPA and the end goal is to allow these k

Enhancer annoyance

2008-05-13 Thread JimOR
I'm running into a mild annoyance running a junit test suite directly from within Eclipse. I have the -javaagent VM arg in my run configuration, and the problem does goes away if I run an ant task to call the enhancer directly prior to running my test suite. The problem is that access to any col

Re: No Maven2 Best Practices?

2008-05-13 Thread David Blevins
On May 13, 2008, at 4:38 AM, Gegas wrote: David Blevins wrote: Don't know why I didn't think of this before, but we could just add some support for checking and resetting that property if hibernate is your persistence provider. Not sure why they make you set it in the first place, they co

Re: JNDI lookup NameNotFoundException

2008-05-13 Thread David Blevins
On May 13, 2008, at 2:26 AM, Bård Magnus Kvalheim wrote: Hi David, thanks for you reply. My comments below... 2008/5/13 David Blevins <[EMAIL PROTECTED]>: On May 11, 2008, at 4:03 PM, Bård Magnus Kvalheim wrote: Hi, I'm new to ejb and just started experimenting with openejb tomcat plu

Re: OpenEJB - Datasource lookup problem

2008-05-13 Thread David Blevins
With a Resource declared as follows: JdbcDriver org.gjt.mysql.Driver JdbcUrl jdbc:mysql://localhost:3306/test_db UserName root Password 12345 jtamanaged true You could have it injected via: @Resource(name="MyDatasource") private DataSource ds; Or the non-a

CMP Example with field mapping file

2008-05-13 Thread SK Leung
I have created a CMP with Tomcat 6.x+OpenEJB 3.x+OracleXE. When the program is executed to create the object, the following error is shown. Caused by: java.lang.Exception: org.apache.openjpa.persistence.PersistenceException: Attempt to insert nul l into a non-nullable column: column: ID table: P

Re: No Maven2 Best Practices?

2008-05-13 Thread Gegas
David Blevins wrote: > > > Don't know why I didn't think of this before, but we could just add > some support for checking and resetting that property if hibernate is > your persistence provider. Not sure why they make you set it in the > first place, they could easily figure out which l

Re: JNDI lookup NameNotFoundException

2008-05-13 Thread Bård Magnus Kvalheim
Hi David, thanks for you reply. My comments below... 2008/5/13 David Blevins <[EMAIL PROTECTED]>: > > On May 11, 2008, at 4:03 PM, Bård Magnus Kvalheim wrote: > > Hi, > > > > I'm new to ejb and just started experimenting with openejb tomcat plugin > > Tomcat: 5.5.26 > > OpenEJB 3.0 > > > > > >