Re: [VOTE] change primary key value?

2007-02-20 Thread roger.keays

Hi Craig,

Thanks for the reply.

Craig L Russell wrote:
> 
>> Is there a way to change the primary key of an entity in OpenJPA? The
>> expection below doesn't fill me with hope...
> 
> The JPA specification 2.1.4 says that the application must not change  
> the value of a primary key, but the specific behavior is not defined.  
> So OpenJPA is spec compliant.
> 
That's what I was worried about. Actually, I was able to implement the
behaviour I needed by using a bulk UPDATE to change the key, and making sure
the foreign keys were set up correctly (i.e. CASCADE). I guess that being
able to do this is technically a bug in OpenJPA, but please don't fix it!


> That said, there are cases I've seen where changing a primary key is  
> useful. So I would not oppose a proposal to add the feature to OpenJPA.
> 
> By the way, JDO doesn't prohibit it; there is a specific optional  
> feature to allow this. But an implementation has to choose to support  
> it.
> 
Adding it to OpenJPA would be a nice start, although adding it to the JPA
spec would be better (along with the rest of the JDO 2.0 that is!)

Cheers,

Roger

>
>  <4|false|0.9.6-incubating>
> org.apache.openjpa.persistence.InvalidStateException: Attempt to  
> change a
> primary key field of an instance that already has a final object  
> id. Only
> new, unflushed instances whose id you have not retrieved can have  
> their
> primary keys changed. FailedObject:
> [EMAIL PROTECTED]
>
>
> org.apache.openjpa.kernel.StateManagerImpl.assertNoPrimaryKeyChange 
> (StateManagerImpl.java:1819)
>
> org.apache.openjpa.kernel.StateManagerImpl.settingStringField 
> (StateManagerImpl.java:1800)
> figbird.lists.entities.Email.pcSetemail(Email.java)
> figbird.lists.entities.Email.setEmail(Email.java:36)
>...
> -- 
> View this message in context: http://www.nabble.com/change-primary- 
> key-value--tf3244417.html#a9018988
> Sent from the open-jpa-dev mailing list archive at Nabble.com.
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!


 


-- 
View this message in context: 
http://www.nabble.com/change-primary-key-value--tf3244417.html#a9076663
Sent from the open-jpa-dev mailing list archive at Nabble.com.



[jira] Created: (OPENJPA-159) Make ManagedRuntime amenable to more transaction execution strategies

2007-02-20 Thread Patrick Linskey (JIRA)
Make ManagedRuntime amenable to more transaction execution strategies
-

 Key: OPENJPA-159
 URL: https://issues.apache.org/jira/browse/OPENJPA-159
 Project: OpenJPA
  Issue Type: Improvement
  Components: kernel, jdbc
Reporter: Patrick Linskey


OpenJPA occasionally needs to perform work in a non-business transaction (see 
AbstractJDBCSeq.java). In a transactional environment, one way that this is 
achieved is by suspending the current JTA transaction, starting a new one, 
doing the work, cleaning up the new tx, and resuming the original one. Some 
environments do not allow direct transaction control, but mechanisms such as 
stateless session beans can often be used to kick off atomic operations that 
should execute in a separate transaction.

We could easily add ManagedRuntime.executeInNewTransaction(Runnable) that 
captured this slightly-coarser-grained transaction control. The default 
implementation could simply do  suspend(), begin(), invoke Runnable.run(), 
commit()/rollback(), resume().

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



[jira] Created: (OPENJPA-158) OpenJPA logs overly-verbose at INFO level

2007-02-20 Thread Patrick Linskey (JIRA)
OpenJPA logs overly-verbose at INFO level
-

 Key: OPENJPA-158
 URL: https://issues.apache.org/jira/browse/OPENJPA-158
 Project: OpenJPA
  Issue Type: Improvement
Reporter: Patrick Linskey


OpenJPA currently outputs rather a lot of INFO-level messages, especially when 
using runtime enhancement. It would be nice to quiet things down a bit.

In particular, the following statements from a 'mvn package' run seem 
TRACE-worthy:

0  test  INFO   [main] openjpa.MetaData - Found 2 classes with metadata in 0 
milliseconds.
0  test  INFO   [main] openjpa.MetaData - Parsing class 
"org.apache.openjpa.persistence.query.ManyOneEntity".
0  test  INFO   [main] openjpa.MetaData - Parsing package 
"org.apache.openjpa.persistence.query.ManyOneEntity".
10  test  INFO   [main] openjpa.MetaData - Parsing class 
"org.apache.openjpa.persistence.query.ManyOneEntitySub".
10  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for 
schema name "null", table name "ManyOneEntity".
10  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for 
schema name "null", table name "OPENJPA_SEQUENCE_TABLE".
10  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence information for 
schema "null", sequence name "null".

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



[jira] Resolved: (OPENJPA-157) NullPointerException when running query with null parameter

