Non-JTS datasource

Dumb questions. What is the exact definition of 'non-JTS datasource'? And what are the recommended usages of the datasource? The TopLink's doc has little information on it. It says "Use Non-JTS for Specify if the session requires a non-JTS connection. Note: Normally, use this option for an application server when using cache synchronization".
We use WAS connection pooling with Oracle databases. Some projects use 'XA datasource' while others use 'non-XA datasource'. In the sessions xml files, we all use <datasource> tag.
What are the differences b/w the 'non-JTS datasource' referenced in TopLink and the 'non-XA datasource' concept?
Also, I was told that all datasources in WAS 5.x are JTS datasources. I haven't found any information on it in the WAS documentations. Anyone has any more info on it?
Thanks a lot for your assistance.
Haiwei

Andrei,
I tried what you suggested, with WAS XA and non-XA datasource. Here is the code:             UserTransaction transaction = (UserTransaction) new InitialContext().lookup(USER_TRANSACTION);
            transaction.begin();
            connection = ((DataSource) new InitialContext().lookup(NON_XA_DATASOURCE)).getConnection("user04", "user04");
            statement = connection.createStatement();
            numberOfRows =
                statement.executeUpdate(
                    "UPDATE USER04.PERSON SET VERSION = VERSION +1 WHERE  ID = '9999'");
            connection.commit();
            transaction.rollback();With XA datasource or non-XA datasource, I was both getting exception (see below), hence the version is not updated.
java.sql.SQLException: DSRA9350E: Operation Connection.commit is not allowed during a global transactionThis seems to suggest (or confirm) that the WAS datasources are JTS datasources.
Any comment?
Haiwie

