Re: OpenJPA in XA-JTA environment

2008-02-12 Thread Pinaki Poddar
As you are managing the JTA transaction directly in code, the EntityManager must join the transaction manager as a resource. The way to do this is via EntityManager.joinTransaction(). So, this should work: txManager.begin(); manager.joinTransaction(); manager.persist(new Message("My name is" +

Re: OpenJPA in XA-JTA environment

2008-02-12 Thread xenHalfLife
Hi, Well it reports error when using managed DataSource and using manager to manage transactions, saying that one cant use EntityManager to manage transactions when configured to use JTA transactions. Also accoring to JTA spec, one has to use TransactionManager API for XA. Have tried that earlie

Re: Re: Can't weave entity in Spring

2008-02-12 Thread cobbra
That's good to know. If it comes down to it, I may just load up the source for both frameworks and trace through it to see what may/could be happening. On second thought, that's probably not a bad way for me to get a better understanding of what is happening "under the covers". Thanks again!

Re: OpenJPA in XA-JTA environment

2008-02-12 Thread Pinaki Poddar
Hi, The code should begin() and commit() transaction on EntityManager, not on the TransactionManager. Instead of: txManager.begin(); manager.persist(new Message("My name is" + System.currentTimeMillis())); txManager.commit(); Try: manager.getTransaction().begin(

Re: Re: Can't weave entity in Spring

2008-02-12 Thread Patrick Linskey
> Thanks for the feedback. I'll pass this back along to the Spring folks. I > thought I had to have > all of my Spring related issues handled, thus, thought it was an OpenJPA > issue (due to where > the error was stemming from). Sounds good. FTR, I expect that there is some sort of interplay be

Re: Re: Can't weave entity in Spring

2008-02-12 Thread cobbra
Patrick, Thanks for the feedback. I'll pass this back along to the Spring folks. I thought I had to have all of my Spring related issues handled, thus, thought it was an OpenJPA issue (due to where the error was stemming from). Thanks! Randy > > From: "Patrick Linskey" <[EMAIL PROTECTED]> >

Re: Can't weave entity in Spring

2008-02-12 Thread Patrick Linskey
Hi, I'm guessing that the ReflectiveLoadTimeWeaver is causing some sort of classloader-hierarchy problems, such that when OpenJPA analyzes your fields that use native Java types, the type comparison logic fails. This is the second time I've seen this sort of issue, but sadly I'm not a Spring load-

Re: BigDecimal being stored as FLOAT(32) rather than NUMERIC

2008-02-12 Thread Michael Dick
I don't think this is the same issue as OPENJPA-213, which has to do with the @Column annotation. Rather this is an issue with the SQLServer DB dictionary. That being said you can add the following property in persistence.xml to workaround the problem : DoubleTypeName can be set to a

Can't weave entity in Spring

2008-02-12 Thread cobbra
No one has any ideas or feedback? > > From: <[EMAIL PROTECTED]> > Date: 2008/02/11 Mon AM 09:35:30 CST > To: > Subject: Can't weave entity in Spring > > Hello all, > > I'm having a small problem with entities while deploying OpenJPA 1.0.1 on a > Spring 2.5.1 based Tomcat 6 server using an emb

OpenJPA in XA-JTA environment

2008-02-12 Thread xenHalfLife
Hello all, I am trying yo setup OpenJPA in JTA-XA standalone, non-managed environment, no application server. Using MySQL 5, Bitronix transaction manager and OpenJPA 1.0.1. In main method is following code: ApplicationContext context =