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/

Similar Messages

  • Sharing Primary Site and Secondary Site's SUP WSUS for non-SCCM client use

    I was wondering if the WSUS deployed for the SCCM's SUP can also be (re)used for non-SCCM clients.
    Our SCCM infrastructure are mainly used to manage Workstations whereas our back-end servers are not deployed with SCCM agents due to overlapping SLAs and responsibilities. However, we would like to take advantage of WSUS's centralized update repository without
    each back-end servers initiating connection to the Internet to get their updates.
    Is this possible?

    No. WSUS servers that are used for SUPs are controlled by ConfigMgr and cannot be used outside ConfigMgr.
    Torsten Meringer | http://www.mssccmfaq.de

  • How to read XML file kept on NON-SAP server using the Http URL ?

    Dear Experts,
    I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
    All i have with me is the http URL that points to the location of the file.
    I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
    I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
    I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
    Please help me as its an urgent issue .
    Points will be rewarded for sure.
    Please help.
    Thanks in advance,
    Suchita.
    p.s. : the http url to the file location is like -->
    http://SomeServerDomain/SomeDirectory/file.xml

    hi,
    interesting task.
    to request the file by a http call you need to create an if_http_client object.
    More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
    to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
    uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
    now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
    have fun,
    anton

  • Can't start J2ee server using j2sdkee1.3.1

    When i try to start j2ee server , it shows the following
    Error message.
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/naming/Context
    at com.sun.enterprise.server.J2EEServer.<clinit>(J2EEServer.java:53)
    I have set all environment variables as follows
    set path=.;c:\jdk1.2.2\bin;c:\j2sdkee1.3.1\bin;
    set classpath=.c:\jdk1.2.2\lib;c:\j2sdkee1.3.1\lib\j2ee.jar
    set JAVA_HOME=c:\jdk1.2.2
    set J2EE_HOME=c:\j2sdkee1.3.
    pls kindly give a solution.

    Try rather using the 1.4 version available here: http://java.sun.com/j2ee/1.4/
    and use this dedicated forum: http://forum.java.sun.com/forum.jsp?forum=136
    -Alexis

  • Slideshows for non .Mac server

    Any suggestions/examples anyone?

    Have a look at this topic with reference to iPhoto Export...
    http://discussions.apple.com/thread.jspa?threadID=1142025&tstart=0
    and get the application at...
    http://www.hagus.net/files/iPhotoExportBeta1.7.zip
    JAlbum is good and now allows you a free web album page on the internet if you don't have .Mac.
    http://jalbum.net/
    PhotoPresenter is cheap and versatile...
    http://www.arizona-software.ch/photopresenter/
    PulpMotion is unusual and fun....
    http://www.pulpmotion.com/

  • The Apple site says an iPad2 w/ VZW service is charged for non VZW WiFi use as well - true or not?

    I want to make sure I understood the footnote here:
    http://store.apple.com/us/browse/home/shop_ipad/family/ipad/rate_plans_store?mco=MjE0OTIzMjA
    "(1) Includes Wi-Fi browsing; refer to carrier website for terms and conditions."
    So this means that I must pay for my own data from basic non-VZW WiFI as if Verizon provided it to me?
    I can't find anything on the VZW or Apple Sites that otherwise disputes or confirms this.
    Can anyone explain?

    Thank You MFK for your input. The data plans with the different allowances at the mentioned link is a reference in the event you wish to use a data connection and use data. Whether or not you need to pay for any access from a non-Verizon Wireless WiFi location depends on what the establishment offers for their data connections. However, some locations do not charge because they want you to visit their place of business. 
    Thank You,
    edw@vzwsupport

  • Scalability of Business Catalyst for non public domain use.

    I have a client looking for a CMS setup that would be more like an intranet than a website, but it seems that all levels of subscription for BC have no more than 10 users as a limit. Is there a version that would allow significantly more? The traffic to said site would not be public domain available, a sign in would be necessary for all users.  Also, there would need to be fairly robust security and e-commerce functionality, are both possible? We are looking at as many as 2000 users to start, with more possible as the business model progresses. Also needs the ability to integrate video without embedding youtube or vimeo videos, it would need to be served from the same server as the site for security reasons. Need as much info as possible in this regard.

    You could build a website with 2,000 frontend users. The 10 users as part of the plan are users for the backend. IE: Users who can see statistics, edit the site, etc. .
    It sounds like secure zones are what you are looking for. You could make your entire site a secure zone and have a person login via username and password.
    BC can also handle video without issue (though the video files must be less than 100mb in size.)  I will mention that Vimeo and other services have paid plans that allow you to lock a video so it is only viewable at a specified location and not to the public.
    Ecommerce BC handles without issue. As for "robust security" what do you consider robust security. I consider BC very secure and is part of the reason I use BC.

  • Using secure tranport for making ssl connection with server using iPhone

    HI all,
    I need to estabilish a secured connection using tcp with sslv3 to the server. I tried using
    [inputStream setProperty:NSStreamSocketSecurityLevelKey forKey:NSStreamSocketSecurityLevelSSLv3];
    [outputStream setProperty:NSStreamSocketSecurityLevelKey forKey:NSStreamSocketSecurityLevelSSLv3];
    I have explained the problem in detail in the following link
    http://www.iphonedevsdk.com/forum/iphone-sdk-development/25721-creating-ssl-conn ection-using-sockets.html
    But it makes only a tcp connection wth the server and the server sends the "Connection Reset by peer " error.
    So I have planned to use Secure Tranport. But i didnt find a suitable sample code in the internet. I found a sample in apple 's docs. But thats too confusing. Any sample code available for making tcp with ssl connection with the server ????
    Regards,
    Mohammed Sadiq.

    You must select if you use certificates for the SSL.
    If you are not, here is an example
    // server is the ip address for the server and hostport the port to use
    CFReadStreamRef readStream = NULL;
    CFWriteStreamRef writeStream = NULL;
    CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, (CFStringRef ) server, hostport, &readStream, &writeStream);
    if (readStream && writeStream) {
    CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket , kCFBooleanTrue);
    CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
    iStream = (NSInputStream *)readStream;
    [iStream retain];
    [iStream setDelegate:self];
    oStream = (NSOutputStream *)writeStream;
    [oStream retain];
    [oStream setDelegate:self];
    if (Iwill_use_ssltoday == true)
    int res1 = [iStream setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
    int res2 = [oStream setProperty:NSStreamSocketSecurityLevelNegotiatedSSL forKey:NSStreamSocketSecurityLevelKey];
    NSLog(@"SEC TEST %d %d",res1,res2);
    NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
    [NSNumber numberWithBool:YES], kCFStreamSSLAllowsExpiredCertificates,
    [NSNumber numberWithBool:YES], kCFStreamSSLAllowsAnyRoot,
    [NSNumber numberWithBool:NO], kCFStreamSSLValidatesCertificateChain,
    kCFNull,kCFStreamSSLPeerName,
    // kCFStreamSocketSecurityLevelTLSv1, kCFStreamSSLLevel,
    nil];
    CFReadStreamSetProperty((CFReadStreamRef)iStream, kCFStreamPropertySSLSettings, (CFTypeRef)settings);
    CFWriteStreamSetProperty((CFWriteStreamRef)oStream, kCFStreamPropertySSLSettings, (CFTypeRef)settings);
    [iStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    [iStream open];
    [oStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
    [oStream open];
    if (readStream)
    CFRelease(readStream);
    if (writeStream)
    CFRelease(writeStream);

  • Equivalent for TOP 1 of SQL Server used in subqueries

    Hi all,
    I am trying to migrate a sql query from SQL Server to Oracle 9i, which uses the SQL Server TOP keyword in correlated subqueries.
    How should I write it in Oracle?
    The query is more complicated, but in principle looks like:
    SELECT TAB1.t1_id, TAB2_t2_id,
    ISNULL((select top 1 val_num
    from values where values.val_id = TAB1.val_id ) ,0),
    TAB1.date,
         (select top 1 TAB3.t3_id from TAB3 where TAB3.name = TAB1.name)
    FROM TAB1, TAB2
    WHERE TAB1.org_id = TAB2.org_id
         AND TAB1.date > TO_DATE('2006-01-01', 'YYYY-MM-DD')
         TAB2.required IS NOT NULL
    If I would remove in each subquery the "top 1" and add "and rownum = 1", it will not work.
    Any suggestions?
    Thanks,
    Paul

    http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-044.html

  • When I click on the Start Icon and type the name of a file I am searching for none appear.

    When I click on the Start Icon and type the name of a file I am searching for none appear.
    Using Widows 7

    Are you searching for a file that you downloaded via Firefox?
    If that is the case then you can check the Download Manager (Tools > Downloads) and if that file is listed there then right click that entry and choose > Open Containing Folder. If that entry is grayed then the file is no longer in the original download location and possibly removed by AV software.

  • Deploy ejbs without using deployment tool in J2EE server

    Hi,
    IS there any way to deploy ejbs in J2EE without using the deployment tool? I am using the j2ee 1.2.1.
    Thanks,
    Nipa

    When I was in my companies Java Boot Camp (6 week fulltime training in Java technologies) the class was split about 75/25 with 75% of the class using a deployment tool (I think it was WebGain). The other 25% did not use a deployment tool. I was one of the 25%.
    What we did was write a Perl script that took care of all the necessary deployment steps. It has been awhile, and I no longer work for that company, but I'll try and dig up some of those scripts. (Can't promise I'll find them!)
    BTW, the 25% group deployed more EJBs with less problems than those using the deployment tool...

  • O-R Relations in Sun J2EE SERVER/OC4j

    The O-R Mappings in Sun J2EE SERVER using Deployer Tool
    Not working ...
    I badly need help....

    Raj -
    You can use an old style (pfd 1 I think) of the ejb2.0 cmp/cmr with OC4J/Orion. The container will manage the relationships for you. I use it quite frequently in fact, though it is not advertised too heavily in the documentation. Once the ejb2.0 spec is incorporated fully into OC4J - you will have to make the odd change here-and-there.
    For instance, create your abstract implementation classes -
    Dept and Emp...
    public abstract class DeptEJB implements EnityBean
    //abstract getters/setters
    public abstract void setDeptName(String deptName);
    public abstract String getDeptName();
    (etc)
    // abstract 1-* relationship methods
    public void addEmp(Emp emp) throws RemoteException,FinderException,NamingException,CreateException
    this.getEmps().add(emp);
    public abstract void setEmps(Collection emps);
    public abstract Collection getEmps();
    Create your abstract implementation class for Emp as well. While this relationship is certainly bi-directional (i.e. known to both) I am only doing a uni-directional relationship in this case.
    After you have done this, you will need to put the relationship into the ejb-jar.xml file....You will need to create an ejb2.0 style descriptor.
    For instance....
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <description>Dept Entity Bean</description>
    <display-name>Department</display-name>
    <ejb-name>Dept</ejb-name>
    <home>mypackage.DeptHome</home>
    <remote>mypackage.Dept</remote>
    <ejb-class>mypackage.impl.DeptEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <abstract-schema-name>Dept</abstract-schema-name>
    <cmp-version>2.X</cmp-version>
    <reentrant>False</reentrant>
    ... Put all of your cmp fields as usual...
    ... In that same list (different than current ejb2.0)...
    ... place your cmr field ...
    <cmp-field>
    <field-name>emps</field-name>
    </cmp-field>
    </entity>
    <!-- Also do you Emp entity descriptor -->
    <entity>
    <description>Emp Entity Bean</description>
    <display-name>Employee</display-name>
    <ejb-name>Empejb-name>
    <home>mypackage.EmpHome</home>
    <remote>mypackage.Emp</remote>
    <ejb-class>mypackage.impl.EmpEJB</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <abstract-schema-name>Emp</abstract-schema-name>
    <cmp-version>2.X</cmp-version>
    <reentrant>False</reentrant>
    ... Put all of your cmp fields as usual...
    <cmp-field>
    <field-name>some_field</field-name>
    </cmp-field>
    ... etc ...
    </entity>
    ... The rest of your enterprise bean information
    </enterprise-beans>
    ..... Next comes the relationships section ...
    <<<<<NOTE - this differs somewhat from the final EJB2.0 spec
    <<<<and you will need to make any required changes once it
    <<<becomes final in OC4J
    <relationships>
    <ejb-relation>
         <ejb-relation-name>dept-emps</ejb-relation-name>
         <ejb-relationship-role>
         <ejb-relationship-role-name>
              dept-has-emps
         </ejb-relationship-role-name>
              <multiplicity>one</multiplicity>
              <role-source>
              <ejb-name>Dept</ejb-name>
              </role-source>
              <cmr-field>
              <cmr-field-name>emps</cmr-field-name>
              <cmr-field-type>java.util.Collection</cmr-field-type>
              </cmr-field>
         </ejb-relationship-role>
         <ejb-relationship-role>
         <ejb-relationship-role-name>
              emps-belong-to-dept
         </ejb-relationship-role-name>
         <multiplicity>many</multiplicity>
         <role-source>
         <ejb-name>Emp</ejb-name>
         </role-source>
         </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    ... Finish off your deployment descriptor as usual
    When deployed successfully, OC4J will create your entity tables and your relationship tables (build off of the primary ids of you entity beans). You can add and remove employees from your dept.
    Okay - that is a quick way to look at it from ejb2.0 (as it exists today in OC4J) container managed relationships. As stated, this will change somewhat when the spec is finalized in OC4J (they are quiet about when that will happen).
    If you want to do container managed relationships in ejb1.1 - go to the Orion support site www.atlassian.com and go to this link:
    http://kb.atlassian.com/content/orionsupport/articles/complex-or.html
    Hope I have helped somewhat and haven't completely confused the issue!
    Cheers
    Ray
    Thanx for the information...
    I am Using J2EE RI Server ...
    can i have an example Code like Dept-Emp with 1-* Relation Ship
    i am trying the same...
    Plz clarify...
    * Shouls We Create the Relation ship fields and relation
    in the DataBase itself
    OR
    The Container Will Manage for us
    Cheers
    Raj

  • Redirecting output to J2EE server command prompt

    I am finding difficulty with reading the system.out.println() given in the server side code. J2SDK redirects it to System.out file, but most of the time, I am not
    getting the results. I tried to restart the server to get the value from buffer.
    But thats not working either. Is there any way for getting the output in the server prompt itself. Can I do any configuration changes for this.

    Start the J2EE server from the command prompt with "-verbose" option.
    Regards,
    Ashoke Bhowmick

  • J2EE server not coming up plz help me

    Hi,
    I am new to EP.While deploying EAR into portal unkowingly entered 3 times wrong password for  SDM.
    Now J2EE server is not coming up.I changed SDM password thru command line.I even changed admin password thru config tool .
    still server is not coming up.Do I need to uninstall and install portal again? or is there any possible solution for this.
    If I have to uninstall what all the things I need to do apart from deleting c:/usr/sap.
    Please help me guys.
    Regs,
    Vijay

    Hi,
    your J2EE should start without problems even if you have problems with SDM? You can even disable the starup of your SDM and your J2EE will start and run anyway!
    Are you sure your J2EE is not starting or is it just the SDM process?
    The SDM will be stopped when you enter a wrong password. This is a security feature. You will have to restart the SDM (either from command line) or using JCMON.
    Are you on Windows or UNIX.
    Try starting JCMON and see which processes are up and running. If your engine is really
    down try to have a look at the tracefiles and see if there are any hints or post some of the output here!
    Try to check for running processes. (Windows: use MMC), UNIX ps -ef | grep <sidadm> or ps -ef | grep jlaunch. There should be a jlaunch process for yout dispatcher, every single node on your server and your SDM (if running)
    Let me know if you have further questions
    Hope this helps (Please reward if helpful)
    Cheers

  • Problem starting j2ee server (new one)!

    Please, someone help me - I have an assignment using j2ee!
    I'm running XP and use jdk1.3.1.
    When I try to start up the
    j2ee server using j2sdkee1.3.1 I get this message:
    Starting web service at port: 8000
    Starting secure web service at port: 7000
    J2EE SDK/1.3.1
    Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider
    org.apache.crimson.jaxp.SAXParserFactoryImpl could not be instantiated: java.la
    ng.SecurityException: sealing violation
    at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:
    141)
    at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:270)
    at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig
    .java:731)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:82
    3)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
    g.java:224)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
    eSupport.java:155)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
    345)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307
    I would be terribly thankful if someone knew :)

    I had the problem with starting server too.
    error message :
    java.lang.RuntimeException: Unable to create ORB. Possible causes include TCP/IP
    ports in use by another process
    at com.sun.enterprise.server.J2EEServer.run(J2EEServer.java:346)
    at com.sun.enterprise.server.J2EEServer.main(J2EEServer.java:972)
    J2EE server reported the following error: Unable to create ORB. Possible causes
    include TCP/IP ports in use by another process
    Error executing J2EE server ...
    I didn't think my machine was running another process while I attempted to run j2ee server.
    But I had installed WebObjects of Apple company.
    That's the reason or something else was wrong.
    I am very anticipate for your help.

Maybe you are looking for