2007-02-20 Thread Srinivasa Segu (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Srinivasa Segu resolved OPENJPA-157.


Resolution: Fixed

Completed: At revision: 509885  


> NullPointerException when running query with null parameter
> ---
>
> Key: OPENJPA-157
> URL: https://issues.apache.org/jira/browse/OPENJPA-157
> Project: OpenJPA
>  Issue Type: Bug
>  Components: jdbc
>Reporter: Srinivasa Segu
> Attachments: testcase.zip
>
>
> NullPointerException when running query with null parameter value, testcase 
> attached. 
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.jdbc.meta.strats.RelationStrategies.toDataStoreValue(RelationStrategies.java:87)
> at 
> org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.toDataStoreValue(RelationFieldStrategy.java:597)
> at 
> org.apache.openjpa.jdbc.meta.FieldMapping.toDataStoreValue(FieldMapping.java:795)
> at 
> org.apache.openjpa.jdbc.kernel.exps.PCPath.toDataStoreValue(PCPath.java:542)
> at 
> org.apache.openjpa.jdbc.kernel.exps.Param.calculateValue(Param.java:106)
> at 
> org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression.appendTo(CompareEqualExpression.java:86)
> at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:237)
> at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:78)
> at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:323)
> at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:165)
> at 
> org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:672)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:930)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:742)

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



[jira] Updated: (OPENJPA-157) NullPointerException when running query with null parameter

2007-02-20 Thread Srinivasa Segu (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Srinivasa Segu updated OPENJPA-157:
---

Attachment: testcase.zip

> NullPointerException when running query with null parameter
> ---
>
> Key: OPENJPA-157
> URL: https://issues.apache.org/jira/browse/OPENJPA-157
> Project: OpenJPA
>  Issue Type: Bug
>  Components: jdbc
>Reporter: Srinivasa Segu
> Attachments: testcase.zip
>
>
> NullPointerException when running query with null parameter value, testcase 
> attached. 
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.jdbc.meta.strats.RelationStrategies.toDataStoreValue(RelationStrategies.java:87)
> at 
> org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.toDataStoreValue(RelationFieldStrategy.java:597)
> at 
> org.apache.openjpa.jdbc.meta.FieldMapping.toDataStoreValue(FieldMapping.java:795)
> at 
> org.apache.openjpa.jdbc.kernel.exps.PCPath.toDataStoreValue(PCPath.java:542)
> at 
> org.apache.openjpa.jdbc.kernel.exps.Param.calculateValue(Param.java:106)
> at 
> org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression.appendTo(CompareEqualExpression.java:86)
> at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:237)
> at 
> org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:78)
> at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:323)
> at 
> org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:165)
> at 
> org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:672)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:930)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:742)

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



[jira] Created: (OPENJPA-157) NullPointerException when running query with null parameter

2007-02-20 Thread Srinivasa Segu (JIRA)
NullPointerException when running query with null parameter
---

 Key: OPENJPA-157
 URL: https://issues.apache.org/jira/browse/OPENJPA-157
 Project: OpenJPA
  Issue Type: Bug
  Components: jdbc
Reporter: Srinivasa Segu


NullPointerException when running query with null parameter value, testcase 
attached. 

Caused by: java.lang.NullPointerException
at 
org.apache.openjpa.jdbc.meta.strats.RelationStrategies.toDataStoreValue(RelationStrategies.java:87)
at 
org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.toDataStoreValue(RelationFieldStrategy.java:597)
at 
org.apache.openjpa.jdbc.meta.FieldMapping.toDataStoreValue(FieldMapping.java:795)
at 
org.apache.openjpa.jdbc.kernel.exps.PCPath.toDataStoreValue(PCPath.java:542)
at 
org.apache.openjpa.jdbc.kernel.exps.Param.calculateValue(Param.java:106)
at 
org.apache.openjpa.jdbc.kernel.exps.CompareEqualExpression.appendTo(CompareEqualExpression.java:86)
at 
org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:237)
at 
org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:78)
at 
org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:323)
at 
org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:165)
at 
org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:672)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:930)
at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:742)

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



[jira] Resolved: (OPENJPA-156) Cache class object used to create plugin values

