You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by "Jaeger, Michael" <mi...@siemens.com> on 2009/03/31 14:45:32 UTC

Openjpa Slices Configuration

Hi,

The slices feature is very interesting, we tried it, but honestly did
not get far (in 1.2.0), we would like to ask some questions about it:

*) firsthand I was running into the error that was also reported in the
thread "Problems with configuring OpenJPA..." started by thiago ananias
(Aug 22nd). I applied the patch reported by ahsoni on (Sep 17th) and the
entire thing went further. However, I was not able to find a JIRA entry
for that issue - is there one?

*) then - when actually getting a first new EntityManeger - I got the
problem that I get an UnsupportedOperationException at
DistributedStoreManager.java:283, interesting stacktrace is
	at
org.apache.openjpa.slice.jdbc.DistributedStoreManager.getClientConnectio
n(DistributedStoreManager.java:283)
	at
org.apache.openjpa.kernel.DelegatingStoreManager.getClientConnection(Del
egatingStoreManager.java:159)
	at
org.apache.openjpa.kernel.BrokerImpl.getConnection(BrokerImpl.java:3697)
	at
org.apache.openjpa.kernel.DelegatingBroker.getConnection(DelegatingBroke
r.java:452)
	at
org.apache.openjpa.persistence.EntityManagerImpl.getConnection(EntityMan
agerImpl.java:1051)
tracking to the code is pretty straight forward until we got the
surprise that getClientConnection() is actually empty and only the
exception is thrown. I wondered if there would not be any slice handling
coming down this trace? Anyone a hint, what could be the reason when I
end up with DistributedStoreManager.getClientConnection()?

*) setting "openjpa.slice.TransactionPolicy" in section 4.6 of the
chapter 12 (still OpenJPA 1.2.0 docu) returns: "The configuration
property named "openjpa.slice.TransactionPolicy" was not recognized and
will be ignored, although the name closely matches a valid property
called "openjpa.slice.TransactionMode"." is there something wrong with
the property?

We are just interested in the slices-part of OpenJPA, so any information
about these issues would be welcome.

Thanks in advance,

	Michael

Re: Openjpa Slices Configuration

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  1. The connection issue reported by thiago/fixed by ahsoni -- is available on SVN revision 696512. You can verify if this change is included in the OpenJPA library in your environment by simply 
   $ java -jar your/path/to/openjpa-jar 
will print the (monotonic) version number included in the particular OpenJPA library. 
1.3.x or 2.x or trunk.

  2. Slice does not allow access to the underlying (virtual) distributed connection. Will you please explain the context/reasons you are requiring to access the underlying connection? 
 > Anyone a hint, what could be the reason when I end up with DistributedStoreManager.getClientConnection()?

  Most likely your code is calling OpenJPAEntityManager.getConnection().

  3. I will advise you to consider to move to OpenJPA 1.3.0 or 2.0 as there are several important improvements in Slice since 1.2.x release.




Hi,

The slices feature is very interesting, we tried it, but honestly did
not get far (in 1.2.0), we would like to ask some questions about it:

*) firsthand I was running into the error that was also reported in the
thread "Problems with configuring OpenJPA..." started by thiago ananias
(Aug 22nd). I applied the patch reported by ahsoni on (Sep 17th) and the
entire thing went further. However, I was not able to find a JIRA entry
for that issue - is there one?

*) then - when actually getting a first new EntityManeger - I got the
problem that I get an UnsupportedOperationException at
DistributedStoreManager.java:283, interesting stacktrace is
	at
org.apache.openjpa.slice.jdbc.DistributedStoreManager.getClientConnectio
n(DistributedStoreManager.java:283)
	at
org.apache.openjpa.kernel.DelegatingStoreManager.getClientConnection(Del
egatingStoreManager.java:159)
	at
org.apache.openjpa.kernel.BrokerImpl.getConnection(BrokerImpl.java:3697)
	at
org.apache.openjpa.kernel.DelegatingBroker.getConnection(DelegatingBroke
r.java:452)
	at
org.apache.openjpa.persistence.EntityManagerImpl.getConnection(EntityMan
agerImpl.java:1051)
tracking to the code is pretty straight forward until we got the
surprise that getClientConnection() is actually empty and only the
exception is thrown. I wondered if there would not be any slice handling
coming down this trace? Anyone a hint, what could be the reason when I
end up with DistributedStoreManager.getClientConnection()?

*) setting "openjpa.slice.TransactionPolicy" in section 4.6 of the
chapter 12 (still OpenJPA 1.2.0 docu) returns: "The configuration
property named "openjpa.slice.TransactionPolicy" was not recognized and
will be ignored, although the name closely matches a valid property
called "openjpa.slice.TransactionMode"." is there something wrong with
the property?

We are just interested in the slices-part of OpenJPA, so any information
about these issues would be welcome.

Thanks in advance,

	Michael




-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/Openjpa-Slices-Configuration-tp2562851p2563196.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.