Transaction attributes

why transaction attributes are not present in JDBC ?
EJB 2.0 Specification includes six defined transaction attributes but JDBC does not carry these . Even the latest JDBC spec does not carry these attributes . Why ?

gimbal2 wrote:
YoungWinston wrote:
user575089 wrote:
EJB 2.0 Specification includes six defined transaction attributes but JDBC does not carry these . Even the latest JDBC spec does not carry these attributes . Why ?I don't know, but I suspect that the transaction attributes are only relevant to EJB. JDBC can be used to execute any piece of SQL on a database, and therefore doesn't have any "model" associated with it (although it does allow you to disable auto-commit). I'm no EJB expert, but I''d suspect that it probably does have a transaction model.
WinstonYes, with exactly six transaction attributes. That is because those attributes are not related to JDBC but to container managed transactions; in other words EJB tech.correct. These are available in EJB tech. However,my point was these are evolved because of necessity ... is not it ?

Similar Messages

  • CMP and Transaction Attribute

    Hi All!
    I try to play with cmp entity beans. All I try to do is find instance and call one from the methods.
    When I use transaction attribute another than "Required", I get exception 25222. Application module creation exception.
    If I change attribute to "Required New" then I get error while bean try to UPDATE record.
    I can't understand why this update appear on findByPrimaryKey!
    Can any body give some information on JBO behavior?
    Mike
    null

    I do one more test and found
    UPDATE exception raised when I have foreign key in table. If I use only plain fild evething is ok. If add to entity foreign key field container raise exception when it try to update record.

  • MDB transaction attributes

    Is there a special reason why NotSupported and Required are the only two supported transaction attributes? I understand that MDBs cannot have a client-initiated transaction, but there are other transaction attributes that indicate the same thing.
    If an MDB wants to indicate that it should not execute in a transaction, why can't it indicate Never or Supports in addition to NotSupported? In the case of no client-initiated transaction, all three result in the annotated method occuring under no transaction.
    If an MDB wants to indicate that it should execute in a transaction, why can't it indicate RequiresNew in addition to Required? Again, in the case of no client-initiated transaction, both result in the annotated method occuring under a transaction.
    The Mandatory attribute throws an exception if there is no client-initiated transaction, so clearly that is never appropriate for MDBs. But I am confused as to why the other transaction attributes cannot be used as indicated above.
    Please clarify why the specification indicates this about MDB transaction attributes...
    Thanks.

    When ejb webservice endpoints were introduced in J2EE 1.4 there was no support for
    propagation of transaction context over a webservice invocation. Both the JSR 109
    spec and the EJB 2.1 spec prohibited the use of MANDATORY on an ejb web
    service endpoint since using it was likely a developer error.
    In Java EE 5 the restriction against MANDATORY for ejb web service endpoints was removed in the
    EJB 3.0 spec. There's still no requirement that transactions be able to flow with web service
    invocations but there are some products that support it so the ejb container is no longer
    required to throw an exception in that case.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Transaction attribute

    The transaction attribute is set as TX_NOT_SUPPORTED.What happens if the client calls the bean without a transaction in effect?

    Nothing.

  • Transaction Attribute issue in weblogic 8.1

    Hi,
    I have problem with the transaction attribute of my session bean in Weblogic8.1 and SQLServer. Following is the description.
    I have two beans, say SampleBeanOne and SampleBeanTwo. The transaction attribute of SampleBeanOne is "Required" and that of the SampleBeanTwo is "RequiresNew".
    In SampleBeanOne i am trying the execute the a batch of insert quires using PreparedStatement.addBach() and PreparedStatement.executBatch() in a loop that runs of 5 times.
    Inside the loop i am calling a method in SampleBeanTwo to get the next sequence. In that method i am updating the squence and selecting the new value.
    Now the problem i am facing is that when i call the executeBatch() in the PreparedStatement only the final insert statement added to the batch is called and the insert statement added gets vanished.
    If i change the transaction attribute of the SampleBeanTwo to "Required" the code is working fine. But i can't do that since the SampleBeanTwo is accessed throught out my application.
    The same peace of code is working properly with Websphere5 and SQL server combination.
    Kindly help me out in this issue.
    Regards

    Hi
    ThanX for your reply. I raised the issue to the BEA support, they said that the issue is the driver that i am using. It got resolved when i tried with the BEA provided driver. They call it the BEA branded driver for SQL Server.
    Regards
    Muthu

  • Can I modify WLI system Bean's transaction attribute --turn on archiver resulting endless exception in log file

    hi,erveryone,
    one difficult question need help.
    Environment: WLS8.1sp2 + WLI8.1sp2 + ORACLE9i + solaris9
    when I started archiver manually,just for a while, wli system generated about 40,000 JMS messages in
    wli.internal.worklist.timer.queue,and consume the great mass of system resource of Database server,I had to stop these
    archive processes immediately to keep other applicaitons which using the same database running normal. I did so by
    following steps:
    (1) in WLI console, delete wli.internal.worklist.timer.queue;
    (2) in WLI console, reconstruct wli.internal.worklist.timer.queue;
    (3) restart wli server.
    after server was restarted, wli server output endless and repeatly exception to log file ,the typical exception was:
    ####<May 8, 2005 3:08:26 PM CST> <Info> <EJB> <app01> <jcwliserver> <ExecuteThread: '54' for queue:
    'weblogic.kernel.Default'> <<anonymous>> <BEA1-54B26B551CC1A8856F80> <BEA-010049> <EJB Exception in method: remove:
    java.sql.SQLException: Transaction rolled back: Unknown reason.
    java.sql.SQLException: Transaction rolled back: Unknown reason
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1299)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_loadGroup0(ListenerBean_1nsp14__WebLogic_CMP_R
    DBMS.java:1055)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_setTaskBean_listeners(ListenerBean_1nsp14__Web
    Logic_CMP_RDBMS.java:596)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_setTaskBean_listeners(ListenerBean_1nsp14__Web
    Logic_CMP_RDBMS.java:584)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.ejbRemove(ListenerBean_1nsp14__WebLogic_CMP_RDBMS.j
    ava:2423)
         at weblogic.ejb20.manager.DBManager.remove(DBManager.java:1318)
         at weblogic.ejb20.internal.EntityEJBLocalHome.remove(EntityEJBLocalHome.java:214)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14_LocalHomeImpl.remove(ListenerBean_1nsp14_LocalHomeImpl.java:131)
         at
    com.bea.wli.worklist.beans.session.RemoteWorklistManagerBean.removeTaskListeners(RemoteWorklistManagerBean.java:3001)
         at
    com.bea.wli.worklist.beans.session.RemoteWorklistManagerBean_us8t1c_EOImpl.removeTaskListeners(RemoteWorklistManagerBean_us8t
    1c_EOImpl.java:698)
         at com.bea.wli.worklist.timer.WorklistTimerMDB.processListenerToRemove(WorklistTimerMDB.java:102)
         at com.bea.wli.worklist.timer.WorklistTimerMDB.onMessage(WorklistTimerMDB.java:61)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    ####<May 8, 2005 3:08:26 PM CST> <Info> <EJB> <app01> <jcwliserver> <ExecuteThread: '96' for queue:
    'weblogic.kernel.Default'> <<anonymous>> <BEA1-54B96B551CC1A8856F80> <BEA-010049> <EJB Exception in method: remove:
    javax.ejb.NoSuchEntityException: [EJB:010140]Bean with primary key: '153.22.52.28-17343c7.10243c3c6ec.a51' not found..
    javax.ejb.NoSuchEntityException: [EJB:010140]Bean with primary key: '153.22.52.28-17343c7.10243c3c6ec.a51' not found.
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_loadGroup0(ListenerBean_1nsp14__WebLogic_CMP_R
    DBMS.java:1165)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_setTaskBean_listeners(ListenerBean_1nsp14__Web
    Logic_CMP_RDBMS.java:596)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.__WL_setTaskBean_listeners(ListenerBean_1nsp14__Web
    Logic_CMP_RDBMS.java:584)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14__WebLogic_CMP_RDBMS.ejbRemove(ListenerBean_1nsp14__WebLogic_CMP_RDBMS.j
    ava:2423)
         at weblogic.ejb20.manager.DBManager.remove(DBManager.java:1318)
         at weblogic.ejb20.internal.EntityEJBLocalHome.remove(EntityEJBLocalHome.java:214)
         at
    com.bea.wli.worklist.beans.entity.ListenerBean_1nsp14_LocalHomeImpl.remove(ListenerBean_1nsp14_LocalHomeImpl.java:131)
         at
    com.bea.wli.worklist.beans.session.RemoteWorklistManagerBean.removeTaskListeners(RemoteWorklistManagerBean.java:3001)
         at
    com.bea.wli.worklist.beans.session.RemoteWorklistManagerBean_us8t1c_EOImpl.removeTaskListeners(RemoteWorklistManagerBean_us8t
    1c_EOImpl.java:698)
         at com.bea.wli.worklist.timer.WorklistTimerMDB.processListenerToRemove(WorklistTimerMDB.java:102)
         at com.bea.wli.worklist.timer.WorklistTimerMDB.onMessage(WorklistTimerMDB.java:61)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    The wli server generated log file very quickly ,:it can output 1M bytes log file per second,all logged information
    is similar to the <BEA-010049> excetpion metioned above. BEA support engineer suggested me to totally stop the
    archive ,I did so,but the server was still ouput the log file like crazy as before and the normal log information are
    completely override by <BEA-010049> excetpion.
    I checked the EntityEJBs in WLI console :Mywlidomain> Applications> WLI System EJBs> WLI Worklist Persistence$)A#,and
    found that in statistics table :
    ListenerBean : Pool miss ratio = 99.67%, transaction rollback ration = 99.90%,Destory Bean Ratio = 99.48%(see
    attachment)
    WorklistTimerMDB: transaction rollback ratio = 99.97%
    It seems ListenerBean worked incorrectly.I searched in support.bea.com and found one example which also about server
    output endless log file,the author solved this problem by changing Bean's transaction-attribute from 'Required'
    to 'RequiresNew' thought he didn't know why it works. I try this method by changing ListenerBean's
    transaction-attribute from 'Required' to 'RequiresNew'.
    $weblogic_home/integration/lib/wli-ejbs.ear/ejb-jar-generic.xml:
    <ejb-name>CommentBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ListenerBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>RequiresNew</trans-attribute> -----------the default value is Required,I modified it to
    RequiresNew.
    </container-transaction>
    <container-transaction>
    really it works, the log file output resume normal. But there are still some problems:
    (1) this exception is still exist:
    javax.ejb.NoSuchEntityException: [EJB:010140]Bean with primary key: '153.22.52.28-17343c7.10243c3c6ec.a51' not found.
    (2) is this method safe ?(Does "Modify ListenBean's transaction-attribute" impat other parts of wli system?)
    (3) after changed the transaction attribute, if turn on archive again, the server output endless exception:
    ####<Jun 1, 2005 5:14:58 PM CST> <Info> <EJB> <app01> <jcwliserver> <ExecuteThread: '63' for queue:
    'weblogic.kernel.Default'> <<anonymous>> <BEA1-2F43890B86B0A8856F80> <BEA-010036> <Exception from ejbStore:
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'weblogic.jdbc.jta.DataSource': XAER_RMERR : A resource manager error has occured in the transaction
    branch
    oracle.jdbc.xa.OracleXAException
         at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1160)
         at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:311)
         at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1075)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1007)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:218)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.__WL_store(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:363
    6)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.ejbStore(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:3548)
         at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:927)
         at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:745)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1142)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1868)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:250)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured in the transaction branch start()
    failed on resource 'weblogic.jdbc.jta.DataSource': XAER_RMERR : A resource manager error has occured in the transaction
    branch
    oracle.jdbc.xa.OracleXAException
         at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1160)
         at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:311)
         at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50)
         at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
         at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1075)
         at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1007)
         at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:218)
         at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.__WL_store(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:363
    6)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.ejbStore(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:3548)
         at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:927)
         at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:745)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1142)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1868)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:250)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
         at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1292)
         at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
         at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
         at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
         at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getConnection(RDBMSPersistenceManager.java:2247)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.__WL_store(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:363
    6)
         at
    com.bea.wli.worklist.beans.entity.TaskBean_9fxazu__WebLogic_CMP_RDBMS.ejbStore(TaskBean_9fxazu__WebLogic_CMP_RDBMS.java:3548)
         at weblogic.ejb20.manager.DBManager.beforeCompletion(DBManager.java:927)
         at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:745)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1142)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1868)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:250)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
         at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
         at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
         at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    How can I solve these problem ? any suggestion is warm welcome.
    Thanks in advance.
    Great Lou

    Back up all data to at least two different storage devices, if you haven't already done so. The backups can be made with Time Machine or with a mirroring tool such as Carbon Copy Cloner. Preferably both.
    Boot into Recovery (command-R at startup), launch Disk Utility, and erase the startup volume with the default options.This operation will destroy all data on the volume, so you had be better be sure of your backups. Quit Disk Utility and install OS X. When you reboot, you'll be prompted to go through the initial setup process. That’s when you transfer the data from one of your backups. For details of how this works, see here:
    Using Setup Assistant
    Transfer only "Users" and "Settings" – not "Applications" or "Other files." Don't transfer the Guest account, if it was enabled on the old system. Test. If the problem is still there, you have a hardware fault. Take the machine to an Apple Store for diagnosis.
    If the problem is resolved, reinstall your third-party software cautiously. Self-contained applications that install into the Applications folder by drag-and-drop or download from the App Store are safe. Anything that comes packaged as an installer or that prompts for an administrator password is suspect, and you must test thoroughly after reinstalling each such item to make sure you haven't restored the problem.
    Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.

  • Can i call Bean managed EJB with transaction attribute Required New

              I am calling a BeanManaged EJB which has a transaction attribute
              set to Required New from a container managed bean. Does it create a new transaction
              other than the Bean managed transaction. Do i really need a required new field
              transaction attribute.All i need is user controlled transaction.Do i need to set
              the transaction aatibute.
              Thanks
              Krish.
              

    Hi Krish,
              The question does not make much sense.
              I would suggest that you set all your tx settings to "Required" unless you
              have a specific reason to do otherwise, and in those few instances that you
              have a specific reason to do otherwise, then change it in just those places.
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "KRISH" <[email protected]> wrote in message
              news:[email protected]..
              >
              > I am calling a BeanManaged EJB which has a transaction attribute
              > set to Required New from a container managed bean. Does it create a new
              transaction
              > other than the Bean managed transaction. Do i really need a required new
              field
              > transaction attribute.All i need is user controlled transaction.Do i need
              to set
              > the transaction aatibute.
              >
              > Thanks
              >
              > Krish.
              >
              

  • Assignment of transaction attributes in ejb-jar.xml

    Hi all,
    I'm going through the employee example from the book "Java programming in SAP web application server". I have followed the instrucstions to the letter and have triple checked that i did not miss anything.
    During the part "Defining Transaction Control", when i go to the "Assembly" tab, choose "Container-transaction" and click add; i get the following error message.
    You have to create and reference EJBs first. Afterwards you can choose them here.
    Newly created EJBs are referenced automatically in the ejb-jar.xml, in special cases you might have to reference them manually.
    Below is a copy of the ejb-jar. Both beans are referenced in the file so i don't really understand the error message!
    Thanks for your help.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>EmployeeServicesBean</ejb-name>
                   <home>com.sap.demo.EmployeeServicesHome</home>
                   <remote>com.sap.demo.EmployeeServices</remote>
                   <local-home>com.sap.demo.EmployeeServicesLocalHome</local-home>
                   <local>com.sap.demo.EmployeeServicesLocal</local>
                   <ejb-class>com.sap.demo.EmployeeServicesBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/Employee</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                        <local>com.sap.demo.EmployeeLocal</local>
                        <ejb-link>EmployeeEjb.jar#EmployeeBean</ejb-link>
                   </ejb-local-ref>
              </session>
              <entity>
                   <ejb-name>EmployeeBean</ejb-name>
                   <home>com.sap.demo.EmployeeHome</home>
                   <remote>com.sap.demo.Employee</remote>
                   <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                   <local>com.sap.demo.EmployeeLocal</local>
                   <ejb-class>com.sap.demo.EmployeeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Long</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>EmployeeBean</abstract-schema-name>
                   <cmp-field>
                        <field-name>lastname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>firstname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>department</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <description>Query for getting all employee objects.</description>
                        <query-method>
                             <method-name>findAllEmployees</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>Select object (p) from EmployeeBean p</ejb-ql>
                   </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor/>
    </ejb-jar>

    I was able to add the transaction attributes manually to the ejb-jar.xml file. below is what the file looks like now for those interested.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
         <description>EJB JAR description</description>
         <display-name>EJB JAR</display-name>
         <enterprise-beans>
              <session>
                   <ejb-name>EmployeeServicesBean</ejb-name>
                   <home>com.sap.demo.EmployeeServicesHome</home>
                   <remote>com.sap.demo.EmployeeServices</remote>
                   <local-home>com.sap.demo.EmployeeServicesLocalHome</local-home>
                   <local>com.sap.demo.EmployeeServicesLocal</local>
                   <ejb-class>com.sap.demo.EmployeeServicesBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/Employee</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                        <local>com.sap.demo.EmployeeLocal</local>
                        <ejb-link>EmployeeEjb.jar#EmployeeBean</ejb-link>
                   </ejb-local-ref>
              </session>
              <entity>
                   <ejb-name>EmployeeBean</ejb-name>
                   <home>com.sap.demo.EmployeeHome</home>
                   <remote>com.sap.demo.Employee</remote>
                   <local-home>com.sap.demo.EmployeeLocalHome</local-home>
                   <local>com.sap.demo.EmployeeLocal</local>
                   <ejb-class>com.sap.demo.EmployeeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Long</prim-key-class>
                   <reentrant>False</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>EmployeeBean</abstract-schema-name>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>lastname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>firstname</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>id</field-name>
                   </cmp-field>
                   <cmp-field>
                        <description>
                        </description>
                        <field-name>department</field-name>
                   </cmp-field>
                   <primkey-field>id</primkey-field>
                   <query>
                        <description>Query to get all employee objects.</description>
                        <query-method>
                             <method-name>findAllEmployees</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>Select object (p) from EmployeeBean p</ejb-ql>
                   </query>
              </entity>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <description>container-transaction</description>
                   <method>
                        <ejb-name>EmployeeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <method>
                        <ejb-name>EmployeeServicesBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    Thanks

  • Practical use of transaction attribute

    I want to read abt practical use of transaction attribute,any tutorial or any help?

    Well the J2EE tutorial explains them:
    http://docs.sun.com/app/docs/doc/819-3669/6n5sg7cm3?a=view
    What do you mean by practical - a real world example? You can use NotSupported for read operations as no transaction is required, they say it improves performance, but I have never done any investigation into it.
    m

  • JBDC transaction attribute problem.

    Hi All,
    We have some methods which will make a call to database to bring some data
    using SELECT statement. Have set transaction attribute for those methods as NOT SUPPORTED not to open a transaction and lock the table. But, now it is opening a transaction & locking table & rows.
    Any idea why it is doing so ?

    normally a select statement will not lock the table
    unless you are using a PreparedStatement or
    CallableStatement class to perform the query. I don't believe this is correct. I don't think either PreparedStatement or CallableStatement automatically lock tables.
    If you
    are then it should be an expected behavior. if you
    are not using any of this classes make sure to check
    that you have not lock the table with the statement
    connection.setAutoCommit(false);
    this
    statement usually locks the table whether you are
    using a select statement or not. I don't think this is true, either. This tells the Connection where a transaction starts.
    But if these are not
    the cause then make sure that you close all
    connections when the query has finished executing.
    that is connection.close();I think the correct way to tell the database manager to lock data is to use "SELECT FOR UPDATE" notation.
    %

  • Transaction attribute in XML deployment descriptor

    Hi,
    I just want to know the use of transaction attributes like (Required, notSuuport etc..) are in the EJB.
    What is Bean managed and container managed transaction.
    How we use the transaction attributes in BMP and CMP.
    and in similar fashion, the use of the same in Session beans.
    ..Aman

    modification to the above quesion::
    There are 5 different beans named as
    CMP, BMP, Stateless, Stateful and MDB.
    I want to know that which all transactions (CMT or BMT) can be applied for which bean?
    I just got some feedback from some ppl that i cant apply BMT for CMP and BMP. if that is true then why???
    if i can apply CMT for CMP and BMP then how i will modify the EJB-jar for the
    method definitiion for CMP and BMP. I mean to say the method name and parameter definition. as there are only call back methods.
    ..Aman

  • Error deploying EJB on weblogic: Unable to set the transaction attribute

    Hi,
    I'm trying to deploy an application in WL10.3.2 and an error occurred during activation of changes.
    Here is the error message from the log file:
    <Jun 6, 2011 1:28:27 PM MDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'serverEAR-2' due to error weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
    weblogic.application.ModuleException: Exception preparing module: EJBModule(serverEJB-2.8.0.jar)
    Unable to deploy EJB: C:\oracle\Middleware\user_projects\domains\base_domain\servers\Server_3\tmp\_WL_user\serverEAR-2\1zw7ao\serverEJB-2.8.0.jar from serverEJB-2.8.0.jar:
    Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:454)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to set the transaction attribute for method 'saveActionGroup(EditableActionGroup)' on EJB 'ViewBean'. No matching method could be found. Please verify the method signature specified in the ejb-jar.xml file matches that of your Remote interface for this EJB.
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processCTs(MBeanDeploymentInfoImpl.java:1502)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.processSpecificMethodCTs(MBeanDeploymentInfoImpl.java:1472)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:773)
         at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:259)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1190)
         Truncated. see log file for complete stacktrace
    Please help me...Thanks.

    In your ejb-jar.xml you are referring to a method saveActionGroup(EditableActionGroup) which is not defined in your remote interface.
    Maybe you have made some typo in the configuration. Check your transaction section, i.e.,
    <container-transaction>
                <method>
                    <ejb-name>ViewBean</ejb-name>
                    <method-name>saveActionGroup</method-name>
                    <method-params>
                        <method-param>package.EditableActionGroup</method-param>
                    </method-params>
                </method>
                <trans-attribute>Required</trans-attribute>
    </container-transaction>or something similar. See if the defined methods are corresponding to the methods defined in the remote interface.

  • CMT - Transaction Attribute

    Hi,
    I have a stateless session bean with Container Managed Transaction (CMT) performs DB2 database operation using DAO pattern.The DAO calls DB2 stored procedure.
    Commit statements have been used in the stored procedure.No rollback statements have been used in stored procedure.
    My question is what would be the appropriate transaction attribute to set for the bean methods?
    Is it Supports or Required? I read in IBM site that Supports must be used with caution.
    Thanks in advanced.

    Tom, you say that "any particular subscription will support only a single consumer" - I don't quite understand how this fits with the max-beans-in-pool setting for an MDB. Are you saying that for CMT MDBs, there is only ever 1 active bean in the pool regardless of what I set max-beans-in-pool to be?Yes, and only one pool at a time will be able to access the subscription. A durable subscription can only be accessed by a connection with a client-id that matches the subscription's client-id, and a DurableSubscriber consumer created from said sonnection that has the same subscriber name. MDBs use a vanilla javax.jms.TopicSubscriber to consume from topic subscriptions, and are designed to assume that the JMS provider adheres to the JMS specification for this API. The JMS specification states (1) only one connection should be able to use a pariticular connection client-id (optional - depends on vendor), and (2) that a subscription must only support a single javax.jms.Consumer (not optional).
    Also, does this restriction apply to CMT MDBs regardless of their transaction attribute ie. even if I set transaction-attribute NOT_SUPPORTED?The documentation recommends restricting non-TX MDBs that consume from foreign topics so that they are single threaded. In not-supported tx mode, with foreign vendors, a single connection and single subscriber is still created for a particular pool, as per above, but multiple threads are created to process the single subscriber's messages in parallel. This mode is not safe in that it is possible to lose messages in the event of a crash or application-forced redeliveries (the message may not be redelivered). The problem doesn't apply to MDBs that consume from WebLogic Topics.
    Hope this helps,
    Tom

  • Issue with Transaction Attribute

    Hi All
    I am trying to build a program that will interact with two database at the same time.Lets say, I am getting/updating/inserting data from/to Database1.table1 so I am creating transaction attribute for the same to commit and roll back the changes.
    Now, after the above scenario I need to update my audit trail table in database2 but since I have already created transaction for the above database it not allowing me to connect to database2 saying "Connection already exit for database1 cannot create new transaction for Database2".
    Also if I tried to create a new transaction for Database2 its passing me exception saying "A transaction is already running for the thread cannot create new transaction for the same thread".
    I tried calling a new thread also but the exception remains as the new thread is called from the main thread.
    Please help me in same so that i can create two transaction or connection to two database using same transaction.

    user12882304 wrote:
    ... connection to two database using same transaction.Not possible.
    You are attempting something with a JDBC driver that the driver does not support.
    Your first step is to research distributed transactions.
    For this to actually work the database itself must support it. And you must use the correct idiom to invoke it.

  • EJB 2 : Query in understanding Transaction Attribute NotSupported

    NotSupported
    The Container invokes an enterprise Bean method whose transaction attribute is set to NotSupported with an unspecified transaction context.
    I am having a query in understanding the above thing .Please let me know what does above mean and also what transaction context mean in the below :
    If a client calls with a transaction context, the container SUSPENDS the association of the transaction context with the current thread before invoking the enterprise bean's business method.
    Thanks in advance .
    Waiting for your replies .

    it means that the method must operate outside of an active transaction - in other words there will be no active transaction during its runtime. If there is an active transaction when the method is called, that transaction is "put on hold" until the "notsupported" EJB call finishes.