2007-02-20 Thread Patrick Linskey (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Patrick Linskey resolved OPENJPA-156.
-

Resolution: Fixed

> Cache class object used to create plugin values
> ---
>
> Key: OPENJPA-156
> URL: https://issues.apache.org/jira/browse/OPENJPA-156
> Project: OpenJPA
>  Issue Type: Sub-task
>Reporter: Michael Dick
> Attachments: openjpa-156.patch.txt
>
>


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



RE: Can enhancer operate on jar files?

2007-02-20 Thread Pinaki Poddar
>It is kind of a pain to unpack a jar, enhance it and repack it.
How about compile, enhance and then jar?

> Can the OpenJPA enhancer operate on a Jar file?
If runtime enhancement is in effect via
(-javaagent:/path/to/openjpa.jar) then the unenhanced persistent domain
classes be packed into a jar and referred in persistence.xml in
 tag. The classes will get enhanced as they are loaded in JVM
but original jar will remain unaltered. 

Pinaki Poddar
BEA Systems
415.402.7317  


-Original Message-
From: Dain Sundstrom [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 20, 2007 10:02 AM
To: open-jpa-dev@incubator.apache.org
Subject: Can enhancer operate on jar files?

Can the OpenJPA enhancer operate on a Jar file?  It is kind of a pain to
unpack a jar, enhance it and repack it.

-dain
___
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.


[jira] Updated: (OPENJPA-156) Cache class object used to create plugin values

2007-02-20 Thread Michael Dick (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Dick updated OPENJPA-156:
-

Attachment: openjpa-156.patch.txt

Another performance issue we've run into is the call to 
Strings.toClass(clsName, findDerivedLoader(conf, loader)) in 
Configurations.newInstance().

To work around the problem we tried caching the Class created for a given 
ClassLoader. It's a relatively simple cache, but it yielded noticeable 
performance improvements. The attached patch is relative to openjpa-lib, I can 
attach one that is relative to trunk if that will help.  

> Cache class object used to create plugin values
> ---
>
> Key: OPENJPA-156
> URL: https://issues.apache.org/jira/browse/OPENJPA-156
> Project: OpenJPA
>  Issue Type: Sub-task
>Reporter: Michael Dick
> Attachments: openjpa-156.patch.txt
>
>


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



[jira] Created: (OPENJPA-156) Cache class object used to create plugin values

2007-02-20 Thread Michael Dick (JIRA)
Cache class object used to create plugin values
---

 Key: OPENJPA-156
 URL: https://issues.apache.org/jira/browse/OPENJPA-156
 Project: OpenJPA
  Issue Type: Sub-task
Reporter: Michael Dick




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



RE: Can enhancer operate on jar files?

2007-02-20 Thread Patrick Linskey
Not currently, no. There's no reason that it couldn't, though.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

___
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -Original Message-
> From: Dain Sundstrom [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 20, 2007 10:02 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Can enhancer operate on jar files?
> 
> Can the OpenJPA enhancer operate on a Jar file?  It is kind 
> of a pain  
> to unpack a jar, enhance it and repack it.
> 
> -dain
> 


Re: svn commit: r509688 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java

2007-02-20 Thread Craig L Russell

Hi Pinaki,

Would it be possible to include the field number with the error  
message? Seems like if you get this exception you'd like to know  
which field it is complaining about.


Craig

On Feb 20, 2007, at 9:57 AM, [EMAIL PROTECTED] wrote:


Author: ppoddar
Date: Tue Feb 20 09:57:24 2007
New Revision: 509688

URL: http://svn.apache.org/viewvc?view=rev&rev=509688
Log:
Prevent access to the pc fields by implictly invoking _pc.toString 
() as that may cause infinite loop if toString() again tries to  
access unloaded field(s)



Modified:
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/ 
openjpa/kernel/DetachedStateManager.java


Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/ 
apache/openjpa/kernel/DetachedStateManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa- 
kernel/src/main/java/org/apache/openjpa/kernel/ 
DetachedStateManager.java?view=diff&rev=509688&r1=509687&r2=509688
== 

--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/ 
openjpa/kernel/DetachedStateManager.java (original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/ 
openjpa/kernel/DetachedStateManager.java Tue Feb 20 09:57:24 2007

@@ -396,8 +396,10 @@

 public void accessingField(int idx) {
 if (!_access && !_loaded.get(idx))
+	// do not access the pc fields by implictly invoking  
_pc.toString()
+	// may cause infinite loop if again tries to access  
unloaded field
 throw new IllegalStateException(_loc.get("unloaded- 
detached",

-_pc).getMessage());
+_pc.getClass()+"@"+System.identityHashCode 
(_pc)).getMessage());

 }

 public boolean serializing() {




Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!



smime.p7s
Description: S/MIME cryptographic signature


[jira] Commented: (OPENJPA-146) Entity enhancement fails while using EmbeddedId on a MappedSuperclass

2007-02-20 Thread Gokhan Ergul (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474525
 ] 

Gokhan Ergul commented on OPENJPA-146:
--

Fix confirmed, thanks.

> Entity enhancement fails while using EmbeddedId on a MappedSuperclass
> -
>
> Key: OPENJPA-146
> URL: https://issues.apache.org/jira/browse/OPENJPA-146
> Project: OpenJPA
>  Issue Type: Bug
>  Components: kernel
> Environment: openjpa 0.9.6
>Reporter: Gokhan Ergul
> Attachments: test-case.zip
>
>
> Both buildtime and runtime class enhancement fail with the following error:
> ...
> 1339  TRACE  [main] openjpa.Enhance - Enhancing type "class test.B".
> Exception in thread "main" <0|false|0.9.6-incubating> 
> org.apache.openjpa.util.GeneralException: null
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:350)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3711)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3661)
> at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3633)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.enhance.PCEnhancer.enhanceObjectId(PCEnhancer.java:2745)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:338)
> ... 3 more
> Test code as follows:
> test/A.java:
> --
> package test;
> import javax.persistence.*;
> import java.io.Serializable;
> @MappedSuperclass
> abstract public class A {
> @Embeddable
> public static class A_PK implements Serializable {
> @Basic
> protected int id1;
> 
> @Basic
> protected String id2;
> 
> public boolean equals (Object other) {
> return false;
> }
> public int hashCode () {
> return 0;
> }
> }
> @EmbeddedId
> protected A_PK pk;
> @Basic
> protected String val;
> }
> --
> test/B.java:
> --
> package test;
> import javax.persistence.Entity;
> @Entity
> public class B extends A {
> }
> --
> META-INF/persistence.xml:
> --
> http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> version="1.0">
> 
> test.A$A_PK
> test.A
> test.B
> 
> 
> 
> 
>  value="jdbc:mysql://localhost:3306/oam?useServerPrepStmts=false"/>
>  value="com.mysql.jdbc.Driver"/>
> 
> 
> 
> --

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



