Transaction support

Hi,
I'm inserting multiple rows into a table from a large XML document posted to a XSQL page. I would like the update to be handled like "all or nothing". Is it possible to handle the inserts as one transaction ?
null

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
The next release of XSQL Pages will support setting the batch size. This 1.0.2 release is due out after Oracle Openworld, in the second half of October.<HR></BLOCKQUOTE>
1.0.2 is here. I cannot see batch size settings anywhere. Not documented or left out, or am I blind?
null

Similar Messages

  • Local transaction support when BPEL invokes JCA adapter

    Hi all,
    I've implemented a BPEL process consisting of multiple invoke activities to my (custom) JCA Resource Adapter which connects to an EIS.
    My concern is to support local transactions. Here are some code snippets describing what I've done so far.
    Declare the transaction support at deployment time (ra.xml)
    <transaction-support>LocalTransaction</transaction-support>Implementer class of ManagedConnection interface
    public class MyManagedConnection implements ManagedConnection {
         public XAResource getXAResource() throws ResourceException {
             throw new NotSupportedException("XA Transactions not supported");
         public LocalTransaction getLocalTransaction() throws ResourceException {
             return new MyLocalTransaction(this);
            public void sendTheEvent(int eventType, Object connectionHandle) {
                 ConnectionEvent event = new ConnectionEvent(this, eventType);
                 if (connectionHandle != null) {
                    event.setConnectionHandle(connectionHandle);
                ConnectionEventListener listener = getEventListener();
             switch (eventType) {
              case ConnectionEvent.CONNECTION_CLOSED:
                   listener.connectionClosed(event); break;
              case ConnectionEvent.LOCAL_TRANSACTION_STARTED:
                   listener.localTransactionStarted(event); break;
              case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED:
                   listener.localTransactionCommitted(event); break;
              case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK:
                   listener.localTransactionRolledback(event); break;
              case ConnectionEvent.CONNECTION_ERROR_OCCURRED:
                   listener.connectionErrorOccurred(event); break;
              default: break;
    }Implementer class of LocalTransaction interface
    public class MyLocalTransaction implements javax.resource.spi.LocalTransaction {
         private MyManagedConnection mc = null;
         public MyLocalTransaction(MyManagedConnection mc) {
             this.mc = mc;
         @Overide
         public void begin() throws ResourceException {
             mc.sendTheEvent(ConnectionEvent.LOCAL_TRANSACTION_STARTED, mc);
         @Override
         public void commit() throws ResourceException {
             eis.commit(); //eis specific method
             mc.sendTheEvent(ConnectionEvent.LOCAL_TRANSACTION_COMMITTED, mc);
         @Override
         public void rollback() throws ResourceException {
             eis.rollback(); //eis specific method
             mc.sendTheEvent(ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK, mc);
    }Uppon BPEL process completion, MyLocalTransaction.commit() is called. However, localTransactionCommitted(event) fails and I get the following error:
    Error committing transaction:; nested exception is: weblogic.transaction.nonxa.NonXAException: java.lang.IllegalStateException:
    [Connector:199175]This ManagedConnection is managed by container for its transactional behavior and has been enlisted to JTA transaction by container;
    application/adapter must not call the local transaction begin/commit/rollback API. Reject event LOCAL_TRANSACTION_COMMITTED from adapter.Could someone give me some directions to proceed ?
    My current installation consists of:
    1. Oracle SOA Suite / JDeveoper 11g (11.1.1.4.0),
    2. WebLogic Server 10.3.4
    Thank you for your time,
    George

    Hi Vlad, thank you again for your immediate response.
    With regards to your first comment. I already have been using logs, so I confirm that neither javax.resource.spi.LocalTransaction#begin() nor javax.resource.spi.LocalTransaction#commit()
    is called in the 2nd run.
    I think it might be helpful for our discussion if I give you the call trace for a successful (the first one) run.
    After I deploy my custom JCA Resource Adapter, I create a javax.resource.cci.ConnectionFactory through Oracle EM web application and the following methods are called:
    -- MyManagedConnectionFactory()
    (Constructor of the implementer class of the javax.resource.spi.ManagedConnectionFactory interface)
    -- javax.resource.spi.ManagedConnectionFactory#createManagedConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)
    -- MyManagedConnection()
    (Constructor of the implementer class of the javax.resource.spi.ManagedConnection interface)
    -- javax.resource.spi.ManagedConnection#addConnectionEventListener(javax.resource.spi.ConnectionEventListener)
    -- javax.resource.spi.ManagedConnection#getLocalTransaction()
    -- MySpiLocalTransaction(MyManagedConnection)
    (Constructor of the implementer class of the javax.resource.spi.LocalTransaction interface)
    -- javax.resource.spi.ManagedConnectionFactory#createConnectionFactory(javax.resource.spi.ConnectionManager)
    -- MyConnectionFactory(javax.resource.spi.ManagedConnectionFactory, javax.resource.spi.ConnectionManager)
    (Constructor of the implementer class of the javax.resource.cci.ConnectionFactory interface)BPEL process consists of multiple invoke activities to my (custom) JCA Resource Adapter which connects to an EIS. Client tester invokes BPEL process, and execution starts.
    Here is the method call trace for the last invoke (after which, commit is executed). The logs for all the rest invocations are identical:
    -- javax.resource.cci.ConnectionFactory#getConnection()
    -- javax.resource.spi.ManagedConnection#getConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)
    -- MyConnection(MyManagedConnection)
    (Constructor of the implementer class of the javax.resource.cci.Connection interface)
    -- javax.resource.cci.Connection#close()
    (I don't understand why close() is called here, any idea ?)
    -- javax.resource.cci.ConnectionFactory#getConnection()
    -- javax.resource.spi.ManagedConnection#getConnection(javax.security.auth.Subject, javax.resource.spi.ConnectionRequestInfo)
    -- MyConnection(MyManagedConnection)
    (Constructor of the implementer class of the javax.resource.cci.Connection interface)
    -- javax.resource.cci.Connection#createInteraction()
    -- MyInteraction(javax.resource.cci.Connection)
    (Constructor of the implementer class of the javax.resource.cci.Interaction interface)
    -- javax.resource.cci.Interaction#execute(javax.resource.cci.InteractionSpec, javax.resource.cci.Record, javax.resource.cci.Record)
    -- javax.resource.spi.LocalTransaction#commit()I would expect that after the last commit() - meaning that BPEL process is done, and its state is "Completed" - Weblogic server would call the following:
    javax.resource.cci.Connection#close()However it doesn't. Do I miss something ?

  • Is XA transactions supported for the SOA Suite 10.1.3.4 on weblogic platfor

    There are 2 weblogic domains 1 & 2. Domain 1 hosts the JMS queue and domain 2 hosts the BPEL process. The BPEL process in domain 2 uses JMS adapter to get messages from domain 1. With queues on Weblogic domain 1, is XA transactions supported for the SOA suite 10.1.3.4 BPEL process JMS Adapter on weblogic domain 2?

    There are 2 weblogic domains 1 & 2. Domain 1 hosts the JMS queue and domain 2 hosts the BPEL process. The BPEL process in domain 2 uses JMS adapter to get messages from domain 1. With queues on Weblogic domain 1, is XA transactions supported for the SOA suite 10.1.3.4 BPEL process JMS Adapter on weblogic domain 2?

  • CAF entity proxies provide Transactional support???

    Hi All,
    We have created entity services, generated proxies so that we can use them in our webdynpro component's. Question here is, does the Generated Proxies of entity services provide Transaction support? or do we need to move all the business logic from webdynpro to CAF Application service?
    Appreciate your time
    Som

    Hi Aliksei,
    Thank you for the reply back.
    Here is the situation:
    We are generating proxy classes for CAF entity objects and using them in WebDynpro for all our custom CRUD operations.
    Is this a good design or move all the CRUD operations to App Service and call it in the webdynpro. What is the exact difference in Updating the CAF Database from WebDynpro (Component controller) and from App Service.
    In what scenario's you use App Service and WebDynpro Component controller with respect to Updating CAF Database.
    Thank you for your time.
    Thanks
    Som

  • Enable Oracle XA Transaction Support

    Hi everybody. First of all, sorry for my terrible English.
    I've been some problems using COM+ with Personal Oracle 8i (8.1.7.0.0) and SQL Server 2000 and Windows 2000 for development only.
    I have one method that inserts the same data both SQL Server and Oracle (the tables and procedures definitions are identical) and I'm utilizing GetObjectContext method to commit or abort the transactions (the COM component were made in VB). Out of COM+ environment the method works 5x5. The error message is: "-2147168229 - Cannot connect to the transaction manager or the transaction manager is unavailable."
    Checking Microsoft documentation I found an article (http://support.microsoft.com/support/complus/mtsandoracle.asp) telling me to "Enable Oracle XA Transaction Support" so I could have transactional work with Oracle and COM+. OK, just fine.
    Does anyone knows how could I manage it? I am not a DBA nor I know one (an Oracle DBA), but I shall explain to my team how program 2 phase commit between Oracle and SQL Server.
    Thanks in advance, and forgive me the size of this "book". I should be shorter next time...
    null

    Vivek, thanks for the help.
    I am utilizing these versions of Oracle Products:
    Personal Oracle8i Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production
    Net8 Client 8.1.7.0.0
    Oracle Services for MTS 8.1.7.0.0
    Oracle Provider for OLE DB 8.1.7.2.0
    The provider I first tried was MSDAORA with no success and then ORAOLEDB with no success too.
    But those entries in registry that you sent me were all with Microsoft dll`s. I will try again tomorrow and send you the results
    Thank you again
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Vivek Raja:
    Renato, firstly what is the interface you use to access Oracle from your COM+ components? If it is OLEDB which provider is in use - MSDAORA or ORAOLEDB? What are the versions in use 8.1.6 or 8.1.7? If you are using MSDAORA as the provider then you will need to add the following key to your registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI.
    Under this key add the following registry string values:
    OracleOCILib - oraclient8.dll
    OracleXALib - oraclient8.dll
    OracleSQLLib - orasql8.dll
    If you are using ORAOLEDB as the provider install Oracle Services For MTS 8.1.7. The error you receive seems to point to the fact that the "Distributed Transaction Coordinator" Windows2000 Service is not running.<HR></BLOCKQUOTE>
    null

  • GlassFish2 JMS (OpenMQ) Transaction Support options in Admin Console

    Anyone knows where can I find a more detailed explanation regarding the various JMS Connection Factory Transaction Support configuration options that can be seen in the GlassFish2 Admin Console? Thanks in advance.

    Please see GlassFish documentation on connector connection pool
    http://docs.sun.com/app/docs/doc/820-7701/create-connector-connection-pool-1?l=en&n=1&a=view
    and GlassFish Administration Guide on relationship between JMS connection factory and connector connection pool
    http://docs.sun.com/app/docs/doc/821-1751/giotd?l=en&a=view
    and JEE Connector specification on Transaction Management Contract. For GlassFish connector question, please post to [email protected]

  • Transaction support for OracleAQQueue

    How is it possible to provide transaction support on OracleAQQueue enqueue and dequeue?
    As far as i can tell, the queue operations are implicitly committed - or maybe im overlooking something fundamental?!

    You may set OracleAQEnqueueOptions.VisibilityMode and/or OracleAQDequeueOptions.VisibilityMode to "OracleAQVisibilityMode.OnCommit" and wrap Enqueue and/or Dequeue operation in a local transaction to get the desired behavior.

  • JCA: Sample Adapter Transaction Support

    Hi guys,
      Could anyone tell me the transaction level supported by Sample Adapter.In the code they are using SAPResourceAdapter to access the J2EE Thread Manager.But in the code it has given that it won't support Local Transaction or XA Resource.
      So what is the Transaction level supported by Sample Adapter.
    regards,
    siva.

    You have to distinguish between 1) the Transaction level support of the J2EE Connector Architecture (JCA) and 2) the internal usage of the J2EE transaction manager.
    Ad 1) the XI docu says <i>JCA resource adapters can provide all kinds of JCA transactions. The Adapter Framework does not use them</i>. That's why the sample adapter uses NoTransaction.
    Ad 2): The transaction manager has to be used for asynchronous processing (QoS Exactly Once). This is used for transaction management inside the adapter. For details see the sample adapter code or the Adapter Development docu http://help.sap.com/saphelp_nw04/helpdata/en/59/59d6409ff68631e10000000a1550b0/content.htm

  • XA Transaction Support In OC4J 10.1.2

    Does OC4J support XA transactions using non emulated data sources? Or does 10.1.2 support XA transactions at all (across datasources-db or jms)?

    The reason is that the commit coordinator lives in Oracle database for 10.1.2.x case. (you have to confiture the db link to do so)
    In OC4J 10.1.3, the transaction manager has been re-implemented and the transaction coordination functionality is now located in OC4J, replacing in-database coordination, which is now deprecated. Also, the middle-tier coordinator is now "heterogeneous", meaning that it supports all XA-compatible resources, not just those from Oracle.
    The middle tier coordinator provides the following features:
    - Supports any XA compliant resource
    - Supports interpositioning and transaction inflow
    - Last Resource Commit Optimization
    - Recovery Logging
    -Frances

  • Client side transaction support?

    Hi,
    I am curious if anyone knows of any client side AS3/flex
    transaction library out there. Specifically client side, not
    anything server side.
    For example I have one operation that does 2 distinct
    operations, if any one of them fails I need to rollback both of
    them. An example would be a class that is responsible for modifying
    a file on disk and then updating a local database on the client
    (regardless of implementation sqllite, xml, textfile etc). Should
    either of these operations fail I would like to rollback the
    file/db to it's original state.
    Does anyone know of any client side AS3 transaction library
    that defines interfaces for such a framework? Thanks!

    The problem is that NTLM is a Microsoft proprietary authentication mechanism.
    I believe there are some products in the JavaMail Third Party Products page
    that support NTLM.
    http://java.sun.com/products/javamail/Third_Party.html

  • XA transaction support in Times Ten JDBC Driver

    Hi Chris,
    Could you confirm if the JDBC driver that comes with TimesTen 7.0, supports XA transactions. XA capability is required by the JTA inorder to coordinate the transaction context between JMS and DB transactions in our J2EE application server.
    The TimesTen is accessed over client-server mode (not embedded/collocated)
    If the answer is yes, could you confirm the respective jar file of the jdbc driver, to make sure we have the right one.
    Regards
    VInod

    Chris,
    It seems, the TimesTen jdbc driver may not be fully XA compliant.
    I used following class from "ttjdbc5.jar":
    "com.timesten.jdbc.xa.TimesTenXADataSource" as javax.sql.XADataSource but it resulted in BEA WebLogic complaining about non transaction datasource while setting up datasource in weblogic:
    BEA LOGs
    <<<<<<
    weblogic.common.ResourceException: DataSource 'vkd.test.xaDS' can not be created. It is non-transactional and so can not use XA-aware pool 'vkd.test.xaDS' at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:239) at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:258) at
    >>>>>>>>
    ANy comments?
    In case of other drivers (pointbase etc) BEA automatically detects that the driver is XA and does not show following screen/option to use GlobalDatasource for non-XA drivers etc. But in case on TimesTen driver, it does not consider it to be a XA driver and prompts for GlocalDatasource for non-XA driver etc...
    I suspect, sumething is not right either in the way we are setting up TimesTen datasource in BEA WLS or TimesTen's support XA
    Is there any writeup stating how to use TimesTen with BEA/WLS?
    Please provide your expert opinion.
    Regards
    VInod

  • Ejbload() on CMP with transaction = supports - why called before every method?

    If an entity bean (CMP v2) has its transaction attrib "supports", why
    when a client (ejb/servlet/jsp) calls its business methods does WLS
    call ejbLoad() before every method call? Note that the calls do not
    occur inside a transaction!
    This is not intuitive to me. I would think that ejbLoad() would be
    called once when the bean is activated and then all business methods would
    access that data.
    Note that if you put the entity bean behind a session bean with a
    transaction attrib "Required", then the ejbLoad() gets called once no
    matter how many business methods are called from the session bean.
    This is (obivously) correct.
    Why is this relevant? The latest java petstore demo essentially calls
    EJBLocal's from jsp (via taglib's) - I guess no different from WLS
    EJB to taglib product - where the fine grained getter methods are
    called. From what I gather, this means that every one of the jsp
    get methods results in a database read! This can't be right!
    What am I missing? As above, if the entity bean has "supports"
    and is called from a jsp, it appears that ejbLoad()/ejbStore()
    would be called for every jsp taglib invocation.
    Glenn

    "Glenn R. Kronschnabl" wrote:
    Rob,
    Thanks for your reply. This implies that even EJBLocals with fine
    grained getter methods should never be used outside a tx scope.Yes, unless you are using Read-Only entity beans which cache data for longer
    periods of time.
    Even
    though you bypass the RMI semantics, you'll be killed by the local tx.
    Which to me says that using EJB's from JSP (even via tags) is a bad
    idea because each getter method will result in a database read/write,
    (unless you go with a readonly EJB as you stated).
    Accessing transactional entity beans via tags is probably a bit off. You
    could start the tx in the JSP or the tag library, but I don't really like
    that pattern much. I prefer making the tags more coarse-grained and having
    the tags talk to a stateless session bean which in turn talks to the entity
    beans.
    >
    Unfortunately, I've been seeing some threads on the net advocating
    using EJBLocals with tx=supports because one of the most common
    patterns has session beans (where you can specify your desired tx)
    in front of entity beans (so you're set methods are protected via
    the session bean tx),RIght, I think Required or Mandatory is a better choice for the entity beans
    here.
    but then you can use the EJBLocal (via tags)
    on a JSP page (no tx) to view the data via fine grained getter
    methods.Other than the performance issues, I dislike this because it exposes the
    entity bean directly to the JSP. If I have to go through an interface (the
    session bean) to access the entity bean, then I shouldn't have another route
    to access the entity bean directly.
    -- Rob
    >
    As you state, this is a disaster because each getter method
    will run in a local tx, requiring a database read/write. Oouch!
    Glenn
    On Thu, 06 Dec 2001 17:08:07 -0600, Rob Woollen wrote:
    First off, I wouldn't recommend that you ever run any EJB with the
    'supports' transaction attribute. If you want transactional behavior
    use Required, RequiresNew, or Mandatory. If you want to run in an
    unspecified tx, use NotSupported or Never.
    WLS runs entity beans with an unspecified tx in their own local tx.
    That's why you see the reads and writes on the method call boundary.
    Your scheme of only reading when the bean is activated could make the
    bean's data out of sync with the underlying database. That's acceptable
    in many cases, and that's why we have the Read-Only entity bean option.
    It gives you exactly what you'd like.
    -- Rob
    "Glenn R. Kronschnabl" wrote:
    If an entity bean (CMP v2) has its transaction attrib "supports", why
    when a client (ejb/servlet/jsp) calls its business methods does WLS
    call ejbLoad() before every method call? Note that the calls do
    not occur inside a transaction!
    This is not intuitive to me. I would think that ejbLoad() would be
    called once when the bean is activated and then all business methods
    would access that data.
    Note that if you put the entity bean behind a session bean with a
    transaction attrib "Required", then the ejbLoad() gets called once no
    matter how many business methods are called from the session bean. This
    is (obivously) correct.
    Why is this relevant? The latest java petstore demo essentially calls
    EJBLocal's from jsp (via taglib's) - I guess no different from WLS EJB
    to taglib product - where the fine grained getter methods are called.
    From what I gather, this means that every one of the jsp get methods
    results in a database read! This can't be right! What am I missing? As
    above, if the entity bean has "supports" and is called from a jsp, it
    appears that ejbLoad()/ejbStore() would be called for every jsp taglib
    invocation.
    Glenn
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • Toplink distributed transaction support?

    I have a database in SQL Server and one in DB2 on the AS/400 and need to update tables in both places and commit the entire transaction.
    Can Toplink handle a distributed transaction?

    Yes, provided your J2EE container provides the necessary JTA/JTS support. TopLink can be registered with the transaction controller and thus issue and commit its SQL as part of the JTA callbacks.
    http://download-east.oracle.com/docs/cd/A97688_12/toplink.903/b10064/enterpri.htm#1020862
    If you are mapping both schemas to an object model using TopLink you may also want to look at TopLink's session broker functionality.
    http://download-east.oracle.com/docs/cd/A97688_12/toplink.903/b10064/enterpri.htm#1020687
    Doug

  • Lightweight transaction support?

    Hi all,
    We have a large scale application using SQL Server 2005 that requires distributed transactions when scaled out to multiple servers. For the next release, we intend to support Oracle so I'm getting up to speed on Oracle features and such, so forgive me if the question is naive.
    We're using .Net 2.0 (soon to move to 3.0) and the System.Transactions.TransactionScope to wrap certain calls in a transaction. SQL Server 2005 supports lightweight transactions that are (initially) not managed via MS DTC but are then automatically promoted to a fully distributed transaction when a second connection is used with the transaction.
    Does Oracle 10g and/or ODP.NET support a similar feature? And, is this specific to running Oracle on a Windows OS? I'm told that eventually our app will need to support Linux & AIX for the backend so if this is a Windows-specific issue, it will be good to know that up front.
    Thanks in advance for any input.
    Tom

    Hi Tom,
    The underlying Oracle client/database doenst support promoting local transactions to distributed ones, so ODP cant either.
    However, as of 10.2.0.3 you can specify whether to have System.Transactions be local or distributed.
    Here's the appropriate excerpt from the readme.txt that comes with 10.2.0.3.3 readme
    <EXCERPT>
    1) This version of ODP.NET contains the following two new features:
    a) FetchSize registry support
    b) PromotableTransaction registry and "Promotable Transaction" connection
    string attribute support
    This feature enables applications to use local transactions with
    System.Transactions where previous versions of ODP.NET supported only
    distributed transactions with System.Transactions. If the
    PromotableTransaction registry does not exist, the default value of
    "promotable" is used. If "promotable" is specified, first and subsequent
    connections opened in the same TransactionScope will enlist in the same
    distributed transaction. If "local" is specified, the first connection
    opened in the TransactionScope will use a local transaction. If any
    subsequent connections are opened within the same TransactionScope,
    an exception will be thrown. If there are connections opened already
    in the TransactionScope and an OracleConnection with
    "Promotable Transaction=local" is attempted to be opened within the same
    TransactionScope, an exception will also be thrown.
    The registry entry for a particular version of ODP.NET will apply for
    all applications using that version of ODP.NET. To override the
    value specified in the registry, the "Promotable Transaction" connection
    string attribute should be set to either "promotable" or "local".
    This feature requires .NET Framework 2.0 or higher.
    </EXCERPT>
    You can get 10.2.0.3.3 on Metalink as patch number 5916667 if you have Oracle support.
    Hope it helps,
    Greg

  • HT1491 Complete transaction support, please help!

    I've looked on support and can't find where it helps you with trying to purchase items in apps, I have been able to do this a couple of times but now it's telling me to contact support to complete transaction, please help.

    You have to contact iTune Support
    http://www.apple.com/support/itunes/contact/

Maybe you are looking for