Maybe you are looking for

  • Voice mail not being delivered

    Cisco Unity 4.0(4): Error message stating:Event Type: Error Event Source: CiscoUnity_UMR Event Category: UMR Thread Error Event ID: 137 Date: 10/6/2008 Time: 12:26:46 PM User: N/A Computer: COBUNITY1 Description: Attempts to deliver Unity Message Rep

  • Plays video w/ sound, but cant do picture slideshow

    I have the 5g ipod with the ipod brand AV cable. I'm doing a project in class in which I want to display pictures from my ipod on a TV, Ive done it before, but this time around, I cant get it to work I have the 'TV out' set to 'On', and the 'TV signa

  • Any idea what this characher is?

    DB version:10gR2 Found this character in a table. I don't know how this got inserted. Any idea what this characher is?Even though it appears as a hypen here in OTN, this looks like a miniature square block in sqlplus. SELECT DUMP('–') FROM DUAL; DUMP

  • Using get method on hashtable

    I have built two hashtables and populated them with my data, but now I need to get the key from one table and see if it exists in the other, I've seen the get method in the api but I can't understand how to use it? Could someone show me a simple exam

  • Looking at Softwares, Can someone answer some quesitons about Captivate?

    Hey all, I am looking at training software for a pretty big project and wanded to check with those who actually use it to see if Captivate would fit my needs as wel as what I found using the website: Is the UI Developer friendly? Does it have Multime