Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    JPA Transaction trouble

    I'm setting up SmartGWTEE 2.5 application to use JPA (Glassfish + EclipseLink + Derby). --- I know JPA isn't the first option recommended, it's just what is for this particular project :) --- I think I've nearly got it all working but am getting a "javax.persistence.TransactionRequiredException", followed later by a "java.lang.IllegalStateException: Transaction is not active in the current thread." when I add data.

    Do my settings look right? … Any ideas are much appreciated.
    thanks!
    ,chris

    server.properties
    Code:
    ...
    jpa.emfProvider: com.isomorphic.jpa.EMFProviderCMT
    jpa.persistenceUnitName: ds
    jpa.cmt.entityManager: persistence/em
    jpa.cmt.transaction: persistence/tx
    web.xml
    Code:
    …
        <persistence-context-ref>
            <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
            <persistence-unit-name>ds</persistence-unit-name>
        </persistence-context-ref>
        <resource-env-ref>
            <resource-env-ref-name>persistence/tx</resource-env-ref-name>
            <resource-env-ref-type>javax.transaction.UserTransaction</resource-env-ref-type>
        </resource-env-ref>
    …
    persistence.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.0" xmlns="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 http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
        <persistence-unit name="ds" transaction-type="JTA">
            <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
            <jta-data-source>jdbc/signature</jta-data-source>
            <class>myapp.server.das.note.entities.Note</class>
            <properties>
                <property name="eclipselink.ddl-generation" value="create-tables"/>
                <property name="eclipselink.target-database" value="Derby"/>
                <property name="eclipselink.logging.level" value="FINE" /> 
            </properties>
        </persistence-unit>
    </persistence>
    Log:
    Code:
    [#|2011-10-18T01:04:18.615-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,615 [0(1)] DEBUG RPCManager - Request #1 (DSRequest) payload: {
        values:{
            uid:"123abc",
            comments:"Hello World"
        },
        operationConfig:{
            dataSource:"NoteRecord",
            operationType:"add"
        },
        componentId:"isc_DynamicForm_1",
        appID:"builtinApplication",
        operation:"NoteRecord_add",
        oldValues:{
        },
        criteria:{
        }
    }
    |#]
    
    [#|2011-10-18T01:04:18.690-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,690 [0(1)] INFO  IDACall - Performing 1 operation(s)
    |#]
    
    [#|2011-10-18T01:04:18.714-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,714 [0(1)] DEBUG AppBase - [builtinApplication.NoteRecord_add] No userTypes defined, allowing anyone access to all operations for this application
    |#]
    
    [#|2011-10-18T01:04:18.715-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,715 [0(1)] DEBUG AppBase - [builtinApplication.NoteRecord_add] No public zero-argument method named '_NoteRecord_add' found, performing generic datasource operation
    |#]
    
    [#|2011-10-18T01:04:18.716-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,716 [0(1)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Auto-joining transactions.
    |#]
    
    [#|2011-10-18T01:04:18.716-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,716 [0(1)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Creating EntityManager, starting transaction and setting it to RPCManager.
    |#]
    
    [#|2011-10-18T01:04:18.723-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,723 [0(1)] DEBUG DSRequest - [builtinApplication.NoteRecord_add] Clobbering existing FreeResourcesHandler of type 'com.isomorphic.jpa.JPA2DataSource' with a 'com.isomorphic.jpa.JPA2DataSource'
    |#]
    
    [#|2011-10-18T01:04:18.725-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,725 [0(1)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Executing add.
    |#]
    
    [#|2011-10-18T01:04:18.743-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,742 [0(1)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Marking transaction for roll back.
    |#]
    
    [#|2011-10-18T01:04:18.749-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,748 [0(1)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Got exception while executing. Transaction will be rolled back.
    javax.persistence.TransactionRequiredException
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:163)
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:145)
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:263)
    	at com.isomorphic.jpa.JPADataSource.executeAdd(JPADataSource.java:714)
    	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1156)
    	at com.isomorphic.jpa.JPADataSource.execute(JPADataSource.java:356)
    	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
    	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1714)
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
    	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    	at java.lang.Thread.run(Thread.java:680)
    |#]
    
    [#|2011-10-18T01:04:18.750-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,750 [0(1)] WARN  RequestContext - dsRequest.execute() failed: 
    javax.persistence.TransactionRequiredException
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:163)
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:145)
    	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:263)
    	at com.isomorphic.jpa.JPADataSource.executeAdd(JPADataSource.java:714)
    	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1156)
    	at com.isomorphic.jpa.JPADataSource.execute(JPADataSource.java:356)
    	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
    	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
    	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
    	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1714)
    	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
    	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    	at java.lang.Thread.run(Thread.java:680)
    |#]
    
    [#|2011-10-18T01:04:18.751-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,751 [0(1)] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
    |#]
    
    [#|2011-10-18T01:04:18.753-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,753 [0(1)] DEBUG JPADataSource - Rolling back transaction for 0 queued operation(s).
    |#]
    
    [#|2011-10-18T01:04:18.755-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,754 [0(1)] WARN  EMFProviderCMT - Unexpected exception while rolling back transaction
    java.lang.IllegalStateException: Transaction is not active in the current thread.
    	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.validateTransactionManager(JavaEETransactionManagerJTSDelegate.java:448)
    	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.setRollbackOnlyDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:345)
    	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.setRollbackOnly(JavaEETransactionManagerSimplified.java:968)
    	at com.sun.enterprise.transaction.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:257)
    	at com.isomorphic.jpa.EMFProviderCMT.rollbackTransaction(EMFProviderCMT.java:205)
    	at com.isomorphic.jpa.EMF.rollbackTransaction(EMF.java:142)
    	at com.isomorphic.jpa.JPADataSource.onFailure(JPADataSource.java:3189)
    	at com.isomorphic.rpc.RPCManager.onFailure(RPCManager.java:1334)
    	at com.isomorphic.rpc.RPCManager.onFailure(RPCManager.java:1234)
    	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:987)
    	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
    	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
    	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
    	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
    	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    	at java.lang.Thread.run(Thread.java:680)
    |#]
    
    [#|2011-10-18T01:04:18.756-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,756 [0(1)] DEBUG RPCManager - non-DMI response, dropExtraFields: false
    |#]
    
    [#|2011-10-18T01:04:18.762-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,762 [0(1)] DEBUG JPADataSource - Releasing entity manager.
    |#]
    
    [#|2011-10-18T01:04:18.763-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-4;|=== 2011-10-18 01:04:18,763 [0(1)] INFO  Compression - /MyApp/MyApp/sc/IDACall: 123 -> 113 bytes
    |#]

    #2
    Should have included this in my previous post.
    Code:
    <DataSource
            ID="NoteRecord"
            serverConstructor="com.isomorphic.jpa.JPA2DataSource"
            autoDeriveSchema="true"
            schemaBean="myapp.server.das.notes.entities.NoteRecord"
            />
    Also tried server.properties...
    Code:
    ...
    jpa.emfProvider: com.isomorphic.jpa.EMFProviderNoTransactions
    ...
    which got around the exceptions but didn't save anything to Derby.

    Log:
    Code:
    [#|2011-10-18T03:11:40.802-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,802 [0(4)] DEBUG JPADataSource - [builtinApplication.NoteRecord_add] Executing add.
    |#]
    
    [#|2011-10-18T03:11:40.919-0400|FINE|glassfish3.1.1|org.eclipse.persistence.session.file:/usr/local/Cellar/glassfish/3.1.1/libexec/glassfish/domains/domain1/applications/myapp-1.0-SNAPSHOT/WEB-INF/classes/_ds.sql|_ThreadID=20;_ThreadName=Thread-4;ClassName=null;MethodName=null;|UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
    	bind => [2 parameters bound]|#]
    
    [#|2011-10-18T03:11:40.947-0400|FINE|glassfish3.1.1|org.eclipse.persistence.session.file:/usr/local/Cellar/glassfish/3.1.1/libexec/glassfish/domains/domain1/applications/myapp-1.0-SNAPSHOT/WEB-INF/classes/_ds.sql|_ThreadID=20;_ThreadName=Thread-4;ClassName=null;MethodName=null;|SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = ?
    	bind => [1 parameter bound]|#]
    
    [#|2011-10-18T03:11:40.962-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,962 [0(4)] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
    |#]
    
    [#|2011-10-18T03:11:40.962-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,962 [0(4)] DEBUG JPADataSource - Committing transaction for 1 queued operation(s).
    |#]
    
    [#|2011-10-18T03:11:40.963-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,963 [0(4)] DEBUG RPCManager - non-DMI response, dropExtraFields: false
    |#]
    
    [#|2011-10-18T03:11:40.964-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,964 [0(4)] DEBUG JPADataSource - Releasing entity manager.
    |#]
    
    [#|2011-10-18T03:11:40.965-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-18 03:11:40,965 [0(4)] INFO  Compression - /myapp/myapp/sc/IDACall: 487 -> 288 bytes
    |#]

    Comment


      #3
      I've tried changing the ds file to not use auto-derive as well as many other attempts. Still nothing. If anyone has got SmartGWTEE 2.5 + Glassfish + EclipseLink + Derby working, please let me know. If this combination is just not a good mix then also, please let me know. I need to get something working and don't see anything really out of line with what I've done so far, so I'm stuck.

      Maybe seeing the log simplified will make it easier? Here's the basic flow I see in server.log.
      I don't understand the "Clobbering..." statement.
      Also, why would I get "Transaction is not active in the current thread" after "Creating EntityManager, starting transaction and setting it to RPCManager"?

      1) IDACall - Performing 1 operation(s)
      2) JPADataSource - [builtinApplication.noteRecord_add] Auto-joining transactions
      3) JPADataSource - [builtinApplication.noteRecord_add] Creating EntityManager, starting transaction and setting it to RPCManager
      4) DSRequest - [builtinApplication.noteRecord_add] Clobbering existing FreeResourcesHandler of type 'com.isomorphic.jpa.JPA2DataSource' with a 'com.isomorphic.jpa.JPA2DataSource'
      5) JPADataSource - [builtinApplication.noteRecord_add] Executing add.
      6) JPADataSource - [builtinApplication.noteRecord_add] Marking transaction for roll back.
      7) JPADataSource - [builtinApplication.noteRecord_add] Got exception while executing. Transaction will be rolled back. javax.persistence.TransactionRequiredException
      8) RequestContext - dsRequest.execute() failed: javax.persistence.TransactionRequiredException
      9) JPADataSource - Rolling back transaction for 0 queued operation(s).
      10) EMFProviderCMT - Unexpected exception while rolling back transaction java.lang.IllegalStateException: Transaction is not active in the current thread.


      noteRecord.ds.xml
      Code:
      <DataSource
              ID="noteRecord"
              serverConstructor="com.isomorphic.jpa.JPA2DataSource"
              beanClassName="com.foo.server.das.note.entities.Note"
              >
          <fields>
              <field name="id" type="integer" primaryKey="true" hidden="true"/>
              <field name="name" type="text"/>
              <field name="comments" type="text" length="4000"/>
              ...
      </DataSource>
      web.xml
      Code:
      ...
      <persistence-context-ref>
          <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
          <persistence-unit-name>noteDasPU</persistence-unit-name>
      </persistence-context-ref>
      <resource-env-ref>
          <resource-env-ref-name>persistence/tx</resource-env-ref-name>
          <resource-env-ref-type>javax.transaction.UserTransaction</resource-env-ref-type>
      </resource-env-ref>
      ...
      glassfish-web-xml
      Code:
      <resource-ref>
          <jndi-name>jdbc/note</jndi-name>
          <default-resource-principal>
              <name>foo</name>
              <password>foo</password>
          </default-resource-principal>
      </resource-ref>
      server.properties
      Code:
      jpa.emfProvider: com.isomorphic.jpa.EMFProviderCMT
      jpa.persistenceUnitName: noteDasPU
      jpa.cmt.entityManager: persistence/em
      jpa.cmt.transaction: persistence/tx
      server.log
      Code:
      [#|2011-10-19T01:47:34.355-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,355 [0(4)] DEBUG RPCManager - Processing 1 requests.
      |#]
      
      [#|2011-10-19T01:47:34.358-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,358 [0(4)] DEBUG RPCManager - Request #1 (DSRequest) payload: {
          values:{
              uid:"oioiu",
              name:"oiu",
              comments:"oiu"
          },
          operationConfig:{
              dataSource:"noteRecord",
              operationType:"add"
          },
          componentId:"isc_DynamicForm_1",
          appID:"builtinApplication",
          operation:"noteRecord_add",
          oldValues:{
          },
          criteria:{
          }
      }
      |#]
      
      [#|2011-10-19T01:47:34.358-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,358 [0(4)] INFO  IDACall - Performing 1 operation(s)
      |#]
      
      [#|2011-10-19T01:47:34.359-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,358 [0(4)] DEBUG AppBase - [builtinApplication.noteRecord_add] No userTypes defined, allowing anyone access to all operations for this application
      |#]
      
      [#|2011-10-19T01:47:34.359-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,359 [0(4)] DEBUG AppBase - [builtinApplication.noteRecord_add] No public zero-argument method named '_noteRecord_add' found, performing generic datasource operation
      |#]
      
      [#|2011-10-19T01:47:34.359-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,359 [0(4)] DEBUG JPADataSource - [builtinApplication.noteRecord_add] Auto-joining transactions.
      |#]
      
      [#|2011-10-19T01:47:34.359-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,359 [0(4)] DEBUG JPADataSource - [builtinApplication.noteRecord_add] Creating EntityManager, starting transaction and setting it to RPCManager.
      |#]
      
      [#|2011-10-19T01:47:34.362-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,362 [0(4)] DEBUG DSRequest - [builtinApplication.noteRecord_add] Clobbering existing FreeResourcesHandler of type 'com.isomorphic.jpa.JPA2DataSource' with a 'com.isomorphic.jpa.JPA2DataSource'
      |#]
      
      [#|2011-10-19T01:47:34.363-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,363 [0(4)] DEBUG JPADataSource - [builtinApplication.noteRecord_add] Executing add.
      |#]
      
      [#|2011-10-19T01:47:34.372-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,372 [0(4)] DEBUG JPADataSource - [builtinApplication.noteRecord_add] Marking transaction for roll back.
      |#]
      
      [#|2011-10-19T01:47:34.373-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,372 [0(4)] DEBUG JPADataSource - [builtinApplication.noteRecord_add] Got exception while executing. Transaction will be rolled back.
      javax.persistence.TransactionRequiredException
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:163)
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:145)
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:263)
      	at com.isomorphic.jpa.JPADataSource.executeAdd(JPADataSource.java:714)
      	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1156)
      	at com.isomorphic.jpa.JPADataSource.execute(JPADataSource.java:356)
      	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
      	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1714)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
      	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      	at java.lang.Thread.run(Thread.java:680)
      |#]
      
      [#|2011-10-19T01:47:34.373-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,373 [0(4)] WARN  RequestContext - dsRequest.execute() failed: 
      javax.persistence.TransactionRequiredException
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:163)
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:145)
      	at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:263)
      	at com.isomorphic.jpa.JPADataSource.executeAdd(JPADataSource.java:714)
      	at com.isomorphic.datasource.DataSource.execute(DataSource.java:1156)
      	at com.isomorphic.jpa.JPADataSource.execute(JPADataSource.java:356)
      	at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721)
      	at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658)
      	at com.isomorphic.application.AppBase.execute(AppBase.java:491)
      	at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1714)
      	at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:199)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
      	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      	at java.lang.Thread.run(Thread.java:680)
      |#]
      
      [#|2011-10-19T01:47:34.374-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,374 [0(4)] DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8
      |#]
      
      [#|2011-10-19T01:47:34.374-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,374 [0(4)] DEBUG JPADataSource - Rolling back transaction for 0 queued operation(s).
      |#]
      
      [#|2011-10-19T01:47:34.375-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,374 [0(4)] WARN  EMFProviderCMT - Unexpected exception while rolling back transaction
      java.lang.IllegalStateException: Transaction is not active in the current thread.
      	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.validateTransactionManager(JavaEETransactionManagerJTSDelegate.java:448)
      	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.setRollbackOnlyDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:345)
      	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.setRollbackOnly(JavaEETransactionManagerSimplified.java:968)
      	at com.sun.enterprise.transaction.UserTransactionImpl.setRollbackOnly(UserTransactionImpl.java:257)
      	at com.isomorphic.jpa.EMFProviderCMT.rollbackTransaction(EMFProviderCMT.java:205)
      	at com.isomorphic.jpa.EMF.rollbackTransaction(EMF.java:142)
      	at com.isomorphic.jpa.JPADataSource.onFailure(JPADataSource.java:3189)
      	at com.isomorphic.rpc.RPCManager.onFailure(RPCManager.java:1334)
      	at com.isomorphic.rpc.RPCManager.onFailure(RPCManager.java:1234)
      	at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:987)
      	at com.isomorphic.rpc.RPCManager.send(RPCManager.java:582)
      	at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:156)
      	at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:121)
      	at com.isomorphic.servlet.IDACall.doPost(IDACall.java:73)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      	at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
      	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
      	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
      	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      	at java.lang.Thread.run(Thread.java:680)
      |#]
      
      [#|2011-10-19T01:47:34.376-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,376 [0(4)] DEBUG RPCManager - non-DMI response, dropExtraFields: false
      |#]
      
      [#|2011-10-19T01:47:34.376-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,376 [0(4)] DEBUG JPADataSource - Releasing entity manager.
      |#]
      
      [#|2011-10-19T01:47:34.377-0400|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=20;_ThreadName=Thread-4;|=== 2011-10-19 01:47:34,377 [0(4)] INFO  Compression - /foo/foo/sc/IDACall: 123 -> 113 bytes
      |#]
      thanks!
      ,chris

      Comment


        #4
        Hi,

        Just committed changes (will appear in next nightly build).

        To use Bean Managed Transactions you have to configure:

        server.properties:
        Code:
        jpa.emfProvider: com.isomorphic.jpa.EMFProviderBMT
        jpa.entityManager: persistence/em
        jpa.entityManagerFactory: persistence/emf
        web.xml
        Code:
          <persistence-context-ref>
              <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
              <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
          </persistence-context-ref>
          <persistence-unit-ref>
              <persistence-unit-ref-name>persistence/emf</persistence-unit-ref-name>
              <persistence-unit-name>PERSISTENCE_UNIT_NAME</persistence-unit-name>
          </persistence-unit-ref>

        Now EMFProviderCMT should be used only when you are accessing data source from EJB.

        Best regards,
        Alius

        Comment

        Working...
        X