EJB Entity transaction rollback problem

          Hello,
          I have created 2 beans one is a Stateless Session and the other a Bean Managed Entity Bean. The SS Bean has methods to retrieve an Oracle Connection from a DataSource defined connection pool, and to close a connection. The entity bean I have created is responsible for insterting a new record into one of the tables in my database.
          I have a client app that calls the ejbCreate method on the entity bean at which point the Entity EJB takes control, gets a valid connection from the SS EJB, runs a simple working SQL SELECT statement (obtaining correct values), and then attempts to perform an insert into a table using a prepared statement. My problem is that the application runs fine without any errors and all calls are made and all calls seem to be working fine. I have checked to make sure that the Datasource I am using is AutoCommit= false and it is and there are no exceptions being thrown in my EJB's but yet it appears as though the SQL statements executeUpdate() command is not being committed as their is no rows created in the database. Does anyone know what I may be doing wrong. I have all ACL parameters set up correctly and as I stated before the entire app runs without errors and I do have a SELECT statment that is working properly within the same method as the INSERT statement which is not!!! Please send any suggestions!!
          Justin
          

          I am using CMT, it is activated by default on Entity Beans I believe. The bean itself is marked as TX_REQUIRED so I believe all the methods automatically are all TX_REQUIRED.
          Here is my Bean ejbCreate Method, My PK class, and my ejb-jar.xml file-- I've pasted them below for convenience.
          ejbCreate:
               public CustomerPK ejbCreate(String aUserName, String aPassword, String aFirstName,
                    String aMiddleInit, String aLastName, String aEmailAddr)
                    throws javax.ejb.CreateException {
               Connection conn=null;
               long nextPrsnID;
               long nextCustID;
               if (verifyParams(aUserName, aPassword, aFirstName, aMiddleInit,
                    aLastName, aEmailAddr)) {
               if (isUniqueUserName(aUserName)) {
               try {
                    conn=getConnection();
                    conn.setAutoCommit(false);
                    nextPrsnID=addPerson(conn,aFirstName,aMiddleInit,aLastName); // adds a person to the person table consists of just simple SQL
                    nextCustID=addCustomer(conn,nextPrsnID, aUserName,aPassword, aEmailAddr); //adds a customer to the customer table
                    // SET THE BEAN MANAGED PUBLIC VARIABLES
                    this.userName=aUserName;
                    this.password=aPassword;
                    this.firstName=aFirstName;
                    this.middleInit=aMiddleInit;
                    this.lastName=aLastName;
                    this.emailAddr=aEmailAddr;
                    this.personID=nextPrsnID;
                    this.custID=nextCustID;
                    conn.commit(); // with this statement here the transaction goes through otherwise the DB will not be updated
               catch (Exception e){
                    throw new javax.ejb.CreateException("Experiencing Database Problems-- Unrecoverable Error"); // rollback transaction
               finally{
                    cleanup(conn,null); // close the connection
               else {           // UserName already exists
               throw new javax.ejb.CreateException("Sorry username already exists please choose another one");
               else {          // Registration parameters were not verifiable
               throw new javax.ejb.CreateException("Registration paramater rules were violated");
               CustomerPK custPK=new CustomerPK(nextCustID);
               return custPK;
          EJB CUSTOMER PRIMARY KEY CLASS:
          public class CustomerPK implements java.io.Serializable {
          // PRIMARY KEY VARIABLES
          public long CustomerID;
          public CustomerPK(long aCustomerID) {
          this.CustomerID=aCustomerID;
          public CustomerPK() {
          public String toString(){
          return ((new Long(CustomerID)).toString());
          public boolean equals(Object aComparePK){
          if (this.CustomerID==((CustomerPK)aComparePK).CustomerID){
               return true;
          return false;
          public int hashCode(){
          return ((new Long(CustomerID).toString()).hashCode());
          } // END-CLASS
          CUSTOMER ejb-jar.xml
          <?xml version="1.0"?>
          <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
          <ejb-jar>
          <enterprise-beans>
          <entity>
               <ejb-name>Customer</ejb-name>
               <home>CustomerHome</home>
               <remote>Customer</remote>
               <ejb-class>CustomerBean</ejb-class>
               <persistence-type>Bean</persistence-type>
               <prim-key-class>CustomerPK</prim-key-class>
               <reentrant>False</reentrant>
               <resource-ref>
          <res-ref-name>jdbc/DeveloperPool</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
          </resource-ref>
          </entity>
          </enterprise-beans>
          <assembly-descriptor>
          <container-transaction>
               <method>
               <ejb-name>Customer</ejb-name>
               <method-intf>Remote</method-intf>
               <method-name>*</method-name>
               </method>
               <trans-attribute>Required</trans-attribute>
          </container-transaction>
          </assembly-descriptor>
          </ejb-jar>
          "Cameron Purdy" <[email protected]> wrote:
          >Are you using CMT? Have you marked the methods as REQUIRED?
          >
          >Peace,
          >
          >--
          >Cameron Purdy
          >Tangosol, Inc.
          >http://www.tangosol.com
          >+1.617.623.5782
          >WebLogic Consulting Available
          >
          >
          >"Justin Jose" <[email protected]> wrote in message
          >news:[email protected]...
          >>
          >> Hello,
          >>
          >> I have created 2 beans one is a Stateless Session and the other a Bean
          >Managed Entity Bean. The SS Bean has methods to retrieve an Oracle
          >Connection from a DataSource defined connection pool, and to close a
          >connection. The entity bean I have created is responsible for insterting a
          >new record into one of the tables in my database.
          >> I have a client app that calls the ejbCreate method on the entity bean at
          >which point the Entity EJB takes control, gets a valid connection from the
          >SS EJB, runs a simple working SQL SELECT statement (obtaining correct
          >values), and then attempts to perform an insert into a table using a
          >prepared statement. My problem is that the application runs fine without
          >any errors and all calls are made and all calls seem to be working fine. I
          >have checked to make sure that the Datasource I am using is AutoCommit=
          >false and it is and there are no exceptions being thrown in my EJB's but yet
          >it appears as though the SQL statements executeUpdate() command is not being
          >committed as their is no rows created in the database. Does anyone know
          >what I may be doing wrong. I have all ACL parameters set up correctly and
          >as I stated before the entire app runs without errors and I do have a SELECT
          >statment that is working properly within the same method as the INSERT
          >statement which is not!!! Please send any suggestions!!
          >>
          >> Justin
          >
          >
          

Similar Messages

  • Transaction rollback problem

    Hi,
    Transaction is not rolled back if a stored procedure is called from BMP.
    The flow is as follows:
    Stateless Session Bean --> BMP Bean --> DAO -->method 1, method 2
    method 1 has a call to Stored Procedure which does update operations on DB.
    method 2 has JDBC insert queries
    After completion of method1, there is an exception in method 2. Hence transaction done by the method 1 should be rolled back. But the behavior is different. The Stored Procedure updates are committed even though there is an exception in method 2.
    We are using CMT and Required attribute is set for the beans. We are throwing EJBException in all catch blocks.
    Any suggestions? App server is JBoss 4.2.2
    Thanks.

    update operations in what way? Are there DDL operations in there? If so, then this is an implicit commit and you cannot roll the changes back.
    What does the documentation of the DBMS say about stored procedures anyway? Might be that a stored procedure call is implicitly committed by the DBMS.

  • Pls help:  Transaction rollback

    Hi
    We are facing an problem in WLS10. Although I have configured the JTA TimeoutSeconds to 1800 sec, I always hit transaction rollback problem when 30 sec passed. Appreciate your help on this problem.
    DataSource Configuration:
    <jdbc-driver-params>
    <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <max-capacity>50</max-capacity>
    <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
    <jndi-name>jdbc/rms/ctleave</jndi-name>
    <jndi-name></jndi-name>
    <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
    JTA configuration:
    -r-- AbandonTimeoutSeconds 86400
    -r-- BeforeCompletionIterationLimit 10
    -r-- CheckpointIntervalSeconds 300
    -r-- ForgetHeuristics true
    -r-- MaxResourceRequestsOnServer 50
    -r-- MaxResourceUnavailableMillis 1800000
    -r-- MaxTransactions 10000
    -r-- MaxUniqueNameStatistics 1000
    -r-- MaxXACallMillis 120000
    -r-- Name LEAVE2FE2
    -r-- Notes null
    -r-- SecurityInteropMode default
    -r-- SerializeEnlistmentsGCIntervalMillis 30000
    -r-- TimeoutSeconds 1800
    -r-- Type JTA
    -r-- UnregisterResourceGracePeriod 30
    -r-x freezeCurrentValue Void : String(attributeName)
    -r-x isSet Boolean : String(propertyName)
    -r-x unSet Void : String(propertyName)
    Exception log:
    Exception Occured, Failure creating new instance of RowMapper, org.apache.beehive.controls.api.ControlException: RowToObjectMapper: SQLEx
    ception: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
    BEA1-00A6A99F8ED0E04484B3
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1419)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)
    at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:189)
    at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:64)
    at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)
    at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnCount(Unknown Source)
    at org.apache.beehive.controls.system.jdbc.RowToObjectMapper.<init>(RowToObjectMapper.java:63)
    at sun.reflect.GeneratedConstructorAccessor141.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getMapper(RowMapperFactory.java:160)
    at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getRowMapper(RowMapperFactory.java:85)
    at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.arrayFromResultSet(DefaultObjectResultSetMapper.java:93)
    at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.mapToResultType(DefaultObjectResultSetMapper.java:61)
    at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.execPreparedStatement(JdbcControlImpl.java:370)
    at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.invoke(JdbcControlImpl.java:228)
    ...

    Hi. Can you turn on JTA logging? The output will show each step in the
    transaction. This should be in the transaction newsgroup.
    Joe
    Shen XiaoChun wrote:
    Hi
    We are facing an problem in WLS10. Although I have configured the JTA TimeoutSeconds to 1800 sec, I always hit transaction rollback problem when 30 sec passed. Appreciate your help on this problem.
    DataSource Configuration:
    <jdbc-driver-params>
    <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
    </jdbc-driver-params>
    <jdbc-connection-pool-params>
    <max-capacity>50</max-capacity>
    <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>
    </jdbc-connection-pool-params>
    <jdbc-data-source-params>
    <jndi-name>jdbc/rms/ctleave</jndi-name>
    <jndi-name></jndi-name>
    <global-transactions-protocol>TwoPhaseCommit</global-transactions-protocol>
    </jdbc-data-source-params>
    JTA configuration:
    -r-- AbandonTimeoutSeconds 86400
    -r-- BeforeCompletionIterationLimit 10
    -r-- CheckpointIntervalSeconds 300
    -r-- ForgetHeuristics true
    -r-- MaxResourceRequestsOnServer 50
    -r-- MaxResourceUnavailableMillis 1800000
    -r-- MaxTransactions 10000
    -r-- MaxUniqueNameStatistics 1000
    -r-- MaxXACallMillis 120000
    -r-- Name LEAVE2FE2
    -r-- Notes null
    -r-- SecurityInteropMode default
    -r-- SerializeEnlistmentsGCIntervalMillis 30000
    -r-- TimeoutSeconds 1800
    -r-- Type JTA
    -r-- UnregisterResourceGracePeriod 30
    -r-x freezeCurrentValue Void : String(attributeName)
    -r-x isSet Boolean : String(propertyName)
    -r-x unSet Void : String(propertyName)
    Exception log:
    Exception Occured, Failure creating new instance of RowMapper, org.apache.beehive.controls.api.ControlException: RowToObjectMapper: SQLEx
    ception: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 30 seconds
    BEA1-00A6A99F8ED0E04484B3
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1419)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1331)
    at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:189)
    at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:64)
    at weblogic.jdbc.wrapper.ResultSetMetaData.preInvocationHandler(ResultSetMetaData.java:37)
    at weblogic.jdbc.wrapper.ResultSetMetaData_oracle_jdbc_driver_OracleResultSetMetaData.getColumnCount(Unknown Source)
    at org.apache.beehive.controls.system.jdbc.RowToObjectMapper.<init>(RowToObjectMapper.java:63)
    at sun.reflect.GeneratedConstructorAccessor141.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getMapper(RowMapperFactory.java:160)
    at org.apache.beehive.controls.system.jdbc.RowMapperFactory.getRowMapper(RowMapperFactory.java:85)
    at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.arrayFromResultSet(DefaultObjectResultSetMapper.java:93)
    at org.apache.beehive.controls.system.jdbc.DefaultObjectResultSetMapper.mapToResultType(DefaultObjectResultSetMapper.java:61)
    at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.execPreparedStatement(JdbcControlImpl.java:370)
    at org.apache.beehive.controls.system.jdbc.JdbcControlImpl.invoke(JdbcControlImpl.java:228)

  • High 'transaction rollback' (statistic# = 172) investigation

    Hi,
    I'm trying to investigate what could cause high transaction rollback .
    First think was ora-0001 unique constraint violation but I can't see any err=1:
    grep err=1 ora_1544382.trc
    in trace file .
    Do You have any idea what else can cause hight transaction rollback problem in JDBC connections (maybe somekind of timeouts) ?
    There is no clue in 10046 trace with lvl 12 maybe other trace ?
    Connections are made throught connection pool from Websphere Application Server dont know if thats relevant.
    Maybe some JDBC properties interfere, can't see thing in trace files.
    Database is 9.2.0.8
    Regards.
    GG

    user10388717 wrote:
    Hi,
    I'm trying to investigate what could cause high transaction rollback .
    First think was ora-0001 unique constraint violation but I can't see any err=1:
    grep err=1 ora_1544382.trc
    in trace file .
    What did you do to record the appearance of the "transaction rollbacks". Was this taking a snapshot of the session's statistics as the trace file was generated ?
    Essentially any transaction that rolls back and clears the undo segment header will report as a "transaction rollback" - including some internal transactions.
    Example 1) Inserting a row into a "child" table when the "parent" doesn't exist will error with ORA-02291 (parent not found). If this was the first DML of a transaction the resulting rollback will show as a "transaction rollback".
    Example 2) An index leaf block split picks an unsuitable block off the freelist and starts an internal transaction; when Oracle realises it was an unsuitable block the transaction rolls back.
    One quick cross-check for Dom Brooks' idea: if this is the front end code deliberately starting a transaction and rolling it back, then "user rollbacks" will be similar to "transaction rollbacks". If it's not user driven then you may have more transaction rollbacks than user rollbacks. Unfortunately, if the front-end issues a rollback after every query (i.e. without starting a transaction) then these rollbacks will show as user rollbacks but not transaction rollbacks and confuse the issue.
    Having checked your trace for error 00001, you might as well check just for "ERR".
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help-Problem in calling JMS  inside an EJB having  transaction attribute Required New

              Hi,
              Version wl 5.1 service pack 8
              OS - unix
              I am using a Container managed bean say Bean1(transaction attribute Required)
              which in one of its method is trying to call another EJB say Bean2 which has the
              transaction attribute set to "RequiredNew".Inside the method in Bean2 i have my
              JMS funtions coded to persist to database.JMS uses Queue connection factory and
              is an non transaction JMS session.The JMS server is running in a separate weblogic
              server and not in the server where EJB is deployed.I use the url of the JMS server
              and get the context of that server and connect my JMS.
              The problem that i am facing is
              I do the transaction in bean1 and the i make the call to bean2 to do the JMS work
              and i can see the JMS doing the insert in the table and everthing works fine.But
              after few seconds i can see the exception/message seen on the console of the weblogic
              server where my JMS server is running as below
              Tue Sep 04 15:57:09 CDT 2001:<I> <TX> Transaction (TxC (30486015, xid = 99963563
              2756_5, timeout = 30, txState = Marked Rollback, root = 829817264280676325S10.51
              .110.237:[7001,7001,7002,7002,7001,-1]/326) rolled back after 30 sec.
              After this happen i dont see any roll back in either bean1 or bean2 or the JMS
              insert is rolled back.
              I don't know why this exception is thrown and no effects on the rollback and it
              works the way i wanted.But the only thing that keeps bothering me is the rollback
              and why does this happen.
              Thanks
              Krish.
              

    The exception your seeing is troubling - if the tran is rolled
              back than whatever work is associated should also roll back. I suggest
              instrumenting your code to see if the tran rolling back is the same tran
              that is being used for the transactional application work that appears to succeed.
              Also, try forcing a rollback, you may see that the EJB work truly rolls back
              while the JMS work does not.
              I'm not really familiar with 5.1, but I know there is a fundamental limitation to one
              phase commits, this means that the JDBC connection pool used by JMS as well
              as that used by the EJB must be one and the same - I'm not exactly sure how
              it works, but I'm pretty sure multiple servers can share the same connection pool.
              This post seems unrelated to clustering, if you need further help, I
              suggest posting in the ejb or transaction newsgroups.
              Krish wrote:
              > Hi,
              >
              > Version wl 5.1 service pack 8
              > OS - unix
              >
              > I am using a Container managed bean say Bean1(transaction attribute Required)
              > which in one of its method is trying to call another EJB say Bean2 which has the
              > transaction attribute set to "RequiredNew".Inside the method in Bean2 i have my
              > JMS funtions coded to persist to database.JMS uses Queue connection factory and
              > is an non transaction JMS session.The JMS server is running in a separate weblogic
              > server and not in the server where EJB is deployed.I use the url of the JMS server
              > and get the context of that server and connect my JMS.
              >
              > The problem that i am facing is
              >
              > I do the transaction in bean1 and the i make the call to bean2 to do the JMS work
              > and i can see the JMS doing the insert in the table and everthing works fine.But
              > after few seconds i can see the exception/message seen on the console of the weblogic
              > server where my JMS server is running as below
              >
              > Tue Sep 04 15:57:09 CDT 2001:<I> <TX> Transaction (TxC (30486015, xid = 99963563
              > 2756_5, timeout = 30, txState = Marked Rollback, root = 829817264280676325S10.51
              > 110.237:[7001,7001,7002,7002,7001,-1]/326) rolled back after 30 sec.
              >
              >
              > After this happen i dont see any roll back in either bean1 or bean2 or the JMS
              > insert is rolled back.
              >
              > I don't know why this exception is thrown and no effects on the rollback and it
              > works the way i wanted.But the only thing that keeps bothering me is the rollback
              > and why does this happen.
              >
              > Thanks
              >
              > Krish.
              

  • Problems accessing tables in oracle database with ejb entity bean

    I have created a simple server application that uses an entity bean (version 2.0) for an existing table in oracle database, and a session bean that is used as an outside interface for performing operations on that table.
    after deploying the server and client application the client attempts to perform an operation with the session bean remote interface it obtained.
    The session bean uses a locale interface to communicate with the entity bean, but when it tries to use its methods (create, findByXXX) it always get the following Exception: java.sql.SQLException: ORA-00942: table or view does not exist.
    the table of course exists, and the username password I'm using has all the permissions needed for this table.
    note - I'm using the Forte enterprise edition 4.0 as developer tool.
    I'll be glad to get some help.
    Here is the full stack trace of the exception:
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
    java.sql.SQLException: ORA-00942: table or view does not exist
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
    at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
    at com.sun.ejb.persistence.SQLEngine.ejb20Finder(SQLEngine.java:226)
    at com.sun.ejb.persistence.PartitionImpl.ejbFinder(PartitionImpl.java:736)
    at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM.ejbFindByEmail(UserInfoEJB_PM.java:393)
    at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM_LocalHomeImpl.findByEmail(UserInfoEJB_PM_LocalHomeImpl.java:64)
    at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:77)
    at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:68)
    at com.cti2.telco.core.ejb.UserManagerEJB_EJBLocalObjectImpl.authenticate(UserManagerEJB_EJB
    LocalObjectImpl.java:63)
    at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB.userLogin(TelcoFacadeEJB.java:80)
    at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB_EJBObjectImpl.userLogin(TelcoFacadeEJB_EJBObjectImpl.java:24)
    at com.cti2.telco.core.ejb.dispatch._TelcoFacadeEJB_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
    at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
    at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    ...

    Well it seems like the problems has a simple explanation. The Forte assigns a default table name (<entityName>EJBTable) when creating an entity bean from an existsing table in DB (which is not the same as the one it was created from !!!). Also, for reason unknown, when you deploy these entity beans, it doesn't even create the new table under its new name (even if instructed to).
    So using the Forte we managed to use successfuly only entity beans that were created "from scretch" (when deployed their tables are created).
    Does anyone know how to change the default name the Forte uses, and make it work properly with entity beans created from an existsing table (without going over the xml's) ?

  • Javax.ejb.EJBException: Transaction aborted

    Hello everyone, I am new in javaEE6. When i try to develop and simple example i meet this error but i can't find which code line cause it. I use JSF EJB3.1 EclipseLink JPA 2.0 in Glassfish v3 and developed in Netbean6.8. Here is my Stack trace .
    Caused by: javax.ejb.EJBException: Transaction aborted
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:4997)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4756)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1955)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1906)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:198)
         at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
         at $Proxy158.createUsers(Unknown Source)
         at home.tuan.bussiness.__EJB31_Generated__UsersEJB__Intf____Bean__.createUsers(Unknown Source)
         at home.tuan.controller.UsersController.doCreateUser(UsersController.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:234)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
         at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
         ... 32 more
    Caused by: javax.transaction.RollbackException: Transaction marked for rollback.
         at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:450)
         at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:837)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:4991)
         ... 48 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "." at line 1, column 29.
    Error Code: -1
    Call: INSERT INTO ChatDatabase.dbo.Users (UserName, Pass) VALUES (?, ?)
         bind => [er, w]
    Query: InsertObjectQuery(home.tuan.model.Users@825299)My Entity is:
    package home.tuan.model;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    * @author minhtuan
    @Entity
    @Table(name = "Users", catalog = "ChatDatabase", schema = "dbo")
    public class Users implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id  
        @Column(name = "UserName")
        private String userName;
        @Column(name = "Pass")
        private String pass;
        public Users() {
        public Users(String userName, String pass) {
            this.userName = userName;
            this.pass = pass;
        public String getUserName() {
            return userName;
        public void setUserName(String userName) {
            this.userName = userName;
        public String getPass() {
            return pass;
        public void setPass(String pass) {
            this.pass = pass;
    }My session bean is:
    package home.tuan.bussiness;
    import home.tuan.model.Users;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.Query;
    * @author minhtuan
    @Stateless
    public class UsersEJB {
      @PersistenceContext(unitName="MavenTestPU")
      private EntityManager em ;
      public Users createUsers(Users newUser){
          em.persist(newUser);
          return newUser;
    }My controller class is:
    package home.tuan.controller;
    import home.tuan.bussiness.UsersEJB;
    import home.tuan.model.Users;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
    import javax.persistence.EntityTransaction;
    import javax.persistence.Persistence;
    import javax.transaction.UserTransaction;
    * @author minhtuan
    @ManagedBean(name="UsersController")
    @RequestScoped
    public class UsersController {
        /** Creates a new instance of UsersController */
        @EJB
        UsersEJB userEJB;
        Users newUser = new Users();
        List<Users> listUsers = new ArrayList<Users>();
        public String doNewUser(){
            return "index.jsp";
        public String doCreateUser(){
            System.out.println("Den day rui");
            System.out.println(newUser.getUserName());
            System.out.println(newUser.getPass());
            newUser = userEJB.createUsers(newUser);
            return "index.jsp";
        public List<Users> getListUsers() {
            return listUsers;
        public void setListUsers(List<Users> listUsers) {
            this.listUsers = listUsers;
        public Users getNewUser() {
            return newUser;
        public void setNewUser(Users newUser) {
            this.newUser = newUser;
    }And my persistence.xml is:
    <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="MavenTestPU" transaction-type="JTA">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <class>home.tuan.model.Users</class>
        <properties>
            <!--
          <property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost:1433;databaseName=ChatDatabase"/>
          <property name="javax.persistence.jdbc.password" value="12345"/>
          <property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
          <property name="javax.persistence.jdbc.user" value="sa"/>
          -->
           <property name="eclipselink.target-database" value="SQLSERVER"/>
           <property name="eclipselink.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
           <property name="eclipselink.jdbc.url" value="jdbc:sqlserver://localhost:1433;databaseName=ChatDatabase"/>
                <!--<property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>-->
                <!--<property name="eclipselink.jdbc.url" value="jdbc:derby:chapter10DB;create=true"/>-->
           <property name="eclipselink.jdbc.user" value="sa"/>
           <property name="eclipselink.jdbc.password" value="12345"/>
                <!--property name="eclipselink.ddl-generation" value="update"/-->
                <!--property name="eclipselink.ddl-generation" value="drop-and-create-tables"/-->
           <property name="eclipselink.logging.level" value="INFO"/>
        </properties>
      </persistence-unit>
    </persistence>Thanks in advance
    Edited by: ActiveDean on Dec 24, 2009 4:38 PM

    You need to step through a debugger and find the source of your problem as something is clearly going wrong and causing the transaction to roll back. That is all that message tells us.
    m

  • EJB nested transaction handling.

    My situation closely relates to the round-trip planning problem. I have a series of say 5 EJBs (session and entity both involved) doing a particular work. If an error occurs at the EJB 5 stage, I don't want to rollback the work done in EJB 1 and 2 but I want EJB 3 onwards to rollback. Is this kind of nested transaction model possible. Please note that I want to use container-managed-transactions. If not possible, please guide me how can I use bean-managed-transaction to solve it? Thanks in advance for any help.

    Yes, it is possible, but you have to make sure that ANY call to EJB 3 through that method has the same requirements:
    EJB 1 - Transaction = Required
    EJB 2 - Transaction = Required
    EJB 3 - Transaction = Requires New (starts a new transaction, "holds" the one from 1 & 2)
    EJB 4 - Transaction = Requires
    EJB 5 - Transaction = Requires

  • Transaction rollback or commit

    Hello to everybody...I'd need a solution for a probem that I 'm not able to resolve.I have a session bean on the server ( WeblogicServer 8.1 Sp3 ) and a Java Swing client.I need to break and rollback a long process on the server by client swing button pression.I have thought to create a user transaction (under a client thread process) on the client and I try to propagate it to the container ( Container Managed Transaction).Now I have to break the long time server operation at certain moment by make a rollback on the client trasaction,after the button pression.The problem is that the rollback DOES NOT ARRIVE to the server and the sever process continue to operate.How this is possible?I think that I make basic mistake,but which?Can Anyone help me please?
    thanks for help and sorry for bad english.

    whaqt I need to do is to break and rollback the transaction ( REQUIRED on the container ) by the client when I want....Whit this prototipe now I try to pass the transaction rollback operation from the client to the server,bt now the message on the server is the following:
    java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 33 seconds
    Xid=BEA1-00006D5145365E026810(6407574),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=1,seconds since begin=33,seconds left=30,activeThread=Thread[ExecuteThread: '23' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=started,assigned=none),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@f30862,re-Registered = false),SCInfo[mydomain+IRMA_Admin]=(state=active),properties=({weblogic.jdbc=t3://10.2.1.16:10004}),CoordinatorURL=IRMA_Admin+10.2.1.16:10004+mydomain+t3+)]'. No further JDBC access is allowed within this transaction.
    at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:155)
    at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:164)
    at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:234)
    at weblogic.jdbc.wrapper.Statement.preInvocationHandler(Statement.java:83)
    at weblogic.jdbc.wrapper.Statement_oracle_jdbc_driver_T4CStatement.clearBatch(Unknown Source)
    at irma.utility.database.DataBaseUtility.executeBatchUpdate(DataBaseUtility.java:62)
    at irma.technology.IrmaTechno.updateDBData(IrmaTechno.java:1077)
    at irma.business.service.ImportService.importFileEricsson(ImportService.java:698)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at irma.business.Dispatcher.callService(Dispatcher.java:66)
    at irma.ejb.serviceSessionManager.ServiceSessionManagerBean.getService(ServiceSessionManagerBean.java:67)
    at irma.ejb.serviceSessionManager.ServiceSessionManager_b1engw_EOImpl.getService

  • Transaction rollback failure for a function

    My aim is to have two sql 'inserts' in one function. The function is covered by the 'Required' attribute in the xml file. The data source is used from the 'ejb-location'. If one insert fails , the container rolls back all the other database inserts in the function. But the code working in the J2EE implementation is not working in the OC4J one. Do I have to go for a 'resource ref' in the xml file, is it because of this the transaction fails? Because in all the examples everyone accesses the data sources using the jdbc/XXXXX which is there in the data sources.xml directly.
    the code is shown below.
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@192.168.0.5:1521:dcom"
    inactivity-timeout="30"
    />
    The code in the bean (Session)
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource)ic.lookup("jdbc/OracleCoreDS");
    Connection con = ds.getConnection();
    I have two updates in one function (setDBItems()). I have put a 'Required' attribute for it in the ejb-jar.xml
    <container-transaction>
    <description>no description</description>
    <method>
    <ejb-name>MyCart</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>MyCart</ejb-name>
    <method-name>setDBItems</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    <method-param>java.lang.String</method-param>
    </method-params>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    The problem here is that the first update occurs but when the second fails the first does not rollback.
    As per my understanding any problem in one of the database transactions in the function rolls back al the others
    in the same function.
    Any clue on this? If you have some example code on this, could you please send it to me?
    Thanks in advance
    null

    If you want to use the "ejb-location" data source, you should refer the "jdbc/OracleDS" which is defined in your data-sources.xml instead of "jdbc/OracleCoreDS" that is "location" datasource.
    Besides, maybe you could use a "resource-ref" to lookup the data source in your code instead of using its JNDI location. The JNDI location is defined by deployer at runtime, but the resource-ref could be defined by developer in source code and J2EE standard deployment descriptor during development procedure. It's not hard coded.
    Good Luck!
    null

  • Transaction Rollback Issue in SOA Suite

    Hi All,
    We have been facing the transaction rollback issue very frequently and looking for a concrete solution on this. We have a Asynchronous BPEL process which calls a webservice in a loop of say 20 iteration. In the loop sometimes we face this transaction rollback issue and apparently the CatchAll block doesn't capture this.
    In many blogs and oracle metalink we have seen few settings for this and made as per below :
    1. JTA Transaction timeout increase : we have it 10000 sec.
    2. The Data Source settings : 2.1 : XA transaction timeout check-box selected
    2.2 : The Initial Capacity : 10, Maximum Capacity : 200 and Capacity Increment = 5
    3. soa-infra -> EJBs -> set the transaction timeout to 1200 for many of the recommended BPELs
    4. DISTRIBUTED_LOCK_TIMEOUT = 120 sec.
    In short, all the recommended settings are in place. But still, we are facing this issue. Does anyone know if anything is missing in the setting ? Or any other solution to the issue?
    Any help is truly appreciated.
    Thanks,
    Ashwini

    I think, even if you change the setting you may not get rid of this problem permanently. Try to avoid call to the webservice in a loop and look for any other alternate solution like JMS (thread should not block for the response of the webservice).

  • [JPA] What is the best strategy to revert an entity after rollback?

    Hi,
    Let's assume we have the following scenario:
    I have instantiated an entity, I have populated it with data and I have sent it to an EJB3 to be persisted. In the beginning, the entity's ID is null. So, in the EJB3 we might have something like the following code:
        @PersistenceContext(unitName="someUnit") private EntityManager em;
        @Resource private SessionContext ctx;
    try {
        em.persist(theEntity);       // (L1)
        em.flush();                  // (L2)
        ... >>> call a stored procedure <<< ...
        if (resultOfTheStoredProcedureIndicatesFailure)
            ctx.setRollbackOnly();   // (L3)
    } catch(Throwable t) {
        ctx.setRollbackOnly();       // (L4)
        ... >>> do whatever else is necessary <<< ...
    }Ok, on line (L1) the value for the @Id column gets selected from the sequence and assigned to the appropriate entity field.
    Line (L2) flushes the data to the database, so that the stored procedure will see it.
    Then the stored procedure is called, it fails for some reason and on line (L3) we indicate that we wish to rollback the transaction. And it gets rolled back.
    So far, so good.
    But after the rollback, the entity already has an ID value assigned to its @Id field. And, if optimistic locking is used (that is, @Version), then the version will be assigned too.
    So, is there a recommended way to revert the entity back to its original pristine state? Is it possible that the new "dirty" entity may cause problems along the way, if we retry the operation? I checked both with persist() and merge() on the "dirty" entity and they both seemed to work, albeit with additional DB round-trips.
    Best regards,
    Bisser

    Hello,
    For calendar and contacts, there is this:
    http://supportforums.blackberry.com/t5/BlackBerry-Q10/How-To-OTA-Sync-BB10-and-non-BES-Outlook-Overv...
    With that, I actually keep all of the following in sync:
    Two instances of Desktop Outlook (2007 and 2010)
    Z10
    PlayBook
    Outlook.com
    And, before I decommissioned it, also an Android device. Any device that can synchronize with Outlook.com can use this solution to keep in sync for calendar and contacts. You, of course, need to not use solely local contacts and calendar but instead keep them synchronizing with Outlook.com.
    For the other things you mention, I know of no solutions other than backup/restore...but I do not recall if LINK offers the selective method for those.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • EJB entity beans and BC4J

    I have looked at BC4J and it looks good. Buy my question is that isn't this frame work in direct conflict with EJB entity beans. I know lot of stuff that is there in BC4J should have been in EJB enitiy beans, but as a developer why should I go with BC4J and not the standard EJB stuff considering the fact that BC4J is properietery to Oracle?Any thoughts?

    Vimal,
    Without going into exhaustive detail here, I would like to recommend that you take a look at the BC4J Technical White Paper available from the JDeveloper page on OTN (in the 3.0 Technical Information section):
    http://technet.oracle.com/products/jdev/info/techwp20/wp.html
    Amoung other things to note, BC4J is based on pure Java, and is what we consider a 'white box', meaning, you as a developer have complete control over what is going on. You can extend any of the code generated to customize it.
    Primarily though, the major benefit of BC4J is that we have taken care of most of the complicated communication code for you. Communication between the client and the data server, transaction handling, row locking, etc are already written for you. You just use, extend, customize what we have provided.
    In addition, BC4J allows you flexibility in your deployment environment decision. Regardless of where and how you deploy your BC4J Application Module, the client is unchanged.
    Those are the key advantages. Again, for more details, I would take a look at the white paper to see if it more fully addresses your questions.

  • Missing cleanup() after second (local) transaction rollback

              I wrote a simple dummy ressource adapter with local and XA transaction support and
              discovered some problems when using this adapter within an stateless session bean
              that calls setRollbackOnly().
              If I configure the resource adapter for XATransaction support, everything runs fine:
              WebLogic (or its ConnectionManager) detects the transaction rollback calls my cleanup()
              method and delists the connection from the list of busy connections (so I can do
              my rollback test with this connection a often as I want).
              If I configure my resource adapter for LocalTransaction support, the connection also
              is delisted from the list of busy connections (my cleanup method also is called)
              but after a second rollback test the connection remains in the busy connection list
              (and the cleanup call is missing). So calling the rollback test a third time brings
              a ResourceAllocationException.
              I am wondering whether the "mysterious" java.lang.IllegalStateException: Cannot delist
              resource, transaction has been rolled back
              that comes within my server log has something to do with my problem.
              Attched is my server log that reflects the situation.
              Thanks for any hint,
              juergen
              [connectorlog.txt]
              

    Hi Neelam,
    I am sure what exactly your application needs for single-threaded process.
    If you have some thread context in a given thread that you need for correctly handle all message, then you may try to set max-free-pool-size to 1 on the MDB to force single threaded.
    You can find more information in MDB tuning doc at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13814/mdbtuning.htm#PERFM271
    If all you need is to sequentially handle all messages and it does not matter if the processing is done in a particular thread, you could use a JMS feature called Unit-of-order (UOO) together with MDBs. JMS UOO gives you the capability of making sure all messages in one UOO group are processed sequentially and in the order that them are produced, even when there are multiple consumers or redelivery of messages due to fialures. Messages in different UOO groups can be processed in parallel.
    For more information about UOO can be found at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13727/uoo.htm#JMSPG389
    The following link discusses how to process messages in order with MDBs. Re: Transaction-Rollback on foreign jms queue usin Singletonservice in weblogic
    Hope these links help you find the right solution for your application.
    Dongbo

  • Reg MDB transaction rollback

    i have an MDB deployed on weblogic 8.1 sp6 server. My confusion here is how the MDB handles transaction rollbacks. E.g suppose if the MDB is designed to do the below action.
    1) read an xml message from a jms queue
    2) insert some database records
    3) generate some xml message, post it to some other jms queue
    suppose if step 1 and 2 is completed, and its on step 3, at this point weblogic server shutdowns suddenly, once i restart the server, it reads the xml message again from the jms queue, but this time it errors out, because it finds the data already entered in step 2.
    My question is when the weblogic server shut down while the mdb was at step 3, why didnt it removed all the db entries it made in step 2. This behaviour apears to me as partial rollback. I have given the mdb descriptor below.
    <ejb-jar>
      <enterprise-beans>
        <message-driven>
          <ejb-name>CSS_Response</ejb-name>
          <ejb-class>com.bt.neo.core.utility.appcontroller.transport.mdb.JmsMessageReceiver</ejb-class>
          <transaction-type>Container</transaction-type>
          <acknowledge-mode>auto-acknowledge</acknowledge-mode>
          <message-driven-destination>
            <destination-type>javax.jms.Queue</destination-type>
          </message-driven-destination>
          <env-entry>
            <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>core-css-response-inbound.xml</env-entry-value>
          </env-entry>
          <env-entry>
            <env-entry-name>ProcessorBeanName</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>transportAdaptor</env-entry-value>
          </env-entry>
          <resource-ref>
            <res-ref-name>jms/faultTo</res-ref-name>
            <res-type>javax.jms.Destination</res-type>
            <res-auth>Container</res-auth>
          </resource-ref>
        </message-driven>
      </enterprise-beans>
      <assembly-descriptor>
        <container-transaction>
          <method>
            <ejb-name>CSS_Response</ejb-name>
            <method-name>onMessage</method-name>
            <method-params>
              <method-param>javax.jms.Message</method-param>
            </method-params>
          </method>
          <trans-attribute>Required</trans-attribute>
        </container-transaction>
      </assembly-descriptor>
    </ejb-jar>Please clear my doubt.
    Edited by: Deepak Dev on 19-Dec-2011 11:01

    General information on message-driven beans can be found here: http://docs.oracle.com/cd/E12840_01/wls/docs103/ejb/message_beans.html
    To transaction configuration is discussed here: http://docs.oracle.com/cd/E12840_01/wls/docs103/ejb/message_beans.html#wp1162058
    Looks like you have to set the transaction-type to Container and the trans-attribute to required. Also see the note:
    - However, if you make this configuration error, the MDB will not run transactionally—if a failure occurs mid-transaction, updates that occurred prior to the failure will not be rolled back.

Maybe you are looking for

  • Table neme

    Hi gurus, I need to develop a report, to control all order book changes in open sales orders and agreements. so in which table can i see the all quantity changes for a document. i.e... history of the documents. Thanks in advance

  • IView Displaying sets of 15 DMS documents at a time.

    I have an iView which is displaying DMS documents. It currently displays 15 at a time with "1-15 16-30 31-45 46-53 > >>  / 53 " displayed at the bottem of the list. How do I get it to display more than 15? Even better if someone could point me to som

  • CS6 polygon hotspot not working

    Hi I have recently upgraded from CS5 to CS6 and have just tried to use CS6 to create a polygon hotspot (which works fine in CS5). Unfortunately when I try to create even a simple (not within a <div>) imagemap this way with CS6 casues a problem yet cr

  • Sap help for CRM

    Hi Can anybody help me in navigating to online CRM  help from help.sap.com site ?? Regards kumr

  • Is it Possible in JSF? Can anyone recommend any java Technology for this?

    I am doing Post Graduate Degree in Computer Science. This is my final semester and doing project work. Any body having idea about my requirment, help and guide to me My description and questions are as follows: Current Approach: PHP has been used to