Similar Messages

  • Websphere 5.0 and non-jts-datasource = 2PC exception!

    Hello all
    We're migrating from a working weblogic 8 app to websphere 5.0, and we run into this problem.
    Toplink tries to enlist the NON-JTS datasource in the global transaction. In weblogic we defined our non-jts datasource as a non-transactional datasource, but there is no such option in websphere. What is going on??
    Please help
    TIA
    - Russ -

    Hello Rustam,
    WebSphere 5 throws exceptions when you try to get a non-jta datasource while in a transaction - it seems to try to enlist it in the transaction I think.
    This is more a WebSphere issue, since it means you cannot read outside of the transaction.
    There are 3 options:
    1) Don't define a non-jta datasource at all in TopLink. Draw backs to this are that there may be problems reading when there is no transaction, such as when you are using cache synch.
    2) Create your own datasource (outside of WebSphere) and place it in JNDI. Then have TopLink access it as a non-jta datasource. Your datasource must be completely independent of WebSphere so that it does not attempt to associate with JTA.
    3) Use a TopLink maintained read connetion pool. You can use the non-jts-connection-url sessions.xml tag, which will use the login setting defined in your project.xml. I've not tested it, but can also override the read pool in a preLogin event that should look something like:
    public void preLogin(SessionEvent event) {
    DatabaseLogin dbLogin(new Oracle9iPlatform());
    dbLogin.setUserName("name");
    dbLogin.setPassword("password");
    dbLogin.setConnectionString("jdbc:oracle:thin:@ip:port:sid");
    ConnectionPool readPool = new ReadConnectionPool("read", dbLogin, minCon, maxCon, event.getSession());
    event.getSession().setReadConnectionPool(readPool);
    Best Regards,
    Chris Delahunt

  • How do I create a non-JTS sequence connection pool using JTS

    I'm getting all kinds of errors (DB deadlocks and exceptions) using JTS with sequences. From reading several posts, it is necessary to create a separate non-JTS connection pool.
    I've seen several postings on how to do this in the sessions.xml file, but how do I do this in Java code?
    What I am trying is:
    SequencingControl seqCtrl = ((oracle.toplink.publicinterface.DatabaseSession)serverSession).getSequencingControl();
    seqCtrl.setShouldUseSeparateConnection(true);
    seqCtrl.setLogin(sequenceLogin);
    I've also tried:
    serverSession.addConnectionPool("sequencing", sequenceLogin, 2,5);
    but neither work. The problem with these settings is that the sequence properties on my DatabaseLogin are not honored.
    My table name is T_SEQUENCES and my preAllocation size is 5. However the SQL that is generated by this setup is:
    "UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 50 WHERE SEQ_NAME = 'T_GROUPS_SEQ'"
    I'm guessing these may be default values, but I don't know where else to override these except for on the DatabaseLogin I am passing in.
    I know this setup works, because it is the same DatabaseLogin I use for non-JTS configuration.
    Could someone provide me a code-snippet on how to do this?
    Thanks,
    Nate

    I'm not using XML files, all of my setup is in code. I'm not sure how I would use the setLoginAndApplySequenceProperties(DatabaseLogin) call or if it would address my larger problem.
    The main issue I don't want to lose here is, I've got an application where I'm trying to use JTS with JBoss and SQL Server. It's a SessionBean/POJO architecture. The problem I was having that started this thread is that sequence number allocation causes a database deadlock.
    My thought was if I opened a 2nd connection pool dedicated to sequences, it might resolve the issue. I was able to do this with the workaround I posted, but it didn't fix anything. I now get a different error related to my newly inserted objects.
    From working with this off-and-on over the last several months, I would say that I don't think TopLink/JBoss/SQL Server using JTA can be made to work.
    I know that TopLink has a plug-in architecture and in theory if I implemented ExternalTransactionController and SynchronizationListener for JBoss correctly, it should all work.
    But, I've got the JBoss 4.0.0 source that I can step through, I've got all the recent updates to SQL Server and the JDBC driver, and I'm following everything I've been told so far on how to make this all work.
    It plain doesn't work.
    Furthermore, I haven't found anyone (this group, JBoss group) that has gotten this to work (TopLink/JBoss/JTA). This is an important item to us, we'd like to get this to work, and we would be happy to work with Oracle Consulting on this or whatever it takes (already opened a TAR on this).
    Are there any other support options available to making this work?
    Nate

  • Concept: How can I handle a hole in a non-sap datasource?

    Hello,
    I want to discuss here a problem with non-sap datasource:
    We load data from oracle db with db-connect technique. Each record we load has an idate(record is created) and a udate(record is changed). Based on the udate we create a kind of delta load:
    The udate is selection criteria of the Infopackage(full upload)
    In the start routine of the transferrule we detect the oldest udate and store it to the tvarc table. This UDATE is the low selection criteria for udate of the next load. So we reload only the records, which are change after the last load.
    The data are transferred to ODS (overwrite) and so on..
    That works perfect!
    But now we find out, that in this non-sap datasource it’s possible to delete records directly. In SAP we have usually the procedure that a reversal document is created to delete a record(for example FI documents). In fact this non-sap datasource creates a hole in the database. A record is deleted – > no udate change -> no change in BW. That means the record is still in BW!
    Do you had a similar problem? Or do you have an idea how we could fix this problem.
    I can not load all data every day by full upload – that needs to much time more than 2 million data from five different datasources….
    Thank you for your attention
    Ralf

    Hello,
    To close my post, here is my solution:
    - ODS A is filled by delta using the UDATE field.
    - ODS B is filled by full upload. It contents only the key fields of ODS A (load needs
      only 20 minutes)
    - ODS C is filled by ODS A(only key fields) per full upload. In the startroutine of the
      update rule is a check: Delete all data, which are in ODS B.
      Result is: ODS C contents only the data, which have to be deleted in ODS A.
    - Full upload ODS C to ODS A. Set in the start routine recordmode to 'R'.
      Result is: these records are delete from the ODS A and change log of ODS A is
      updated.
    Before the next load the content of ODS B and C is deleted.
    (cool picture:)
    ..........CUBE X
    ..............|
    .(delta)....|
    ..............|........ODS C(diff. A - B)
    ..............|........|....|
    ..............|..(R).|....|.\  (check)
    ..............|........|....|..\
    ............ODS A....ODS B(keys)
    .(delta)...|................| (full)
    ..........non sap systems
    It's followed the principle of Sudhi's idea. But I did it not with PSA, because I have five different DataSources, so I need five calls to identify the records, which have to be deleted and five calls to edit the PSA ....
    In this way I load everything in ODS and do the procedure only once time.
    All the best Ralf

  • Creating a non transaction datasource

    All,
    I am using Quartz to fire Hibernate Jobs. Quartz Scheduler runs as a servlet in tomcat, the Hibernate job is a standalone app.
    The Scheduler calls the app like so:
    Quartz>Shell>Hibernate.
    When I start the Hibernate jobs, they instantly go into a blocked state, basically db dealocks. When view the connections with
    mysql admin, I can see the connections are sleep!
    I heard thru the grapevine that a non-transactional datasource would solve this problem.
    How do I do this? Is it done in tomcat, or do I need to change my hibernate db connection?
    Any ideas?

    You're deadlocking with another process - quite possibly with one of your earlier tasks that stalled for some reason.
    Turning off transactions is a dumb way to fix this - it avoids you finding out what the real problem is, thus curing the symptom but probably not the disease. Find out what's deadlocking and why, then fix that problem properly.

  • Can SOA consume business events using non-apps datasource ?

    Hi Gurus & Experts,
    We have a scenario where EBS raises custom business event to be consumed by SOA.
    Everything works fine using APPS login, however we need to non-apps datasource in some environements (custom schema user)
    Can SOA consume business events using non-apps datasource ?
    Please let me know.
    Thanks,
    Rev

    Hi Srini,
    Even i have a similar requirement . Could you please send me the link for OracleEBSAdapterUserGuide(b_28351). ?
    Did you come to know how to check whether WF_Listener is running ?
    Thanks in advance
    Nutan

  • Updaing 2 schema's in 1 db = non-emulated datasource

    When updating two databases from within a single tx, you must use a non-emulated datasource (i.e. JTA support is required).
    Is this true of updating two database schema's (same database) in the same tx as well ? The Oracle documentation seems not to discuss this.
    Regards,
    Manoj.

    Manoj -- My apologies. I misread the question. If you reference another schema but only use a single data source definition then it is a 1 PC. You only need to configure 2 PC if you will be creating transactions across two different data sources and you want true 2 PC semantics. In fact, I'm not sure if in the pure Oracle database view of the world you wouldn't have to do the same thing but it has just been a while since I looked at that. Don't forget that you can also use basic database mechanisms like synonyms and views to reference the other schema.
    Thanks -- Jeff

  • BC4J with non-SQL datasource

    Hi
    Is it possible to use BC4J with non-SQL, non-relational datasources? For example, we are exploring the possibility of using a file-based XML datastore (NOT the XDB) as the back-end for some ADF screens.
    Thanks,
    Sean

    BC4J is designed for SQL databases.
    http://www.oracle.com/technology/products/jdev/collateral/tutorials/903/j2ee_bc4j/prnt/j2ee_bc4j.html#bc4j-faq

  • Non-jdbc datasource for MapViewer

    Is it possible to specify a non-jdbc datasource for Oracle MapViewer?
    That is, if I want Mapviewer to access the database through my own data layer, or with an ORM, is it possible?
    Thanks,
    Rupesh

    I copied jdbcdrv.zip intp C:\Program Files\Sybase\SQL
    Anywhere 9\java
    and using Java page in CF admin, added C:\Program
    Files\Sybase\SQL Anywhere 9\java to classpath, restarted CF
    Application server.
    I then defined new datasources using existing ODBC dsns as
    described in
    http://www.ianywhere.com/developer/product_manuals/sqlanywhere/0902/en/html/dbpgen9/000001 52.htm
    (doesn't seem kosher but that's what my model showed).
    It's not exactly speedy but I've not gotten any errors yet
    (maybe because it isn't speedy)
    Anybody have any idea if there is another way that doesn't
    use anODBC dsn ?

  • Error in using XA and Non-XA datasource at same time

    I think this case may be a little complicated:
    there are two actual databases, for example, A is for service/biz, and B is for data archiving. system run the archiving service once a day, we decided to use JTA to ensure that no records would be lost while any exceptions encountered on each side. we create two XADatasouces for A and B. And there is an existed Non-XADatasource in weblogic that be used by general business. it's Database A actually. make a summary:
    Two actually databases :
    A , B
    Three DataSources in Weblogic :
    Non-XA-DS , XA-DS1 - > refer to Database A, the business DB
    XA-DS2 - > refer to Database B, the archiving DB
    And the archiving code like this:
    try{
    UserTransaction.begin;
    fetch Data from XA-DS1;
    record logs to Non-XA-DS;
    save Data to XA-DS2;
    UserTransaction.end;
    }catch(){
    UserTransaction.rollback;
    }finally{
    release resources;
    look at the bold lines. it work well if remove the "*record logs to Non-XA-DS*". but if enable the logs features it will throw out an exception with message " cannot call commit of connection in a distributed transaction". It's weird, that Non-XA-DS is not a XADatasource and I also disabled the Global Transaction Support of the datasource. As i think . that UserTransaction would not manage a DS indicated not support JTA. is that correct? And how can I resolve this problems
    Edited by: 985707 on Feb 2, 2013 6:31 AM

    Actually it may work with pdnsd if you run it on 127.0.0.3:
    /etc/resolv.conf
    nameserver 127.0.0.3
    nameserver 127.0.0.1
    nameserver 127.0.0.2
    /etc/pdnsd.conf
    global {
    server_ip = 127.0.0.3;
    /etc/conf.d/dnscrypt-proxy
    DNSCRYPT_LOCALIP=127.0.0.1
    /usr/lib/systemd/system/dnscrypt-proxy.service
    [Unit]
    Before=pdnsd.service

  • Non Cumulative Datasource -  Initialization Indicator/flag

    Hi all,
      I've read in one of the documentation for Non cumulative keyigures (eg, stock handling) that the flag which indicates the datasource as Initialization datasource comes from OLTP.
      Which is that field?
    In a flat file datasource, this option is available  but
    how to do the same with OLTP datasource.
    I want to create a generic datasource for the purpose.
    How will I indicate that this datasource is to be used for initialization so that the infopackage will have
    "Create Opening Balance" option.
    regards
    Anoop

    Hi Klaus,
      Thanks for the reply. Infact, I've found out this myself after some research and I saw your reply when I was posting this question.
      Will there be any other settings required other than this field. What are the consequences of changing this value in the table directly?
    regs
    Anoop

  • JDev 9.0.3.3 Data not saved to DB when using Non-Transaction DataSource

    Hi,
    Env: JDev 9.0.3.3/WL 6.0 sp1/Oracle 8i
    We have successfully deployed our application in 3-tier(remote mode) in JDev 9.0.3.2. using JClient, EO/VO, EJB Session Facade (BMT).
    Now we are planning to use JDev 9.0.3.3 (build 1205)
    We are using ejb.txn.type=local and Weblogic DataSource(non-txn).
    In JDev 9033, after commit the data is not getting saved to DB. No errors in the log below.
    This works fine in JDev 9032.
    This does not work with simple Master Detail and also with single row simple form.
    ==========================================
    [281] BaseSQLBuilder Executing DML ... (Update)
    [282] Executing DML...
    [283] UPDATE CISDBA.DCX_BASE_COST_V BaseCost SET ITEM_STAT=?,TID=? WHERE PART_NUM=? AND MY=?
    [284] cStmt = conn.prepareCall(" UPDATE CISDBA.DCX_BASE_COST_V BaseCost SET ITEM_STAT=?,TID=? WHERE PART_NUM=? AND MY=?"); // JBO-JDBC-INTERACT
    [285] cStmt.setObject(1, new BigDecimal((double) 2.0)); /*ItemStat*/ // JBO-JDBC-INTERACT
    [286] cStmt.setObject(2, "t2733bx"); /*Tid*/ // JBO-JDBC-INTERACT
    [287] cStmt.setObject(3, "04782612AA"); /*PartNum*/ // JBO-JDBC-INTERACT
    [288] cStmt.setObject(4, "2004"); /*My*/ // JBO-JDBC-INTERACT
    [289] cStmt.execute(); // JBO-JDBC-INTERACT
    [290] cStmt.close(); // JBO-JDBC-INTERACT
    BaseCostImpl: after doDML
    BaseCostImpl: End of doDML()...
    BaseCostInvestCost VO before postChanges...
    this.getWhereClause(): null
    isDirty() before executeQuery...
    this.getWhereClause(): null
    isDirty() after executeQuery...
    BaseCostInvestCost VO before postChanges...
    this.getWhereClause(): null
    isDirty() before executeQuery...
    this.getWhereClause(): null
    isDirty() after executeQuery...
    [291] BaseSQLBuilder: releaseSavepoint 'BO_SP' ignored
    [292] BaseSQLBuilder: setSavepoint 'BO_SP' ignored
    BaseCostInvestCost VO before postChanges...
    this.getWhereClause(): null
    isDirty() before executeQuery...
    this.getWhereClause(): null
    isDirty() after executeQuery...
    BaseCostInvestCost VO before postChanges...
    this.getWhereClause(): null
    isDirty() before executeQuery...
    this.getWhereClause(): null
    isDirty() after executeQuery...
    [293] BaseSQLBuilder: releaseSavepoint 'BO_SP' ignored
    [294] EJBTxnHandler: Commited txn
    [BaseCostInvestCostViewImpl.afterCommit] Enter
    [295] BaseCostInvestCostView2 notify COMMIT ...
    [BaseCostInvestCostViewImpl.afterCommit] Exit
    [BaseCostInvestCostViewImpl.afterCommit] Enter
    [296] BaseCostInvestCostView1 notify COMMIT ...
    [BaseCostInvestCostViewImpl.afterCommit] Exit
    [297] SubDept2SubProgView1 notify COMMIT ...
    [298] InvSubDeptLOV1 notify COMMIT ...
    [299] SubProg2SubDeptView1 notify COMMIT ...
    [300] SubProgramLOV1 notify COMMIT ...
    [301] StdCostView1 notify COMMIT ...
    [302] AltCostView1 notify COMMIT ...
    [303] PlantCodeView1 notify COMMIT ...
    [304] PaperCarView1 notify COMMIT ...
    [305] InvestCostItemView1 notify COMMIT ...
    [306] SavedSearchView1 notify COMMIT ...
    [307] AltCostView1_BaseInvestToAltViewLink_AltCostView notify COMMIT ...
    [308] InvestCostItemView1_BaseInvestToInvestItemViewLink_InvestCostItemView notify COMMIT ...
    [309] PaperCarView_BaseCostTrackedVehicleViewLink_PaperCarView notify COMMIT ...
    [310] VehicleProgramLOV1 notify COMMIT ...
    [311] SubDeptLOV1 notify COMMIT ...
    [312] Transaction timeout set to 28800 secs
    [313] [NavigationEvent: BaseCostInvestCostView1 From 0 to 1]
    [314] Column count: 14
    [315] ViewObject : Reusing defined prepared Statement
    [316] Binding param 1: 769661
    [317] Binding param 2: 2004
    [318] [RangeRefreshEvent: AltCostView1 start=-1 count=0]
    [319] Column count: 13
    [320] ViewObject : Reusing defined prepared Statement
    [321] Binding param 1: 769661
    [322] [RangeRefreshEvent: PaperCarView1 start=0 count=6]
    [323] Column count: 4
    [324] ViewObject : Reusing defined prepared Statement
    [325] Binding param 1: INV37
    [326] [RangeRefreshEvent: InvestCostItemView1 start=0 count=1]
    [327] [NavigationEvent: AltCostView1 From -1 to -1]
    [328] [NavigationEvent: PaperCarView1 From -1 to 0]
    [329] [NavigationEvent: InvestCostItemView1 From -1 to 0]
    ========================================================

    Hi Carsten,
    I tried to reproduce your problem, but couldn't. Let me explain what steps I executed and perhaps you can advise where I've not matched your steps.
    --Using build jdeveloper 9.0.3.3.1203, I built a new bc4j project containing a dept-emp default bc4j project (deptEntity, empEntity, deptView, empView, deptempFKAssoc, deptempFKViewLink, ApplicationModule).
    --In dos shell, I went to the directory \jdevdir\jdev\bin and ran setvars -go to set the correct jdk version
    --In the dos shell, in the directory \jdevdir\j2ee\home I executed the following command to install oc4j:
    java -jar oc4j.jar (defaults pswd to welcome for admin)
    --I remoted the appmodule to EJB Session Bean (BMT) and created a new deployment profile using the 9ias configuration for the application module.
    --I deployed the bc4j objects to oc4j
    --I created a new project
    --In this project I created a new jclient master-detail form using the above project's application module for the data model
    --I saved all and compiled the jclient project
    --I ran the jclient form and inserted a master record
    --I committed the transaction successfully
    --I browsed records, then edited a record
    --I committed the transaction successfully, then browsed.
    Is there something I've missed? Did you migrate your project and not start by creating a new project? Is there something special about the database schema you are using?
    Thanks,
    Amy

  • JCA Database adapter - stored procedure xa or non xa datasource

    Hi
    I have a quick question about datasources. Does the database adapter support both xa and non xa? I am currently running in non xa I really do not need any xa functionality, but I am experiencing some calls to the database that takes a very long time. Might be an issue with the database tuning, but trying to cover all the bases.
    Have searched quite a lot on it, but cant find anything, so I hope some of you know.
    Thanks in advance.
    /Øyvind

    Does the database adapter support both xa and non xa? Yes, it supports both.
    but I am experiencing some calls to the database that takes a very long time. May be database is slow or data-source is not fine tuned. Does it happen under heavy load? What is the independent normal execution time and how much it is taking actually when you use DB adapter?
    Regards,
    Anuj

  • What happened when using non-TX datasource connection in a Transaction?

    Hi,
    I try to update a timestamp table in a transactional EJB method invocation.
    The table is in the same db where the entity bean stores. I get the
    connection via DataSource (non-transactional), and issue the sql statement,
    and then close the connection.
    My question is: is my update part of the EJB transaction? If yes, how do
    I manage to get the timestamp update out of the scope of the transaction
    since I just want to timestamp no matter wether the EJB transactional method
    invokcation succeed or fails. Do I need to explicitly suspend and resume
    the transaction?
    Thanks!
    -Chunbo

    Chunbo Huang wrote:
    >
    Hi,
    I try to update a timestamp table in a transactional EJB method invocation.
    The table is in the same db where the entity bean stores. I get the
    connection via DataSource (non-transactional), and issue the sql statement,
    and then close the connection.
    My question is: is my update part of the EJB transaction? If yes, how do
    I manage to get the timestamp update out of the scope of the transaction
    since I just want to timestamp no matter wether the EJB transactional method
    invokcation succeed or fails. Do I need to explicitly suspend and resume
    the transaction?Hi. Your update is non-transactional. It is not part of the EJB transaction,
    and will succeed or fail at the time you do it, regardless of the eventual
    fate of the EJB transaction.
    Joe
    >
    Thanks!
    -Chunbo

  • EJB calling Spring Bean with non XA Datasources causing Rollback Exception

    We have an EJB CMT with Required calling a spring bean (@Transactional Propagation.NOT_SUPPORTED). This is causing an Rollback Exception saying 2 phase commit must be enabled. The EJB has to write to datasource 1, but the Spring Bean is ready only on Data Source 2. The Data Sources are set to use Non XA Driver with Support Global Transaction enabled for One phase commit. Any help is appreciated.

    We have an EJB CMT with Required calling a spring bean (@Transactional Propagation.NOT_SUPPORTED). This is causing an Rollback Exception saying 2 phase commit must be enabled. The EJB has to write to datasource 1, but the Spring Bean is ready only on Data Source 2. The Data Sources are set to use Non XA Driver with Support Global Transaction enabled for One phase commit. Any help is appreciated.

Maybe you are looking for

  • Forms 6i - display into image item picture stored in blob type on database

    hi to all i searched on this forum but in don't found solution my problem. I created table with a column blob and i design form that insert and display image stored in database ( oracle 9i ) i used image item type with block database based my version

  • Problem with decision

    Hello, I have a huge problem with my iPhone 5. After drop a loudspeaker(on the top) doesn't work, so I'm unable to talk with people. Also my front glass is broken, but it's not such a big problem. The question is should I try to sell iP5 and buy iP 5

  • OID: ldap Name Space question

    Experts for OID, need your help with following: OID will be used to store user accounts (will later sync from a local Active Directory, so all users in AD will appear in OID) Following is the information about Active Directory. The AD domain is adaut

  • JRockit Mission Control (jrmc) - Web access

    Hi experts, I have JRockit installed on Linux x86-64 (Suse Linux SLES10) box. The requirement is to be able to provide a url to outside non Linux users who can access jrmc via Internet Explorer on their PCs/laptops. My questions are: 1. Is this possi

  • Flipping an image in FCP

    Is there any way on FCP to flip or reverse an image 180 degrees so that if someone looking to the right I can change the image to look to the left instead without it being upside down?