Can enhancer operate on jar files?

2007-02-20 Thread Dain Sundstrom
Can the OpenJPA enhancer operate on a Jar file?  It is kind of a pain  
to unpack a jar, enhance it and repack it.


-dain


RE: svn commit: r509473 - in /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: meta/strats/StateComparisonVersionStrategy.java sql/PrimaryRow.java sql/RowImpl.java sql/Secon

2007-02-20 Thread Srinivasa Segu
Sure, will do. Thanks for the info. 

-Original Message-
From: Kevin Sutter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 20, 2007 3:43 AM
To: open-jpa-dev@incubator.apache.org
Subject: Re: svn commit: r509473 - in
/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/j
dbc: meta/strats/StateComparisonVersionStrategy.java sql/PrimaryRow.java
sql/RowImpl.java sql/SecondaryRow.java

Segu,
In the future, could you please reference the JIRA Issue in your commit
message?  Just a simple "OPENJPA-155. Capturing reference to the
Column[]..." would automatically put the SVN changed lines into the Jira
Issue for easy reference.  Thanks.

Kevin

On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Author: ssegu
> Date: Tue Feb 20 00:59:10 2007
> New Revision: 509473
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=509473
> Log:
> Capturing reference to the Column[] at the creation time in the
RowImpl
> instead of the Table, to work with DynamicSchemaFactory where the
Table's
> columns can get modified after the creation of the RowImpl before the
flush.
>
> Modified:
>
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/meta/strats/StateComparisonVersionStrategy.java
>
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/PrimaryRow.java
>
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/RowImpl.java
>
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/SecondaryRow.java
>
> Modified:
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/meta/strats/StateComparisonVersionStrategy.java
> URL:
>
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/ma
in/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrate
gy.java?view=diff&rev=509473&r1=509472&r2=509473
>
>

