Non J2ee use of JTA/JTS

I am about to build a small J2SE Gui app but think I need to build in some Transactional features
Can I use JTS/JTA outside of an AppServer environment - if so can your provide some pointers/docs/links
for example in the JINI world there is a Transaction Management service (Mahalo) - is this really just JTA/JTS repackaged for the JINI world

I'm not sure that just a JDBC Transaction wil sufficeI believe it's sufficient.
I had in mind manipulating several classes worth of data via a GUIThe fact that you're doing it with a GUI is immaterial.
If all goes well I can commit/update the underlying
DB - otherwise I need to 'Rolback' the changes
(potentially inside the DB & also in the GUI
supporting classes)If you have good MVC separation it's not a problem.
Sounds like you'll need to write your DAO persistence layer in such a way that several objects can participate in a transaction. No problem - do it in such a way that you pass a shared Connection between all the objects. Set auto commit to false for the Connection before you start, and then follow the usual idiom.
If you commit, update the VO in the middle tier and ask the GUI to display them.
If you rollback, the middle tier VO are unchanged and the GUI ends up displaying the original values again.
%

Similar Messages

  • Jta/jts

    Hi
    please clarify the following
    the jta/jts service is specific to ejb container or is that for application server can we access that through jsp page with jta from jsop page if in case we have to use multiple databases from jsp and not use ejb
    is jta/jts also implemented by web container
    regards
    Javid

    Hi,
    My approach would be to create some EJB's to access the database and host these in an J2EE server, then access these from your web applications.
    EJB access to a database is much easier that putting the SQL statements in the WebPages and scales much better.
    Nick

  • Java.lang.IllegalStateException: cannot add non-XA Resource to global JTS t

    Hi,
    I am using JCAPS 5.1.2.
    As one of my project requirement I am invoking a jcd from page flow and that jcd uses 2 oracle otd, each oracle otd corresponds to database which resides in two different machines/hosts.
    When jcd is invoked from page flow, i got following error,
    "java.lang.IllegalStateException: cannot add non-XA Resource to global
    JTS transaction."
    [#|2007-07-17T19:13:06.209+0530|SEVERE|IS5.1.2|javax.enterprise.resource.resourceadapter|_ThreadID=17; ThreadName=Worker: 3;stacktrace-id=0;|RAR5029:Unexpected exception while registering component
    java.lang.IllegalStateException: cannot add non-XA Resource to global JTS transaction.
         at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.enlistResource(J2EETransactionManagerOpt.java:171)
         at com.sun.enterprise.resource.ResourceManagerImpl.registerResource(ResourceManagerImpl.java:97)
         at com.sun.enterprise.resource.ResourceManagerImpl.enlistResource(ResourceManagerImpl.java:71)
         at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:142)
         at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:202)
         at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:148)
         at com.stc.gjc.spi.DataSource.getConnection(DataSource.java:67)
         at com.stc.connector.oracleadapter.base.SessionImpl.connect(SessionImpl.java:130)
         at com.stc.connector.oracleadapter.OracleSession.open(OracleSession.java:98)
         at com.stc.connector.oracleadapter.OracleConnector.open(OracleConnector.java:90)
         at com.stc.connector.oracleadapter.appconn.OracleApplicationConnection.<init>(OracleApplicationConnection.java:63)
         at com.stc.connector.oracleadapter.appconn.OracleApplicationConnection.<init>(OracleApplicationConnection.java:50)
         at com.stc.connector.oracleadapter.appconn.OracleApplicationConnectionFactory.getConnection(OracleApplicationConnectionFactory.java:133)
         at com.stc.oracle.runtime.ejb.OracleEWayRuntimeHandler.initializeService(OracleEWayRuntimeHandler.java:256)
    Please let me know is there any work around for above problem
    Message was edited by:
    VenkateshSampoornam

    Hi Paul,
    Thanks for your reply. I ddidn't specify XA at page
    flow level.
    But the problem is rectified for me.
    I have two jcds in which one of them connects to two different oracle databases for e.g host A and host B.
    JCD1 connects to host A and host B[ 2 oracle otds]
    JCD2 connects to host B. [single oracle otd]
    I had three external applications for each otd
    In deployment profile, i connected two external applications to single external system for HOST B.
    When i created one more new external system for host b and moved one external application to that.
    After then the problem didn't occur again.
    null

  • Where are the non J2EE Templates ???

    I'm posting this after hours of frustration. A little background is required:
    I've been working on a project utilizing Java 2D to manipulate 16 bit images. In dealing with a BufferedImage.TYPE_CUSTOM image originating on a CT scanner, I've come across what I believe might be a JAva 2D bug.
    So I searched the Java site for info about the forums and bug reports, and realized that I had to get a 30 day Standard subscription, which of course meant installing Java Studio Creator. The hoops I had to jump through to do that I will not go into here. (I had been using Netbeans 3.6 for my development.)
    So, I was finally able to log a report. I included the code which led to the problem (a pipeline of JAI.create calls on the original image, which could, by the way, be displayed without any exceptions). Looking at my email this morning I found that I am required to provide information to recreate the bug in Studio Creator in order for it to be examined. This has a couple of complications:
    1. The image in question is obtained from an image file formatted according to the DICOM protocol
    2. Reading the image file and converting it to a BufferedImage requires the use of a third party Image I/O plugin.
    I can provide both of these if required, but first back to the issue at hand.
    I whittled the bug scenario down such that I have a single class which can be used to recreate the error scenario. All I need to do now is create a simple non-J2EE, non-web, non-GUI "standalone executable" project. This appears to be impossible with Studio Creator "out of the box". A template is demanded, and the only one available is the J2EE one, which of course leads to an inundation of JSP, Beans, JSF etc clutter.
    IS THERE NO WAY TO JUST USE THIS PRODUCT TO JUST COMPILE AND RUN A SIMPLE JAVA CLASS???? I suppose this information can be found somewhere, but I don't look forward to digging around for many more hours to locate what seems to me a basic question for any IDE
    If not, is there ANY way to communicate with Sun regarding possible bugs? Hell, I'd be happy to pay $100 just to log and get feedback on this one issue. I'm contracting on an hourly basis, and this has already cost me more than that.
    Thanks for any advice, opinion, mild abuse, etc.

    Hi Bob,
    Sun Java Studio Creator is a tool for building web applications. To complie and run a simple java class NetBeans is the tool to use. NetBeans 4.1 is available and you could try this.
    You should be able to log a bug with your trial license. If not you can post it here in the forum and we will file the bug on your behalf.
    Cheers
    Giri :-)
    Creator Team

  • Handling Non J2ee Transaction

    Hi,
    I need to handle non j2EE transactions.How to go about this.Non J2ee transaction can be that for XML,LDAP,text files etc.

    Hi,
    You can try to use a CORBA OTS transaction manager and implement the OTS Resource interface for each type of data you have.
    Concretely, that means that you need to understand OTS, RMI-IIOP, and have to implement (for each type of data access you need) a mechanism that can prepare, rollback and commit a change made to that type of data.
    Depending on the support you can find for this, things can get rather complicated... Especially since the prepare function requires recoverable locks on your data.
    I don't know of a java framework that can help you with this, but I am working on one myself. One of my goals is to get rid of a lot of the complexity in these cases...
    Best,
    Guy

  • My microsoft office programs (Home and Business 2013) all desplay error message at startup stating " non-commercial use, not licenced product". How do I fix this?

    Hi,
    Whenever I start any of my microsoft programs I get an error message stating "non-commercial use, not licenced product" and I cannot do anything in the programs. I havve the Home and Business 2013 version.
    My husband bought the office programs for his and my computer and so they are both registered to his name however my email is the login, I dont know if this is relevant.
    How do I fix this?

    Hi,
    Based on your description, several possibilities come to my mind.
    1. You mentioned your husband bought the Office Suite for you, did he purchase one product key or two? We need to confirm if the product key can be installed on multiple machines, if a product key can be only installed once and he installed it
    on his computer first, you should purchase a new product key to activate your Office.
    Since the policy differs in different areas, to confirm how many machines the product key can be installed on, let your husband ask the retailer or contact the local customer service to get the answer:
    http://support2.microsoft.com/gp/customer-service-phone-numbers/en-us
    2. Please confirm your Office version. Based on the message "non-commercial use", I found this kb:
    http://support.microsoft.com/kb/937676/
    But it's for Office Home and Student instead of Office Home and Business, we can perform the steps below to find the Microsoft Software License Terms:
    1. Start and Office program.
    2. On the File (Backstage) tab, click Account.
    3. Click About (Product name: Word, Excel etc..), in the window that opens, click
    View the Microsift Software License Terms link.
    3. If your Office is a trial version or the product key is not for the version that you are using, consider to uninstall it first, and install the appropriate version. You can probably get the installation media from your husband.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Use of JTA API in JDBC programs.

    Hi,
    Where we can use JTA API in JDBC programs. what is the significance of UserTransaction interface in JDBC programs. I heard that when we are using two databases in same program then we use this JTA API. Can't we do this by using,
    connection.setAutoCommint(false);
    // code to work with two database
    connection.commit();
    does it wont work.
    Please suggest me.
    Thanks
    Satish

    I heard that when we are using two
    databases in same program then we use this JTA API.
    Can't we do this by using,
    connection.setAutoCommint(false);
    // code to work with two database
    connection.commit();This will work if there are no errors or crashes, but it can seriously fail otherwise.
    To find out more: you can download our JTA from http://www.atomikos.com and go through the JTA user guide. It includes the answer to your question.
    Alternatively, feel free to check our transactions community forum on http://www.atomikos-support.com/forums (which we check more often than this one).
    Best,
    Guy

  • 11g r2 non rac using asm for sun cluster os (two node but non-rac)

    I am going to install grid installation for non-rac using asm for two node sun cluster environment..
    How to create candidate disk in solaris cluster (sparc os) to install grid home in asm.. please provide me the steps if anyone knows

    Please refer the thread Re: 11GR2 ASM in non-rac node not starting... failing with error ORA-29701
    and this doc http://docs.oracle.com/cd/E11882_01/install.112/e24616/presolar.htm#CHDHAAHE

  • Outlook Pro 2007 'Non-Commercial Use Only' issue

    I have outlook 2007 that states that it is for 'non-commercial use only'
    I have searched far and wide for the answer but to find nothing.
    There was no upgrade from 2003/home/student. Just straight OS load, Office Pro 2007 load. They did tell me that after 'something' happened it started to show that. So it has been not showing that for months, maybe years, until about 2 months ago. They can't
    tell me what that 'something' was because they can't remember.
    It seems to me that the only way is to reload the PC completely. We are running a KMS and in a company of 1500 PCs about 3% are having this issue. Very small but enough for me to get a call about it. 
    Please dont tell me:
    That I had Home&Student - I dont
    To do repairs/uninstall/reinstall - I have 30x
    To do reg edits - Reg shows that the Product ID is correct and there are no 9.0/11.0 containers
    To deal with it - We have programs that use Outlook and are affected
    Tp check updates - Uninstalled as far back as they can remember when it started (2012)
    Don't link this:  http://support.microsoft.com/kb/2020690/en-us
    Sorry about being kind of straight forward and mean but I'm bashing my head trying to figure this out. I rather not reload 40+ PC just for this issue. 

    Who are "they"?
    Have you verified that the correct key has been used, the Office client can renew the key via the KMS, sufficient keys/licenses are available on the KMS (depending on your licensing method) and that no unlicensed Office 2007 components are installed?
    You can use the "cscript ospp.vbs" commands to further narrow things down.
    For instance with:
    cscript ospp.vbs –act
    cscript ospp.vbs –dhistory
    Also note that SP3 and later updated haven't been applied yet.
    Robert Sparnaaij
    [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

  • Non-commercial use

     I open Microsoft word and it doesn't let me do anything and it has a grid on it. It says non-commercial use, how do i take it off?

    Hi,
    Do you have Home and Student Version of Office? 
    When you start a Microsoft Office Home and Student 2010 or 2007   program, the title bar of the program displays the name of the program followed   by "non-commercial use." For example, Microsoft Office Excel 2007 displays   "Microsoft
    Excel non-commercial use" or "Book1 - Microsoft Excel non-commercial   use." 
    Cause:
    The "non-commercial use" text is based on the Microsoft Software License Terms for Office Home and Student 2010 or 2007 products.   
    In the Microsoft Software License Terms, the "non-commercial use" text identifies the use of the product. You may install one licensed copy of the software on three devices in your household. The software is not licensed for any commercial business
    activities, nonprofit business activities, or revenue-generating business activities.
    To find the Microsoft Software License Terms, follow these   steps, as appropriate for your situation.     
    Office Home and Student Office 2013
    Start and Office program.
    On the File (Backstage) tab, click Account.
    Click About (Product name: Word, Excel etc..),
    in the window that opens, click View the Microsift Software License Trems
    link.
    Office Home and Student Office 2010
    Start any Office program.
    On the File (Backstage) tab, click Help.
    On the right side under Microsoft Office, click the
    Microsoft Software License Terms link.
    Office Home and Student Office 2007
    Start Excel, Word 2007, PowerPoint, or Access.
    Click the Microsoft Office Button, and then click <var>Program_Name</var> Options.
    On the Resource tab, click About.
    Click View the Microsoft Software License Terms.
    http://support.microsoft.com/kb/937676/en-us
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Is enterprise portal development non-j2ee development?

    HI,
    IT is mentioned here at
    http://help.sap.com/saphelp_nw04/helpdata/en/56/c8633e0084e946e10000000a114084/content.htm
    "  Non-J2EE Java applications (J2EE Engine libraries, WebDynpro applications, Enterprise Portal applications, standalone Java applications, and so on) "
    Are the enterprise portal applications non- j2ee? can someone please clarify this to me..
    Thank you

    That's true.
    Enterprise Portal applications are developed from Portal Development Kit (PDK). There are Java and .NET versions of Enterprise Portal applications. Java-based Portal application involves HTMLB, JSP, and DynPage (JspDynPage), which is not purely J2EE.
    A J2EE application involves the Web (JSP, Servlets) and Enterprise JavaBeans (EJB).
    Hope it makes sense,
    - Teecheu

  • JTA/JTS for non-EJB & non-J2EE server used

    I have a standalone java program which calls methods on 2 java classes (c1, c2) These are Non-EJB/non-RMI/non-CORBA plain java classes.
    the method in c1 updates table t1 in database db1
    the method in c2 updates table t2 in database db2
    I would like to use JTA for conducting a 2PC based transaction. I know this can be done in an application/server or a J2EE container environment because they have built-in Transaction Managers (TM). and one just has to use JNDI to look up the UserTransaction object and then define the transaction boundaries. However, how do I all the above if I don't have access to a J2EE server and an EJB server?
    It seems like I would have to use a standalone Transaction Manager (not bundled with the app-server).

    Hi,
    My company has just released a (beta!) version of a generic java transaction manager. Although it offers some lightweight beans as standard development model, this does not have to be the case: the core idea is an extensible and very advanced transaction kernel. JTA comptable.
    This software is server-oriented: the transactional kernel (which also does recovery) startup and shutdown events trigger the start (initialization) and shutdown of your 'extension' classes. This is necessary because otherwise your resources will not be recoverable: if the transaction manager starts up, then it will first do recovery, and therefore your resources need to be available.
    You can ask for a beta version through our website:
    http://www.atomikos.com
    Note, however: we did not yet implement the XA DataSources. Rather, we have a kind of 'external' stored procedures that allow distributed transactions over regular JDBC connections. You would have to implement your solution along this line, or wait for the XA datasources.
    If there proves to be a lot of demand,
    we can of course speed up development on XA. It is not a very big effort.
    Best regards,
    Guy
    Guy Pardon ( [email protected] )
    Atomikos Software Technology: Transactioning the Net
    http://www.atomikos.com/

  • Having J2EE use mySQL

    Hi
    I'm using a standalone RedHat 9 system with J2EE 1.3.1 and mySQL 3.23.54.
    All are working individually.
    My current application creates new tables every time it starts, so I thought it would be dead simple to just ask J2EE to use mySQL. There are currently only two entity beans, and there's the place in the deploytool to enter the database JNDI name, username and password.
    I can't find any information on how to do it though. What do I enter where? Sun's site doesn't seem to tell me about mySQL and J2EE, while mySQL has not one mention of J2EE in its documentation, nor in Kofler (my mySQL book).
    I looked back through this forum too, and there's a link to a blog that doesn't seem relevant either.
    Clues anyone? Much appreciated. If I see you, I'll buy you a pint. Warm, obviously (I'm in the UK). You'll like it, honest :-)
    J

    Hi! I think I may help you. I had the same problem. But I�m Brazilian, I�m learning the English language yet. I�ll try to explain you.
    I am using J2EE version 1.3 with MySQL version 4.1.7 on Windows. You�ll have to configure the two following files:
    - <J2EE_HOME>\bin\setenv.bat
    - <J2EE_HOME>\config\resource.properties
    1) Copy the Jar file of MySQL driver to <J2EE_HOME>\lib directory.
    2) Open the setenv.bat and edit it. Add a reference to that Jar file.
    3) Run the <J2EE_HOME>\bin\j2eeadmin.bat. There are two command lines to be executed, as below:
    j2eeadmin.bat -addJdbcDriver <CLASS NAME OF THE DRIVER>
    j2eeadmin.bat -addJdbcDatasource <JNDI-NAME> <URL>
    For example:
    j2eeadmin.bat -addJdbcDriver "com.mysql.jdbc.Driver"
    j2eeadmin.bat -addJdbcDatasource "jdbc/mysql-connection/test" "jdbc:mysql://localhost/test?user=username&password=password"
    4) Now, the <J2EE_HOME>\config\resource.properties must be modified, with the reference for the MySQL database. Open this file and you will see. But perhaps you will have to configure it editing this file. That�s because I noticed that the character "\" was added erroneously in a lot of places of the code of this file. It seems to be a bug. So I simply removed this character, replacing it.
    5) Run the verbose, none error must appear, and the MySQL can be used with J2EE now! That�s all. Good luck!

  • SSO to Non-SAP using login-tickets

    Hi all,
    I'd like to set up an SSO connection to a non-SAP HTTP system by using the SSO web filter (iis_sso.dll) on IIS 5.0.
    I've created an iView (using the application integrator) with the URL template : http://<ip-address-host>:82/reqvars.asp?<Authentication> in which <Authentication> is MYSAPSSO2=<Request.SSO2Ticket>. The reqvar.asp page comes with the web filter as an example and displays all HTTP header fields. That way you can check whether the user-ID has been extracted successfully from the SAP logon ticket. However, I fail to get any value into the REMOTE_USER variable. The ISAPI filter (iss_sso) has been installed (global) successfully.
    I'm using the following settings in the verify.properties files:
    remote_user_alias = REMOTE_USER
    pse_file = C:\SSOFilter\verify.pse
    application = portal
    log_file = C:\SSOFilter\filter.log
    log_level = 3
    Remark: in the original example the remote_user_alias is set to REMOTE-USER: However, I feel this is wrong since the actual variable is REMOTE_USER. Also I have seen this one in another forum post as being a working properties file. Or should I use original value?
    No entries are being written to the log so I believe nothing is happening at all.
    The SSOFilter folder contains the following files:
    iis_sso.dll
    sapsecu.dll
    sapsecu.lib
    verify.properties
    verify.pse
    mfc71.dll, mfc71u.dll, msvcp71.dll, msvcr71.dll and sapsecin.exe
    This folder also has been added to the environmental PATH variable.
    Any suggestions would be highly appreciated (and rewarded ,
    Frodo

    Hi,
    I dont have much info related but i can giv u hint
    refer OSS Notes 442401 and 723896.
    When using SAP logon tickets for non-SAP applications, two different implementation options are available. The difference lies in where the ticket verification takes place.
    In the first case,  the SAP logon ticket is submitted to the web server filter located on the web server. The web server filter verifies the portal serveru2019s public key
    certificate using its local Personal Security Environment (PSE) and then populates the HTTP header field with the user ID for SSO to the non-sap web application.
    In the second case,  the SAP logon ticket is sent to the non-SAP application, which then verifies it using the ticket verification DLL and submits the user ID to the application for SSO.
    You can refer following link :-
    http://help.sap.com/saphelp_nw70/helpdata/EN/89/6eb8deaf2f11d5993700508b6b8b11/frameset.htm
    user authentication and SSO
    http://help.sap.com/saphelp_nw70/helpdata/EN/8f/ae29411ab3db2be10000000a1550b0/frameset.htm
    Authentication Using a Directory with SSO Integration Using Logon Tickets
    http://help.sap.com/saphelp_nw70/helpdata/EN/f8/3b514ca29011d5bdeb006094191908/frameset.htm
    SSO
    SAP Logon Ticket-based Single Sign-On
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/b6af743753003ae10000000a11466f/frameset.htm

  • Can We send data from SAP to non SAP using ALE !

    In this case what will be the receiver side configuaration !
    What will be our receiver client !

    Hi,
    We can send SAP to Non-SAP system using ALE technology.
    Ex:-
    Business Connector, VB.NET system can be integrated using ALE technology over TCP/IP connection.
    Regards
    Vijayanand Poreddy

Maybe you are looking for

  • M7747c

    The current SATA Hard Drive is having problems.  The message Hard Drive Failure is Imminent is appearing.  The drive is 320 GB.  What is the largest size this system can handle?  

  • Can't drag out the bottom right corner of image to resize

    Hi, I'm running PS CS3 on Mac iBook with 10.5.8 I've been using this setup for years & have always been able to drag out the right bottom corner to increase the grey space round an image so i can transform better or what ever. But now when I try to d

  • Please, HELP to convert code from AS2 to AS3!!!

    there is source code from paint application, thank to human who will convert this code, it's codeimportant for us. stop(); var arrSloy:Array = new Array(); //Initial //OnMove _root.onMouseMove = function() {           if (checkPole() && onTool) {    

  • If you delete duplicates in your itunes library, does itunes still leave one version of the song(s) in your itunes library

    if you delete duplicates in your itunes library, does itunes still leave one version of the song(s) in your itunes library

  • Oracle Upgrade 10.2.0.2 to 11g

    Hello, We have planed to upgrade the database Oracle from 10.2.0.2 to 11g. We are wondering wether there is a risk to upgrade directely to 11g from our current version. Also, what are the important points to observe and what are the tests to do in SA