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

Similar Messages

  • How do you create a column of sequenced dates in Numbers

    How do you create a column of sequenced dates in Numbers without typing in each date? For example: 01/05/15, 01/12/15, 01/19/15, 01/26/15, 02/02/15, etc.

    Hi Cha Ling,
    Another way,
    Enter your first two dates that show the desired interval- i.e. 01/05/15 and 01/12/15.
    Select both cells and choose fill from the contextual menu.
    Drag down to fill your column.
    quinn

  • How do i create a styled spry mysql driven menu using dreamweaver cs4?

    How do i create a styled spry mysql driven menu using dreamweaver cs4?
    I have cs4. I gave up on using MS sql as a datasource. I finally got a php successfull connection in my PHP web page.
    I would like a nice video tutorial for creating a dynamic menu.
    I guess i can style it by attaching a css file to the page. Are their any already designed css files out there in some online area?
    i am not a good designer. so i would like to simply have a collection of menu_style.css files and choose what looks good.
    But first i need to build the spry menu from the mysql database.
    Any help is apprechiated.
    My first choice was to maintain the data in an MS sql server file. If i could directly attach to an ms sql datasource then that would be the best option.
    I dont think i want to have to re-generate an XML datasource each time i add or modify the menu. I would like to maintain the MS Sql or mySql file instead.
    If i could generate an XML datasource from the MS Sql database then I may even prefere that, but i have spent a lot of time trying to figure out how to do that and not had any success. So i prefere working in MS sql but would settle for mySql if i had to.
    Thanks
    Jerry

    To create a dynamic menu take a look here http://labs.adobe.com/technologies/spry/samples/menubar/MenuFromNestedData.html#
    The XML file for the above menu looks like this
    <?xml version="1.0" encoding="utf-8"?>
    <items>
         <item id="0001" type="donut">
              <name>Cake</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
                   <batter id="1002">Chocolate</batter>
                   <batter id="1003">Blueberry</batter>
                   <batter id="1003">Devil's Food</batter>
              </batters>
              <topping id="5001">None</topping>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
              <topping id="5007">Powdered Sugar</topping>
              <topping id="5006">Chocolate with Sprinkles</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
         </item>
         <item id="0002" type="donut">
              <name>Raised</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5001">None</topping>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
         </item>
         <item id="0003" type="donut">
              <name>Buttermilk</name>
              <ppu>0.55</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
                   <batter id="1002">Chocolate</batter>
              </batters>
         </item>
         <item id="0004" type="bar">
              <name>Bar</name>
              <ppu>0.75</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
              <fillings>
                   <filling id="7001">
                        <name>None</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7002">
                        <name>Custard</name>
                        <addcost>0.25</addcost>
                   </filling>
                   <filling id="7003">
                        <name>Whipped Cream</name>
                        <addcost>0.25</addcost>
                   </filling>
              </fillings>
         </item>
         <item id="0005" type="twist">
              <name>Twist</name>
              <ppu>0.65</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5002">Glazed</topping>
              <topping id="5005">Sugar</topping>
         </item>
         <item id="0006" type="filled">
              <name>Filled</name>
              <ppu>0.75</ppu>
              <batters>
                   <batter id="1001">Regular</batter>
              </batters>
              <topping id="5002">Glazed</topping>
              <topping id="5007">Powdered Sugar</topping>
              <topping id="5003">Chocolate</topping>
              <topping id="5004">Maple</topping>
              <fillings>
                   <filling id="7002">
                        <name>Custard</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7003">
                        <name>Whipped Cream</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7004">
                        <name>Strawberry Jelly</name>
                        <addcost>0</addcost>
                   </filling>
                   <filling id="7005">
                        <name>Rasberry Jelly</name>
                        <addcost>0</addcost>
                   </filling>
              </fillings>
         </item>
    </items>
    Then remains the manner in which you create the XML file which can be found here http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    One you have your menu up and running, you will be able to apply styles and effects

  • How do I create an 'upload facility" for my website using Muse.

    How do I create an 'upload facility" for my website using Muse.  We are a print company and is how we receive most of our work.
    Iain

    Hey Iggy,
    These might help:
    Muse
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-what-is-business-catalyst
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-creating-and-publishing-sites
    -Dave

  • HT201342 How do I create a new iCloud account to be used as an email address only

    How do I create a new iCloud account to be used as an email address only?

    Howdy shark byte,
    This first article details how to set up an additional iCloud account as just an e-mail account on your iOS device.
    iOS: Setting up an email account
    http://support.apple.com/kb/HT4810
    Cheers,
    Allen

  • How do i create mailing labels for an avery template using pages

    how do i create mailing labels for an avery template using pages.

    mcc,
    The first topic in the "More LIke This" box to the right of your question is a rather comprehensive address label printing discussion. Does it answer your question?
    Jerry

  • How do you create a still image from a video using IMovies 11?

    How do you create a still image from a video using IMovies 11 on a Pro Mac?

    The simplest way is to do a simple screen capture.  

  • How will i create physical directory in oracle pl/sql using java

    how will i create physical directory in oracle pl/sql using java

    This is, I suspect, related to Re: how will i overcome from this error java.io.IOException. Quite why you felt the need to have two partial threads instead of one thread with a complete set of information is beyond me. Perhaps this muddled thinking is indicative....
    Anyway, if I was looking to do this particular task in Java I would look to using the specific command File.mkdir() rather than trying to use a generic exec approach.
    Cheers, APC

  • How Transaction Manager work with Resource Manager, like Connection pool?

    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!

    Xin Zhuang wrote:
    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!Hi. If you configure your WLS DataSource to use keep a connection for
    the duration of a tx, it will do that, and in any case there can be
    no deadlock however many connections operate for a given XA transaction.
    Here is the best coding form for DAOs or any other user-written code
    for using WebLogic DataSources. This is important for two reasons:
    1 - Thread-safety is maintained as long as the connection is a
    method-level object.
    2 - It is crucial to notify WebLogic that you are done with a connection
    ASAP, by your calling close() on it. We will then put it back in the
    pool, or keep it under the covers for your next request if it's in a
    transaction etc. The pool is optimized for quick get-use-close scenarios.
    public void one_of_my_main_JDBC_Methods()
    Connection con=null; // Must be a method level object for thread-safety
    // It will be closed by the end of the method.
    try {
    con = myDataSource.getConnection(); // Get the connection in the try
    // block, directly from the WebLogic
    // datasource
    // do all the JDBC within this try block. You can pass the
    // connection to subordinate methods, but not to anywhere
    // that thinks it can use the connection later.
    rs.close(); // close any result set asap
    stmt.close(); // then close any statement asap
    // When you're done with JDBC
    con.close(); // close the connection asap
    con = null; // nullify it so the finally knows it's done
    catch (Exception e) {
    // do whatever catch stuff you want. You don't
    // need a catch block if you don't want one...
    finally {
    // It is important to close a JDBC connection ASAP when it's not needed.
    // without fail, and regardless of exit path. Do everything in your
    // finally block in it's own try-catch-ignore so everything is done.
    try { if (con != null) con.close();} catch (Exception ignore){}
    return ret;
    }

  • How can I create a non-EFI USB installation media

    Hi fellows,
    I usually create a non-EFI installation CD  via this procedure
    https://wiki.archlinux.org/index.php/Un … ical_Media
    But now my optical drive is broken, so I need to create an USB non-EFI installation media.
    How can I do ???

    Hello nTia89,
    I'm in a similar situation to yours. I have an ancient MacBook Pro (1,1) with a broken optical drive, and any attempts to get EFI boot working with Linux have resulted in no graphics.
    My solution has been to first install Mac OS X via USB, then install Refind. After that, Refind will recognise Arch USB media during boot and you can install.
    I'm only booting Linux, so my solution has been to use MBR on the hard drive. That forces the machine to use the BIOS compatability mode.
    Don't hesitate to ask if you have any further questions!

  • How do you create a full frame sequence to change it from wide to full

    How do you create a new full frame sequence to change it from wide to full screen to burn a dvd? I tried creating a new project and importing the current sequence, but it imports the entire project with all the individual clips on the timeline, what is the practical way of doing this?
    Thanks
    Elio

    Create a new sequence using "full frame settings" and then nest the widescreen sequence in the new sequence. Now scale the nested sequence to your satisfaction.
    You will also find links to many free tutorials in the PremiereProPedia that will quickly show you how things are done in Premiere Pro.
    Cheers
    Eddie

  • How do i create a non editable template

    I would like to make my Terms & Conditions either a PDF or Pages/Word document that can not be edited apart from the insertion of a name and address. How can I create this document in pages?

    Put the fixed infos in a text box then
    Format > Advanced > Move Object to Section Master
    Yvan KOENIG (VALLAURIS, France) jeudi 26 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • How to properly create a non-repeat report block?

    Hi everyone,
    I am trying to create a front page for my report. In the report data mode I have a query only return one record, so why that query in the data model showed as a group? <It has the query name - Q_1 on the top, and a group box at the bottom named G_xxxx.>
    Second question is why i use the report block wizard to create the frontpage, the wizard forced me to select a group, otherwise it give warning/error message. I only want to select the client name and his address and no need to repeat <so the frame should use the non-repeatable frame right?>.
    At the moment, I have two queries in the data model, first one is the "select" query which will only return one record for the report's front page, second query is a matrix (cross product) query for the main contents of my report. Both query has no link.
    This is my first Oracle report so any suggestions are the most welcoming.
    Thank you
    Bryan
    Edited by: Bryanevil on Apr 8, 2009 8:19 AM
    Edited by: Bryanevil on Apr 8, 2009 8:26 AM

    Thanks DC
    Thats what I was thinking too. Is this the only way to create a non-repeatable frame; no wizard can be use for create non-repeatable report block? Why I am asking this is because I am lazy, dont want to add all the fields and labels one by one to the frame.
    Secondly, in the data model, is there any way to create a query which the data model will not recognise it as a group query but a single record query?
    Regards
    Bryan

  • How do I create a disk image for windows 7, using a windows computer for USB bootcamp for mac?

    Hi There, I have just bought a new 2013 iMac.
    Spec: 3.4 GHz intel core i5, 16GB 1600 MHz DDR3 Memory , NVIDIA GeForce GTX 775M 2048 MB Graphics with OS X 10.9.4.
    How can I create a 'disk image' from a windows 7 professional 64bit installation DVD using a windows laptop with windows 7 Operating system on? I want to transfer this 'disk image' (ISO?) to a USB ready for installing windows onto my 2013 iMac using bootcamp?  I want to use bootcamp from a USB as I have no disk drive for the installation DVD on my iMac. I hope all this is clear.
    Thank you. Joe

    Yes, that's correct, at least not directly. You can create a blank disk image, copy the file to the mounted disk image, then burn the image to a CD/DVD.
    Open Disk Utility and select Blank Disk Image from the New menu. Provide a name, Save location, and select the image size from the drop down menu. Leave Encryptions at None and Format as read/write. Click on the Create button.
    After the image file appears the "removable" disk should be automatically mounted. If not double-click on it to mount it. A "removable" disk icon will appear. Drag the file you want to place on the disk image to the "removable" disk icon. The eject the "removable" disk icon. Now select the disk image file in the DU left side list and click on the Burn icon in the DU toolbar. Be sure to have a blank disc ready.
    The above is actually the "long" way to do this. A much easier way is to simply insert a blank CD or DVD into the optical drive. The Finder will pop up a dialog asking what to do. Select the option to mount on the Desktop. You will now see a disc icon on the Desktop. Drag the file you want to burn to the CD/DVD, right-click or CTRL-click on the disc icon and select Burn from the contextual menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • How can I create a mobile application to connect with my php system

    II have few question to ask all expert here :
    1. Im using Netbeans IDE, how can I compile the .java file to .jar ?
    2. Currently, I have created a point of sales application using php and I hope to create a Mobile application to connect with tis system. So, anyone can let me know what I need to start ?
    3. Im using postgresql database, anyone here know how to connect with mobile application?

    !. When you build java application in NetBeans (standard one) you just click 'Build' or 'Clean and Build' and your jar file is waiting for you inside 'dist' directory of your project
    2. Connecting MIDP application to the server running PHP scripts is not a problem, just connect using simple HTTP with GET or POST and you are done, google on it!
    3. You can connect to the database using some kind of PHP/JSP/ASP or whatever application you want and then using method from point 2 to send and retrive values, you can do it with web services as well, possibilities are endless
    Hope this helps!
    Kris

Maybe you are looking for

  • Mid 2009 MacBook Pro not reading SSD? Help

    I have bought a Kingston Hyperx SSD for my mid 2009 MacBook Pro but the laptop does not see the SSD. I have booted the SSD externally installed OSX and it boots fine on the laptop but NOT when fitted internally. Is this a firmware/software problem or

  • BI 7 WAD- BACK _TO_PREVIOUS_ITEM_STATE.

    Hi All, I have a Button group  named SHOWCHARS which will show the navigation pane when the user clicks,and the button changes to HIDE CHARS.(Button Description) if again the user clicks the same  button it will hide the Navigation pane and it should

  • Is there a way to Instant Alpha Smart Build photos?

    In Steve Jobs' iPhone Keynote '07, he introduces the iPhone as three separate devices: an iPod, Phone, and Internet Communicator. He has an icon for each, and uses the Cube Smart Build effect. I tried doing the same but the white border remains aroun

  • How to save the changes of trackpad in gest account ?

    how to save the changes of trackpad in gest account because every time that i change them and restart it, it lose the changes ...

  • Error when installing java se sdk  6.16

    Hi All, while installing java se 6.16 sdk I get this error: " Installer: Wrapper.WriteFile(In small chunks) failed with error 112: there is not enough space on the disk." I can not figure this out as my hard drive has 207Gb free. any help apreciated.