==
> ---
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/meta/strats/StateComparisonVersionStrategy.java
> (original)
> +++
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/meta/strats/StateComparisonVersionStrategy.java
> Tue Feb 20 00:59:10 2007
> @@ -223,7 +223,11 @@
>  implements RowManager {
>
>  private CustomUpdate(Table table) {
> -super(table, Row.ACTION_UPDATE);
> +this(table.getColumns());
> +}
> +
> +private CustomUpdate(Column[] cols) {
> +super(cols, Row.ACTION_UPDATE);
>  }
>
>  /**
> @@ -252,8 +256,8 @@
>  return buf.toString();
>  }
>
> -protected RowImpl newInstance(Table table, int action) {
> -return new CustomUpdate(table);
> +protected RowImpl newInstance(Column[] cols, int action) {
> +return new CustomUpdate(cols);
>  }
>
>  /
>
> Modified:
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/PrimaryRow.java
> URL:
>
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/ma
in/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java?view=diff&rev=509473
&r1=509472&r2=509473
>
>

==
> ---
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/PrimaryRow.java
> (original)
> +++
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/PrimaryRow.java
> Tue Feb 20 00:59:10 2007
> @@ -59,7 +59,11 @@
>   * Constructor; supply table and action.
>   */
>  public PrimaryRow(Table table, int action, OpenJPAStateManager
owner)
> {
> -super(table, action);
> +this(table.getColumns(), action, owner);
> +}
> +
> +protected PrimaryRow(Column[] cols, int action,
OpenJPAStateManager
> owner) {
> +super(cols, action);
>  _pk = owner;
>  }
>
> @@ -385,8 +389,8 @@
>  return super.generateSQL(dict);
>  }
>
> -protected RowImpl newInstance(Table table, int action) {
> -return new PrimaryRow(table, action, _pk);
> +protected RowImpl newInstance(Column[] cols, int action) {
> +return new PrimaryRow(cols, action, _pk);
>  }
>
>  public void copyInto(RowImpl row, boolean whereOnly) {
>
> Modified:
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/RowImpl.java
> URL:
>
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/ma
in/java/org/apache/openjpa/jdbc/sql/RowImpl.java?view=diff&rev=509473&r1
=509472&r2=509473
>
>

==
> ---
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/RowImpl.java
> (original)
> +++
>
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jd
bc/sql/RowImpl.java
> Tue Feb 20 00:59:10 2007
>

[jira] Resolved: (OPENJPA-150) @Column in @AttributeOverride not honoring table attribute that maps to a secondary table in mappedsuperclass entity

2007-02-20 Thread Abe White (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abe White resolved OPENJPA-150.
---

Resolution: Fixed

Committed suggested changes (with very minor modifications) in revision 509674. 
 Thanks for the fix.

> @Column in @AttributeOverride not honoring table attribute that maps to a 
> secondary table in mappedsuperclass entity
> 
>
> Key: OPENJPA-150
> URL: https://issues.apache.org/jira/browse/OPENJPA-150
> Project: OpenJPA
>  Issue Type: Bug
>  Components: jdbc, sql
> Environment: Any
>Reporter: Albert Lee
>
> I have the following scenario mapping entity to 2 tables:
> - a mapped super class that has a field
> - a subclass with a pk and a field.
> - trying to map all the fields (except the pk (id) ) to a secondary table 
> (SEC_TABLE2MSC)
>   - use @Column in the sub-class to override (name) to the secondary table
>   - use @AttributeOverride to override the field (street) in the mapped super 
> class to the secondary table.
> ===
> @MappedSuperclass
> public abstract class AnnMSCMultiTable
> implements IMultiTableEntity
> {
> // @Column(table="SEC_TABLE2MSC")
> private String street;
> public String getStreet() {
> return street;
> }
>public void setStreet(String street) {
> this.street = street;
> }
> }
> ===
> @Entity
> @SecondaryTable(name="SEC_TABLE2MSC", [EMAIL PROTECTED](name="id"))
> @AttributeOverrides(
> {
> @AttributeOverride(name="street", [EMAIL 
> PROTECTED](name="street", table="SEC_TABLE2MSC")),
> })
> public class AnnMSCMultiTableEnt
> extends AnnMSCMultiTable
> {
> @Id
> private int id;
> @Column(name="name2", table="SEC_TABLE2MSC")
> private String name;
> }
> ===
> From examining JPA spec, there is no specific in the @Column and 
> @AttributeOverride that this should not be allow. So I believe this is a 
> valid scenario.
> Using the MappingTool, the attribute override does not map the street field 
> to the SEC_TABLE2MSC as I would expect:
> CREATE TABLE AnnMSCMultiTableEnt (id INTEGER NOT NULL, street VARCHAR(254), 
> PRIMARY KEY (id));
> CREATE TABLE SEC_TABLE2MSC (id INTEGER, name2 VARCHAR(254));
> CREATE INDEX I_SC_TMSC_ID ON SEC_TABLE2MSC (id);
> I experiment this a little bit and the only way I can map the street field to 
> SEC_TABLE2MSC is
> to add the @Column against the "street" attribute in the super class. (the 
> commented @Column in the example).
> The expected SQL are:
> CREATE TABLE AnnMSCMultiTableEnt (id INTEGER NOT NULL, PRIMARY KEY (id));
> CREATE TABLE SEC_TABLE2MSC (id INTEGER, street VARCHAR(254), name2 
> VARCHAR(254));
> CREATE INDEX I_SC_TMSC_ID ON SEC_TABLE2MSC (id);
> I tried to create the tables manually using the expected layout, but the 
> runtime still using the incorrect tables structure. I would suspect the 
> MappingTool and the runtime are using the same mapping strategy.
> Albert Lee,

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



[jira] Resolved: (OPENJPA-146) Entity enhancement fails while using EmbeddedId on a MappedSuperclass

2007-02-20 Thread Abe White (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Abe White resolved OPENJPA-146.
---

Resolution: Fixed

Resolved with revision 509632.  When copying OID superclass fields for mapping 
in a subclass, revert the type of the field to PC.  It will re-resolve to OID 
when the copied field's metadata is resolved, and in the meantime it ensures 
that the copied field resolution will use the same code path as non-copied 
fields.

> Entity enhancement fails while using EmbeddedId on a MappedSuperclass
> -
>
> Key: OPENJPA-146
> URL: https://issues.apache.org/jira/browse/OPENJPA-146
> Project: OpenJPA
>  Issue Type: Bug
>  Components: kernel
> Environment: openjpa 0.9.6
>Reporter: Gokhan Ergul
> Attachments: test-case.zip
>
>
> Both buildtime and runtime class enhancement fail with the following error:
> ...
> 1339  TRACE  [main] openjpa.Enhance - Enhancing type "class test.B".
> Exception in thread "main" <0|false|0.9.6-incubating> 
> org.apache.openjpa.util.GeneralException: null
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:350)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3711)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3661)
> at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3633)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.enhance.PCEnhancer.enhanceObjectId(PCEnhancer.java:2745)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:338)
> ... 3 more
> Test code as follows:
> test/A.java:
> --
> package test;
> import javax.persistence.*;
> import java.io.Serializable;
> @MappedSuperclass
> abstract public class A {
> @Embeddable
> public static class A_PK implements Serializable {
> @Basic
> protected int id1;
> 
> @Basic
> protected String id2;
> 
> public boolean equals (Object other) {
> return false;
> }
> public int hashCode () {
> return 0;
> }
> }
> @EmbeddedId
> protected A_PK pk;
> @Basic
> protected String val;
> }
> --
> test/B.java:
> --
> package test;
> import javax.persistence.Entity;
> @Entity
> public class B extends A {
> }
> --
> META-INF/persistence.xml:
> --
> http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> version="1.0">
> 
> test.A$A_PK
> test.A
> test.B
> 
> 
> 
> 
>  value="jdbc:mysql://localhost:3306/oam?useServerPrepStmts=false"/>
>  value="com.mysql.jdbc.Driver"/>
> 
> 
> 
> --

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



