<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Problem using: 6 Final JBoss, EJB3 (MDB), CMT, EclipseLink, PostgreSQL
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/ylopez">Yumer Lopez</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/605050#605050">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi, I'm new using Jboss. </p><p><span class="hps" title="Haz clic para obtener otras posibles traducciones">I have</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">a</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">JEE application</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">using</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">MDB</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">to</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">consume</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">messages from</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">a</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">queue</span><span title="Haz clic para obtener otras posibles traducciones">.</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">When the message arrives</span><span title="Haz clic para obtener otras posibles traducciones">, it</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">activates</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">a routine</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">to</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">keep</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">a record</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">in the</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">database.</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">The</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">database</span><span class="hps" title="Haz clic para obtener otras posibles traducciones">manager</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">I'm using</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">is</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">PostgreSQL</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">8.4</span><span title="Haz clic para obtener otras posibles traducciones">. I use to deploy the application the IDE Eclipse, this is what I get when I deploy the application:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>server.log</p><p>========================================================================================================</p><p>17:26:37,566 INFO  [org.jboss.jpa.mcint.beans.metadata.plugins.PersistenceUnitValueMetaData] iDependOn persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb</p><p>17:26:37,575 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb</p><p>17:26:37,880 INFO  [org.hibernate.annotations.common.Version] Hibernate Commons Annotations 3.2.0.Final</p><p>17:26:37,896 INFO  [org.hibernate.cfg.Environment] Hibernate 3.6.0.Final</p><p>17:26:37,901 INFO  [org.hibernate.cfg.Environment] hibernate.properties not found</p><p>17:26:37,907 INFO  [org.hibernate.cfg.Environment] Bytecode provider name : javassist</p><p>17:26:37,913 INFO  [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling</p><p>17:26:38,043 INFO  [org.hibernate.ejb.Version] Hibernate EntityManager 3.6.0.Final</p><p>17:26:38,075 INFO  [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [</p><p>          name: timerdb</p><p>          ...]</p><p>17:26:38,090 WARN  [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly.PersistenceUnitInfo.getNewTempClassLoader() is null.</p><p>17:26:38,192 INFO  [org.hibernate.cfg.AnnotationBinder] Binding entity from annotated class: org.jboss.ejb3.timerservice.mk2.persistence.TimerEntity</p><p>17:26:38,237 INFO  [org.hibernate.cfg.annotations.EntityBinder] Bind entity org.jboss.ejb3.timerservice.mk2.persistence.TimerEntity on table timer</p><p>17:26:38,291 INFO  [org.hibernate.cfg.AnnotationBinder] Binding entity from annotated class: org.jboss.ejb3.timerservice.mk2.persistence.TimeoutMethod</p><p>17:26:38,294 INFO  [org.hibernate.cfg.annotations.EntityBinder] Bind entity org.jboss.ejb3.timerservice.mk2.persistence.TimeoutMethod on table timeout_method</p><p>17:26:38,326 INFO  [org.hibernate.cfg.AnnotationBinder] Binding entity from annotated class: org.jboss.ejb3.timerservice.mk2.persistence.CalendarTimerEntity</p><p>17:26:38,328 INFO  [org.hibernate.cfg.annotations.EntityBinder] Bind entity org.jboss.ejb3.timerservice.mk2.persistence.CalendarTimerEntity on table calendar_timer</p><p>17:26:38,367 INFO  [org.hibernate.validator.Version] Hibernate Validator 3.1.0.GA</p><p>17:26:38,417 INFO  [org.hibernate.validator.util.Version] Hibernate Validator 4.1.0.Final</p><p>17:26:38,430 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.</p><p>17:26:38,598 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.</p><p>17:26:38,603 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.</p><p>17:26:38,610 INFO  [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.</p><p>17:26:38,627 INFO  [org.hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider</p><p>17:26:38,634 INFO  [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] Using provided datasource</p><p>17:26:38,640 INFO  [org.hibernate.cfg.SettingsFactory] Database -></p><p>       name : HSQL Database Engine</p><p>    version : 1.8.0</p><p>      major : 1</p><p>      minor : 8</p><p>17:26:38,640 INFO  [org.hibernate.cfg.SettingsFactory] Driver -></p><p>       name : HSQL Database Engine Driver</p><p>    version : 1.8.0</p><p>      major : 1</p><p>      minor : 8</p><p>17:26:38,709 INFO  [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.HSQLDialect</p><p>17:26:38,742 INFO  [org.hibernate.engine.jdbc.JdbcSupportLoader] Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4</p><p>17:26:38,744 INFO  [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory</p><p>17:26:38,748 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup</p><p>17:26:38,751 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup</p><p>17:26:38,751 INFO  [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): disabled</p><p>17:26:38,752 INFO  [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: disabled</p><p>17:26:38,752 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch size: 15</p><p>17:26:38,752 INFO  [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: disabled</p><p>17:26:38,753 INFO  [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled</p><p>17:26:38,754 INFO  [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): disabled</p><p>17:26:38,754 INFO  [org.hibernate.cfg.SettingsFactory] Connection release mode: auto</p><p>17:26:38,756 INFO  [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1</p><p>17:26:38,756 INFO  [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled</p><p>17:26:38,756 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled</p><p>17:26:38,756 INFO  [org.hibernate.cfg.SettingsFactory] Order SQL inserts for batching: disabled</p><p>17:26:38,756 INFO  [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory</p><p>17:26:38,762 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory</p><p>17:26:38,762 INFO  [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}</p><p>17:26:38,762 INFO  [org.hibernate.cfg.SettingsFactory] JPA-QL strict compliance: enabled</p><p>17:26:38,762 INFO  [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled</p><p>17:26:38,762 INFO  [org.hibernate.cfg.SettingsFactory] Query cache: disabled</p><p>17:26:38,764 INFO  [org.hibernate.cfg.SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge</p><p>17:26:38,772 INFO  [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider</p><p>17:26:38,775 INFO  [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled</p><p>17:26:38,775 INFO  [org.hibernate.cfg.SettingsFactory] Cache region prefix: persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb</p><p>17:26:38,775 INFO  [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: disabled</p><p>17:26:38,784 INFO  [org.hibernate.cfg.SettingsFactory] Statistics: disabled</p><p>17:26:38,784 INFO  [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled</p><p>17:26:38,784 INFO  [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo</p><p>17:26:38,784 INFO  [org.hibernate.cfg.SettingsFactory] Named query checking : enabled</p><p>17:26:38,784 INFO  [org.hibernate.cfg.SettingsFactory] Check Nullability in Core (should be disabled when Bean Validation is on): disabled</p><p>17:26:38,815 INFO  [org.hibernate.impl.SessionFactoryImpl] building session factory</p><p>17:26:39,055 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb</p><p>17:26:39,057 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}</p><p>17:26:39,060 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=jboss-ejb3-timerservice-mk2.jar#timerdb</p><p>17:26:39,060 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext</p><p>17:26:39,068 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] Running hbm2ddl schema update</p><p>17:26:39,069 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] fetching database metadata</p><p>17:26:39,070 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] updating schema</p><p>17:26:39,072 INFO  [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.</p><p>17:26:39,096 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] table found: PUBLIC.TIMEOUTMETHOD_METHODPARAMS</p><p>17:26:39,097 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [methodparams, timeoutmethod_id]</p><p>17:26:39,097 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: [fkf294c964b7de2d8a]</p><p>17:26:39,097 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [sys_idx_55]</p><p>17:26:39,110 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] table found: PUBLIC.CALENDAR_TIMER</p><p>17:26:39,111 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [scheduleexprtimezone, scheduleexprsecond, autotimer, scheduleexprstartdate, scheduleexprminute, scheduleexprhour, timeoutmethod_id, id, scheduleexprdayofmonth, scheduleexprenddate, scheduleexprmonth, scheduleexprdayofweek, scheduleexpryear]</p><p>17:26:39,111 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: [fk2b697f04b7de2d8a, fk2b697f04e6e6ef93]</p><p>17:26:39,111 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [sys_idx_57, sys_idx_49, sys_idx_59]</p><p>17:26:39,122 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] table found: PUBLIC.TIMEOUT_METHOD</p><p>17:26:39,122 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [id, methodname, declaringclass]</p><p>17:26:39,122 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: []</p><p>17:26:39,122 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [sys_idx_51]</p><p>17:26:39,136 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] table found: PUBLIC.TIMER</p><p>17:26:39,136 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] columns: [id, previousrun, initialdate, repeatinterval, timedobjectid, timerstate, nextdate, info]</p><p>17:26:39,136 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] foreign keys: []</p><p>17:26:39,136 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] indexes: [sys_idx_53]</p><p>17:26:39,138 INFO  [org.hibernate.tool.hbm2ddl.SchemaUpdate] schema update complete</p><p>17:26:39,142 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}</p><p>17:26:39,206 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@1890779401{vfs:///home/yumer/EclipseProjects/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1305132052402/deploy/JBoss-EJB%20MDB%20Tutorial.jar}</p><p>17:26:39,207 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@1890779401{vfs:///home/yumer/EclipseProjects/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1305132052402/deploy/JBoss-EJB%20MDB%20Tutorial.jar}</p><p>17:26:39,226 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@ec3b565 into MC at org.jboss.ejb.bean.instantiator/JBoss-EJB MDB Tutorial/JBoss-EJB MDB Tutorial/MyMDB</p><p>17:26:39,233 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated</p><p>17:26:39,674 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: JBoss-EJB MDB Tutorial.jar</p><p>17:26:39,676 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:jar=JBoss-EJB MDB Tutorial.jar,name=MyMDB,service=EJB3</p><p>17:26:39,676 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:</p><p>17:26:39,676 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:</p><p>17:26:39,676 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss.ejb:service=EJBTimerService; Required: Described</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           persistence.unit:unitName=JBoss-EJB MDB Tutorial.jar#JPA-prueba; Required: Described</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss-injector:topLevelUnit=JBoss-EJB MDB Tutorial.jar,unit=JBoss-EJB MDB Tutorial.jar,bean=MyMDB; Required: Described</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss-switchboard:appName=JBoss-EJB MDB Tutorial,module=JBoss-EJB MDB Tutorial,name=MyMDB; Required: Create</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jndi:null</p><p>17:26:39,677 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           Class:javax.jms.MessageListener</p><p>17:26:39,678 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:jar=JBoss-EJB MDB Tutorial.jar,name=MyMDB,service=EJB3) to KernelDeployment of: JBoss-EJB MDB Tutorial.jar</p><p>17:26:39,722 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=JBoss-EJB MDB Tutorial.jar#JPA-prueba</p><p>17:26:39,764 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: com.my.jms.tutorial.MyMDB ejbName: MyMDB</p><p>17:26:39,799 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>========================================================================================================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> <span class="hps" title="Haz clic para obtener otras posibles traducciones">I want to use</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">CMT</span><span title="Haz clic para obtener otras posibles traducciones">, but</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">I get the</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">following</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">error</span><span title="Haz clic para obtener otras posibles traducciones">:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span title="Haz clic para obtener otras posibles traducciones">Stacktrace:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>========================================================================================================</p><p>17:32:22,188 INFO  [STDOUT] ----------------</p><p>17:32:22,188 INFO  [STDOUT] Received message : </p><p>17:32:22,188 INFO  [STDOUT] Hello World</p><p>17:32:22,189 INFO  [STDOUT] ------D----------</p><p>17:32:22,189 ERROR [org.jboss.ejb3.tx2.impl.CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: </p><p>Exception Description: No transaction is currently active</p><p>17:32:22,189 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] Failed to deliver message: javax.ejb.EJBTransactionRolledbackException: </p><p>Exception Description: No transaction is currently active</p><p>          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148) [:0.0.1]</p><p>          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227) [:0.0.1]</p><p>          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353) [:0.0.1]</p><p>          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]</p><p>          at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:79) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:306) [:1.7.17]</p><p>          at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:299) [:1.7.17]</p><p>          at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:152) [:1.7.17]</p><p>          at $Proxy191.onMessage(Unknown Source)          at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:256) [:6.0.0.Final]</p><p>          at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822) [:6.0.0.Final]</p><p>          at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46) [:6.0.0.Final]</p><p>          at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940) [:6.0.0.Final]</p><p>          at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.0.0.Final]</p><p>          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_18]</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.6.0_18]</p><p>          at java.lang.Thread.run(Thread.java:636) [:1.6.0_18]</p><p>Caused by: javax.persistence.TransactionRequiredException: </p><p>Exception Description: No transaction is currently active</p><p>          at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper.throwCheckTransactionFailedException(EntityTransactionWrapper.java:113) [:2.2.0.v20110202-r8913]</p><p>          at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionWrapper.checkForTransaction(EntityTransactionWrapper.java:50) [:2.2.0.v20110202-r8913]</p><p>          at org.eclipse.persistence.internal.jpa.EntityManagerImpl.checkForTransaction(EntityManagerImpl.java:1666) [:2.2.0.v20110202-r8913]</p><p>          at org.eclipse.persistence.internal.jpa.EntityManagerImpl.joinTransaction(EntityManagerImpl.java:1698) [:2.2.0.v20110202-r8913]</p><p>          at org.jboss.jpa.deployment.ManagedEntityManagerFactory.getTransactionScopedEntityManager(ManagedEntityManagerFactory.java:190) [:1.0.2-alpha-3]</p><p>          at org.jboss.jpa.deployment.PersistenceUnitDeployment.getTransactionScopedEntityManager(PersistenceUnitDeployment.java:178) [:1.0.2-alpha-3]</p><p>          at org.jboss.jpa.impl.tx.TransactionScopedEntityManager.getEntityManager(TransactionScopedEntityManager.java:262) [:2.0.0]</p><p>          at org.jboss.jpa.impl.tx.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:206) [:2.0.0]</p><p>          at com.my.jms.tutorial.MyMDB.onMessage(MyMDB.java:54) [:]</p><p>          at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source) [:1.6.0_18]</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_18]</p><p>          at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_18]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.1.3]</p><p>          at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76) [:1.1.3]</p><p>          at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62) [:1.1.3]</p><p>          at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source) [:1.6.0_18]</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_18]</p><p>          at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_18]</p><p>          at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:74) [:1.1.3]</p><p>          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_6395852.invoke(InvocationContextInterceptor_z_fillMethod_6395852.java) [:]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90) [:1.1.3]</p><p>          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_6395852.invoke(InvocationContextInterceptor_z_setup_6395852.java) [:]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.async.impl.interceptor.AsynchronousServerInterceptor.invoke(AsynchronousServerInterceptor.java:110) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68) [:1.7.17]</p><p>          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]</p><p>          at org.jboss.ejb3.core.context.InvocationContextAdapter.proceed(InvocationContextAdapter.java:70) [:1.7.17]</p><p>          at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223) [:0.0.1]</p><p>          ... 28 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>========================================================================================================</p><p><span title="Haz clic para obtener otras posibles traducciones"><br/></span></p><p>This is my MBD:</p><p>========================================================================================================</p><p>package com.my.jms.tutorial;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>import com.my.jpa.*;</p><p>import javax.ejb.ActivationConfigProperty;</p><p>import javax.ejb.MessageDriven;</p><p>import javax.ejb.TransactionAttribute;</p><p>import javax.ejb.TransactionAttributeType;</p><p>import javax.ejb.TransactionManagement;</p><p>import javax.ejb.TransactionManagementType;</p><p>import javax.jms.JMSException;</p><p>import javax.jms.Message;</p><p>import javax.jms.MessageListener;</p><p>import javax.jms.TextMessage;</p><p>import javax.persistence.PersistenceContext;</p><p>import javax.persistence.EntityManager;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@MessageDriven(</p><p>        activationConfig = </p><p>            {     @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),</p><p>                @ActivationConfigProperty(propertyName="destination", propertyValue="queue/MyQueue"),</p><p>                @ActivationConfigProperty(propertyName = "user", propertyValue = "guest")</p><p>            }</p><p>           )</p><p>public class MyMDB implements MessageListener {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>          @PersistenceContext(unitName = "JPA-prueba") EntityManager em;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    public MyMDB() {</p><p>    }</p><p>    @TransactionAttribute(TransactionAttributeType.REQUIRED)</p><p>    public void onMessage(Message message) {</p><p>              try {</p><p>                              if (!message.getJMSRedelivered()){</p><p>                                        System.out.println("----------------");</p><p>                            System.out.println("Received message : ");</p><p>                            if (message instanceof TextMessage) {</p><p>                                      try {</p><p>                                                            System.out.println(((TextMessage) message).getText());</p><p>                                                  } catch (JMSException e) {</p><p>                                                            // TODO Auto-generated catch block</p><p>                                                            e.printStackTrace();</p><p>                                                  }</p><p>                            }</p><p>                            System.out.println("------D----------");</p><p>                            TemporalSm temporal = new TemporalSm();</p><p>                            temporal.setAni((long) 2414);</p><p>                            temporal.setDnis(3);</p><p>                            temporal.setContent("contenido");</p><p>                            temporal.setContext("contexto");</p><p>                                        em.persist(temporal);</p><p>                                        System.out.println("Here");</p><p>                              }</p><p>                    } catch (JMSException e) {</p><p>                              // TODO Auto-generated catch block</p><p>                              e.printStackTrace();</p><p>                    }</p><p>    }</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>========================================================================================================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Jbos it's telling me: "No transaction is currently active" <span class="hps" title="Haz clic para obtener otras posibles traducciones">but</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">I'm</span> mar<span class="hps" title="Haz clic para obtener otras posibles traducciones">king</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">that the transactions are</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">handled</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">by the container</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">(the</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">default)</span><span title="Haz clic para obtener otras posibles traducciones">.</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">This</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">is logical</span><span title="Haz clic para obtener otras posibles traducciones">?</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">Am I doing</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">something</span> <span class="hps" title="Haz clic para obtener otras posibles traducciones">wrong</span><span title="Haz clic para obtener otras posibles traducciones">?</span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/605050#605050">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>