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

Similar Messages

  • 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

  • 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

  • GetBlobReferenceFromServerAsync (and non-async) throw an exception with 404 (not found) if the blob doesn't exist.

    I'm trying to determine if a particular file exists in a blob store. I'm using container.GetBlobReferenceFromServerAsync and if the named blob does't exist I get an exception with a 404. ICloudBlob (which is returned by the method) defines an Exists method
    but it's functionally useless because the GetBlobReferenceFromServerAsync method call itself throws the exception. I do get the behavior I'm looking for if I call container.GetBlockBlobReference instead but there's no async version of that method.

    As I said I'd found that GetBlockBlobReference works but there's no async version of that method. I'm trying to determine IF a blob exists not create one. Since the GetBlobReferenceFromServer returns an ICloudBlob and ICloudBlob defines and Exists method
    you'd assume that it could be used to determine if a blob exists. I'd argue that the fact that it throws and exception when the blob does not exist is a bug in the implementation because it makes the Exist method on the ICloudBlob object functionally useless.
    Also, it seems like a fairly significant miss that there's no async version of GetBlockBlobReference. A query to a cloud resource is exactly the perfect use case for the async/await pattern.
    Does anyone know of an async way to check for the existence of a blob that doesn't involve catching a 404 exception?

  • Data source for application using both pooled and non pooled connections

    Hi guys.
    I am integrating Oracle's connection pooling into an existing application that had formerly used dbConnectionBroker. It looks like this task should be quite straightforward. However, for consistency, I would also like to replace other Connection logic within the application to use Oracle classes. This will involve using OracleDataSource to obtain a Connection object. ( without pooling ).
    So in this case, the application will use both pooled and non pooled Oracle connections. They will be connecting to the same database. The question I have is in regard to the use of data-sources.xml.
    Are there any special considerations for the required attribute values within data-sources.xml under this scenario ?
    Help will be greatly appreciated.
    Regards.
    Steve.

    Hi Steve -
    It should be feasible for you to define a single datasource using multiple location entries to indicate what sort of pooling behaviour you wish to use.
    If you lookup and use the "location" attribute, you will receive a javax.sql.DataSource object which will not provide connection pooling.
    If you lookup and use the "ejb-location" attribute you will receive a DataSource object that will support connection pooling operations.
    Note that this is using the emulated datasource approach, and transaction support is limited to a single resource (one database) for these datasources - you won't get 2PC support for transactions.
    If you need a transaction to span two separate resources (ie two databases in same tx) then you will need to use the non-emulated datasource approach.
    There is a chapter in the J2EE Services Guide which describes the datasource model we have with OC4J. This might provide you with some more useful information. See Chapter 11 - http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97690/ds3.htm#1004903
    cheers
    -steve-

  • 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.

  • 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

  • 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

  • Re: Segregate leading and non-leadingledger data in BI Cube

    Hello,
    I would like to share the following Scenario with you all:
    I want to extract leading ledger and non-leading ledger data into a BI cube. Sure, the answer is yes.
    Would it be possible to segregate both leading and non-leading ledger data within a BI cube? Or the only possibility is to load leading and non-leading ledger data into two different cubes?
    Please advise.
    Thanks
    RJ

    Hi RJ,
    Depending on what datasource you are using, it will provide a field that indicates the ledger. The new general ledger datasources provide the field RLDNR for this purpose, and you'll need to make sure to carry through this value to the BW DSO or Cube that you are using - [http://help.sap.com/saphelp_bic706sp01/helpdata/en/45/757140723d990ae10000000a155106/frameset.htm]
    Cheers,
    Ethan

  • 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 ?

  • How to create XA and non XA data source in Jdeveloper?

    I wonder if somebody can help me with this:
    I need step by step guidance how to create
    1) Oracle data source without transaction support
    2) Oracle data source with XA transaction support
    for both embedded OC4J and standalone OC4J. I am using JDeveloper 9i
    thanks,

    For non XA datasource create a JDBC Connection with data source class
    oracle.jdbc.pool.OracleDataSource
    For xa datasource create a JDBC connection with data source class
    oracle.jdbc.xa.client.OracleXADataSource

  • SSO for SAP and Non-SAP applications without Enterprise Portal

    Dear all,
    Is it possible to implement SSO for both SAP and non-SAP applications without involvement of EP at all?
    I have gone through this link.
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/e5/4344b6d24a05408ca4faa94554e851/frameset.htm</a>
    But I still i am not able to get the precise answer on how to enable SSO for both  SAP and non-SAP applications without EP.
    We have decided not to implement EP in first phase of SAP implementation. But we need to enable SSO for other SAP and Non-SAP applications.
    A detailed description on how to deal this kind of scenarios will be helpful.
    Thanks.

    A client of our's uses <b>SAP Enterprise Portal</b>, and is using the SAP SSO, which is implemented with tickets, and requires the use of SAPSECULIB.  My company provides an application for this client, and our application in hosted in our data center for the client, as a Software as a Service application, obviously across the internet.  Our client, which owns a SAP license, has asked that we support the SAP SSO as a non-SAP SSO application.  The client user's SSO ticket will be created from SAP EP, and then passed across the internet to our application, and we are to use that SSO ticket as an authentication ticket to our application.  I beleive I know how to do this work technically, having reviewed the SAP document named: "Dynamic Library for Verifying SSO Tickets in Third-Party Software"   Specification   Version 2.00  December 2005.
    My question is, does my company have the right to use the SAPSECULIB?  Where is the official download and <b>license</b> download, that indicates we can download this library, and use it to support a SAP customer?  We do not own a SAP license.  Thank you for your help.  I have searched many places in SAP support.<b></b>

  • OWSM 10.1.3.4 and Non-SOAP XML-based web service

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi all,
    According to the OWSM 10.1.3.4 Administrator's Guide, "all Web services registered with an Oracle WSM Gateway are virtualized as both a SOAP and non-SOAP Web service." To access the non-SOAP (XML-only) web service, the documentation states "The non-SOAP virtualized URL can be determined from the virtualized SOAP URL by replacing the services keyword in the URL with the xml keyword."
    For example, if the SOAP virtualized endpoint is:
    http://host:port/gateway/services/SID0003001
    then, the non-SOAP XML service endpoint is:
    http://host:port/gateway/xml/SID0003001
    I have several web services registered with an OWSM gateway, running on SOA Suite 10.1.3.4, and can access those without any problem. However, when I attempt to access the "/gateway/xml" version of these services, I simply get an HTTP 200 response header with a null body.
    Does anyone have any ideas what could be causing this or what the secret is to get the non-SOAP XML service feature of OWSM to work?
    Thanks!
    --Gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for