[jira] Commented: (OPENJPA-146) Entity enhancement fails while using EmbeddedId on a MappedSuperclass

2007-02-20 Thread Abe White (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474480
 ] 

Abe White commented on OPENJPA-146:
---

Cancel my previous comment.  Embedded PCs are handled very differently than 
OIDs at runtime, and so changing the isEmbeddedPC method to encompass OIDs as 
well might cause problems.  I think the root of the problem has to do with 
metadata resolution of mapped superclass fields (after all, EmbeddedIds in 
Entities work fine, just not in MappedSuperclasses).  I'll investigate further.

> Entity enhancement fails while using EmbeddedId on a MappedSuperclass
> -
>
> Key: OPENJPA-146
> URL: https://issues.apache.org/jira/browse/OPENJPA-146
> Project: OpenJPA
>  Issue Type: Bug
>  Components: kernel
> Environment: openjpa 0.9.6
>Reporter: Gokhan Ergul
> Attachments: test-case.zip
>
>
> Both buildtime and runtime class enhancement fail with the following error:
> ...
> 1339  TRACE  [main] openjpa.Enhance - Enhancing type "class test.B".
> Exception in thread "main" <0|false|0.9.6-incubating> 
> org.apache.openjpa.util.GeneralException: null
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:350)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3711)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3661)
> at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3633)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.enhance.PCEnhancer.enhanceObjectId(PCEnhancer.java:2745)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:338)
> ... 3 more
> Test code as follows:
> test/A.java:
> --
> package test;
> import javax.persistence.*;
> import java.io.Serializable;
> @MappedSuperclass
> abstract public class A {
> @Embeddable
> public static class A_PK implements Serializable {
> @Basic
> protected int id1;
> 
> @Basic
> protected String id2;
> 
> public boolean equals (Object other) {
> return false;
> }
> public int hashCode () {
> return 0;
> }
> }
> @EmbeddedId
> protected A_PK pk;
> @Basic
> protected String val;
> }
> --
> test/B.java:
> --
> package test;
> import javax.persistence.Entity;
> @Entity
> public class B extends A {
> }
> --
> META-INF/persistence.xml:
> --
> http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> version="1.0">
> 
> test.A$A_PK
> test.A
> test.B
> 
> 
> 
> 
>  value="jdbc:mysql://localhost:3306/oam?useServerPrepStmts=false"/>
>  value="com.mysql.jdbc.Driver"/>
> 
> 
> 
> --

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



[jira] Commented: (OPENJPA-146) Entity enhancement fails while using EmbeddedId on a MappedSuperclass

2007-02-20 Thread Abe White (JIRA)

[ 
https://issues.apache.org/jira/browse/OPENJPA-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474474
 ] 

Abe White commented on OPENJPA-146:
---

Looks like a good fix to me.  Do you need someone to commit this for you?

> Entity enhancement fails while using EmbeddedId on a MappedSuperclass
> -
>
> Key: OPENJPA-146
> URL: https://issues.apache.org/jira/browse/OPENJPA-146
> Project: OpenJPA
>  Issue Type: Bug
>  Components: kernel
> Environment: openjpa 0.9.6
>Reporter: Gokhan Ergul
> Attachments: test-case.zip
>
>
> Both buildtime and runtime class enhancement fail with the following error:
> ...
> 1339  TRACE  [main] openjpa.Enhance - Enhancing type "class test.B".
> Exception in thread "main" <0|false|0.9.6-incubating> 
> org.apache.openjpa.util.GeneralException: null
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:350)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3711)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:3661)
> at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:3633)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.openjpa.enhance.PCEnhancer.enhanceObjectId(PCEnhancer.java:2745)
> at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:338)
> ... 3 more
> Test code as follows:
> test/A.java:
> --
> package test;
> import javax.persistence.*;
> import java.io.Serializable;
> @MappedSuperclass
> abstract public class A {
> @Embeddable
> public static class A_PK implements Serializable {
> @Basic
> protected int id1;
> 
> @Basic
> protected String id2;
> 
> public boolean equals (Object other) {
> return false;
> }
> public int hashCode () {
> return 0;
> }
> }
> @EmbeddedId
> protected A_PK pk;
> @Basic
> protected String val;
> }
> --
> test/B.java:
> --
> package test;
> import javax.persistence.Entity;
> @Entity
> public class B extends A {
> }
> --
> META-INF/persistence.xml:
> --
> http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm 
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> version="1.0">
> 
> test.A$A_PK
> test.A
> test.B
> 
> 
> 
> 
>  value="jdbc:mysql://localhost:3306/oam?useServerPrepStmts=false"/>
>  value="com.mysql.jdbc.Driver"/>
> 
> 
> 
> --

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



