openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ritika Maheshwari (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-172) DSRA9250E: Operation setTransactionIsolation is not allowed during a global transaction for Shareable Connections.
Date Tue, 13 Mar 2007 21:21:09 GMT
 DSRA9250E: Operation setTransactionIsolation is not allowed during a global transaction for
Shareable Connections.
-------------------------------------------------------------------------------------------------------------------

                 Key: OPENJPA-172
                 URL: https://issues.apache.org/jira/browse/OPENJPA-172
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 0.9.6
         Environment: Websphere 6.1 for zos and DB2 zos V8
            Reporter: Ritika Maheshwari
             Fix For: 0.9.6


My persistence.xml looks like following

*******************************************************************************************************
<?xml version="1.0" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             version="1.0">
<persistence-unit name="dwtest" transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
   <non-jta-data-source>jdbc/ErwwDS</non-jta-data-source> 
       <class>ejb.jpa.test.Customer</class> 
        <class>ejb.jpa.test.District</class>
        <class>ejb.jpa.test.Warehouse</class>
        <class>ejb.jpa.test.History</class>
       <class>ejb.jpa.test.Item</class>
      <class>ejb.jpa.test.Neworders</class>
      <class>ejb.jpa.test.Orderline</class>
    <class>ejb.jpa.test.Orders</class>
      <class>ejb.jpa.test.Stock</class>
        <properties>
   	
 <property name="openjpa.LockManager" value="pessimistic"/>
<property name="openjpa.ReadLockLevel" value="read"/>
<property name="openjpa.WriteLockLevel" value="write"/>
<property name="openjpa.LockTimeout" value="30000"/>
 <property name="openjpa.FetchBatchSize" value="1" />
 <property name="openjpa.jdbc.TransactionIsolation" value="read-committed" /> 
  <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO,SQL=TRACE"/>
			
        </properties>
    </persistence-unit>
</persistence>
*******************************************************************************************************************
The Orderline entity looks like following

*************************************************************************************************

@Entity
@IdClass(ejb.jpa.test.OrderlineId.class)
@SequenceGenerator(name="mysequence",sequenceName="ORDER_ID")
public  class Orderline implements Serializable{
	
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="mysequence")
	java.lang.Integer ol_o_id =  null;
	@Id
	java.lang.String ol_d_id = null;
	@Id
	java.lang.String ol_w_id = null;
	@Id
	java.lang.Short ol_number = null;
	java.lang.String ol_i_id = null;
	java.sql.Timestamp ol_delivery_d = null;
	java.lang.String ol_supply_w_id = null;
	java.lang.Short ol_quantity = null;
	java.math.BigDecimal ol_amount = null;
	java.sql.Timestamp itime = null;
	java.lang.String ol_dist_info = null;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
	        @JoinColumn(name="ol_o_id", referencedColumnName="o_id"),
            @JoinColumn(name="ol_d_id", referencedColumnName="o_d_id"),
            @JoinColumn(name="ol_w_id", referencedColumnName="o_w_id")
   })
	 Orders orders = null;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumns({
	        @JoinColumn(name="ol_i_id", referencedColumnName="s_i_id"),
            @JoinColumn(name="ol_supply_w_id", referencedColumnName="s_w_id")
            
   })
	 Stock stock = null;

*************************************************************************************************************************
Now if I run the following client 

UserTransaction ut = null;
		ClientEJB  facade = null;
		EntityManager em = null;
		try {
		Hashtable parms = new Hashtable();
		parms.put(	Context.INITIAL_CONTEXT_FACTORY,
			"com.ibm.websphere.naming.WsnInitialContextFactory");
		InitialContext ctx = new InitialContext(parms);
		ut = (UserTransaction) ctx.lookup("java:comp/UserTransaction");         			            
        ut.begin();
		em = getFactory().createEntityManager (); 







-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message