Re: svn commit: r509473 - in /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: meta/strats/StateComparisonVersionStrategy.java sql/PrimaryRow.java sql/RowImpl.java sql/Secon

2007-02-20 Thread Kevin Sutter

Segu,
In the future, could you please reference the JIRA Issue in your commit
message?  Just a simple "OPENJPA-155. Capturing reference to the
Column[]..." would automatically put the SVN changed lines into the Jira
Issue for easy reference.  Thanks.

Kevin

On 2/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Author: ssegu
Date: Tue Feb 20 00:59:10 2007
New Revision: 509473

URL: http://svn.apache.org/viewvc?view=rev&rev=509473
Log:
Capturing reference to the Column[] at the creation time in the RowImpl
instead of the Table, to work with DynamicSchemaFactory where the Table's
columns can get modified after the creation of the RowImpl before the flush.

Modified:


incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrategy.java


incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java


incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java


incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/SecondaryRow.java

Modified:
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrategy.java
URL:
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrategy.java?view=diff&rev=509473&r1=509472&r2=509473

==
---
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrategy.java
(original)
+++
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/StateComparisonVersionStrategy.java
Tue Feb 20 00:59:10 2007
@@ -223,7 +223,11 @@
 implements RowManager {

 private CustomUpdate(Table table) {
-super(table, Row.ACTION_UPDATE);
+this(table.getColumns());
+}
+
+private CustomUpdate(Column[] cols) {
+super(cols, Row.ACTION_UPDATE);
 }

 /**
@@ -252,8 +256,8 @@
 return buf.toString();
 }

-protected RowImpl newInstance(Table table, int action) {
-return new CustomUpdate(table);
+protected RowImpl newInstance(Column[] cols, int action) {
+return new CustomUpdate(cols);
 }

 /

Modified:
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
URL:
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java?view=diff&rev=509473&r1=509472&r2=509473

==
---
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
(original)
+++
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PrimaryRow.java
Tue Feb 20 00:59:10 2007
@@ -59,7 +59,11 @@
  * Constructor; supply table and action.
  */
 public PrimaryRow(Table table, int action, OpenJPAStateManager owner)
{
-super(table, action);
+this(table.getColumns(), action, owner);
+}
+
+protected PrimaryRow(Column[] cols, int action, OpenJPAStateManager
owner) {
+super(cols, action);
 _pk = owner;
 }

@@ -385,8 +389,8 @@
 return super.generateSQL(dict);
 }

-protected RowImpl newInstance(Table table, int action) {
-return new PrimaryRow(table, action, _pk);
+protected RowImpl newInstance(Column[] cols, int action) {
+return new PrimaryRow(cols, action, _pk);
 }

 public void copyInto(RowImpl row, boolean whereOnly) {

Modified:
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java
URL:
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java?view=diff&rev=509473&r1=509472&r2=509473

==
---
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java
(original)
+++
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/RowImpl.java
Tue Feb 20 00:59:10 2007
@@ -59,7 +59,7 @@
 private static final int RAW = Integer.MIN_VALUE;

 protected byte flags = 0;
-private final Table _table;
+private final Column[] _cols;
 private final int _action;
 private final Object[] _vals;
 private final int[] _types;
@@ -73,12 +73,16 @@
  * @param action the action on the row
  */
 public RowImpl(Table table, int action) {
-_table = table;
+this(table.getColumns(), action);
+}
+
+protected RowImpl(Column[] cols, int action) {
+_cols = cols;
 _action = action;

 // we need room for values and 

RE: WebSphere and transaction managers

2007-02-20 Thread Patrick Linskey
> Does OpenJPA need to provide this level of support for
> all TM's?  That's what I meant by my question.

I don't think that OpenJPA *needs* to, but it certainly will improve the
out-of-the-box experience for WAS users. 

Are there any public WAS hooks that we can use to automatically deploy a
SLSB into a WAS environment during OpenJPA startup?

In any event, there's an easy workaround right now (use the internal WAS
methods, as outlined in the JIRA), and there will be another easy
workaround soon (use non-jta-data-source).

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

___
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -Original Message-
> From: Kevin Sutter [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 19, 2007 6:54 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: WebSphere and transaction managers
> 
> Craig,
> 
> On 2/19/07, Craig L Russell <[EMAIL PROTECTED]> wrote:
> >
> >
> > On Feb 19, 2007, at 4:37 PM, Kevin Sutter wrote:
> >
> > > On 2/19/07, Patrick Linskey <[EMAIL PROTECTED]> wrote:
> > >>
> > >>
> > >> Maybe we should add a method to our ManagedRuntime interface to
> > >> accept a
> > >> Runnable that should be run in a separate transaction, 
> and migrate
> > >> our
> > >> code to use that approach. That way, the WASManagedRuntime could
> > >> do what
> > >> Craig outlined, and other ManagedRuntime impls could retain their
> > >> current behavior.
> > >
> > >
> > > Although this approach is probably workable, this sounds more
> > > complicated
> > > than just requiring the use of the non-jta-data-source element.
> > > WebSphere
> > > will eventually support the non-jta-data-source (supposedly in the
> > > next Beta
> > > of the EJB3 Feature Pack).
> >
> > This would be welcome news, indeed.
> >
> > > Wouldn't that be the preferred (and spec
> > > compliant) method of "nesting" transactions?
> >
> > I think so.
> > >
> > > I suppose since OpenJPA already supports this "suspension" via
> > > other TM's,
> > > is it our desire to support this mechanism for all TM's?
> >
> > I think so. Is WAS the only application server that doesn't support
> > non-JTA DataSource?
> 
> 
> Craig, I meant the ability to suspend a transaction.  It 
> seems that OpenJPA
> has provided for suspending of transactions via various API's (some
> external, some internal).  So, it seems that some TM's allow 
> for suspension
> of in-flight transactions, while others (like WAS) does not.  
> At least not
> via public API's.  Does OpenJPA need to provide this level of 
> support for
> all TM's?  That's what I meant by my question.
> 
> Craig
> >
> > >
> > > Kevin
> > >
> > >
> > > On 2/19/07, Patrick Linskey <[EMAIL PROTECTED]> wrote:
> > >>
> > >> > > I would have to better understand OpenJPA's need for the
> > >> transaction
> > >> > > suspension before determining whether there are alternatives
> > >> > > available.
> > >>
> > >> The use case is that if we can suspend the tx, then the 
> user doesn't
> > >> need to provide a non-JTA data source.
> > >>
> > >> > The idea is to create an EJB component solely for the 
> purpose of
> > >> > suspending a transaction. This could be a Stateless Session
> > >> > Bean that defines a method declared as Transaction Not 
> Supported.
> > >>
> > >> Interesting. We could even mark the method as @RequiresNew, thus
> > >> letting
> > >> the container take care of demarcation. Certainly an interesting
> > >> approach for providing similar ease-of-use in a WebSphere
> > >> environment.
> > >>
> > >> Maybe we should add a method to our ManagedRuntime interface to
> > >> accept a
> > >> Runnable that should be run in a separate transaction, 
> and migrate
> > >> our
> > >> code to use that approach. That way, the WASManagedRuntime could
> > >> do what
> > >> Craig outlined, and other ManagedRuntime impls could retain their
> > >> current behavior.
> > >>
> > >> -Patrick
> > >>
> > >> --
> > >> Patrick Linskey
> > >> BEA Systems, Inc.
> > >>
> > >> 
> _
> > >> __
> > >> Notice:  This email message, together with any attachments, may
> > >> contain
> > >> information  of  BEA Systems,  Inc.,  its subsidiaries  and
> > >> affiliated
> > >> entities,  that may be confidential,  proprietary,  copyrighted
> > >> and/or
> > >> legally privileged, and is intended solely for the use of the
> > >> individual
> > >> or entity named in this message. If you are not the intended
> > >> recipient,
> > >> and have received this message

[jira] Resolved: (OPENJPA-155) java.lang.ArrayIndexOutOfBoundsException during commit

2007-02-20 Thread Srinivasa Segu (JIRA)

 [ 
https://issues.apache.org/jira/browse/OPENJPA-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Srinivasa Segu resolved OPENJPA-155.


Resolution: Fixed

Completed: At revision: 509473  

Capturing reference to the Column[] at the creation time in the RowImpl instead 
of the Table, to work with DynamicSchemaFactory where the Table's columns can 
get modified after the creation of the RowImpl before the flush.



>  java.lang.ArrayIndexOutOfBoundsException during commit
> ---
>
> Key: OPENJPA-155
> URL: https://issues.apache.org/jira/browse/OPENJPA-155
> Project: OpenJPA
>  Issue Type: Bug
>  Components: jdbc
>Reporter: Srinivasa Segu
>
> After a RowImpl is created for persisting an Entity, when more mapping 
> information is found corresponding to the same table the _table of the 
> already created RowImpl gets modified, in the attached scenario causing the 
> ArrayIndexOutOfBoundsException 

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