Java Transactions WITHOUT JTS

Hi All:
I am working on a project where the user can create 3d components. In our code we do this:
- Create an object from a java class that represents the component
- Add the object to the component collection (data model)
- Create the 3d component with our modelling library
- Render the component with our rendering library.
If any of these steps fails I need to rollback the whole process (transactions). So my question is this:
- Do you know any documentation about transactions in Java?. Any algorithm or implementation of them that I could use?
I have been taking a look to the Java Transaction Service but that is too much for what I need and besides my application is not a J2EE application.
Note:
I posted a topic like this on friday but I can not find it in the forum so I suppose I didn't post it correctly. If it is there and I just duplicated I apologize.

You probably mean this thread: http://forum.java.sun.com/thread.jspa?threadID=628989
When you click on your nick name you'll get a list of recent posts you made. Please stay in that thread, if the question hasn't changed.

Similar Messages

  • How to convert a .class file into .java file without .jad using DeJDecompil

    Hi all,
    I am using DeJDecompiler and working with swing applications.If I try to convert a .class file into .java file,it is converting into .jad file only.Fine but if I try to save that file into .java file,It is giving lot of errors in that program.When I went into that program the total style of the program is changed and TRY-CATCH block is not recognised by the dejdecompiler,hence If I try to include some methods in the existing .java file thus got,I could not do.Kindly help me.
    If I get the .java file without error then I can process the rest of the functionality.
    Thanks in advance
    With kind Regs
    Satheesh.K

    Not so urgent today then!
    http://forum.java.sun.com/thread.jsp?thread=553576&forum=31&message=2709757
    I'm still not going to help you to steal someone�s code.

  • How to get an XML string from a Java Bean without wrting to a file first ?

    I know we can save a Java Bean to an XML file with XMLEncoder and then read it back with XMLDecoder.
    But how can I get an XML string of a Java Bean without writing to a file first ?
    For instance :
    My_Class A_Class = new My_Class("a",1,2,"Z", ...);
    String XML_String_Of_The_Class = an XML representation of A_Class ?
    Of course I can save it to a file with XMLEncoder, and read it in using XMLDecoder, then delete the file, I wonder if it is possible to skip all that and get the XML string directly ?
    Frank

    I think so too, but I am trying to send the object to a servlet as shown below, since I don't know how to send an object to a servlet, I can only turn it into a string and reconstruct it back to an object on the server side after receiving it :
    import java.io.*;
    import java.net.*;
    import java.util.*;
    class Servlet_Message        // Send a message to an HTTP servlet. The protocol is a GET or POST request with a URLEncoded string holding the arguments sent as name=value pairs.
      public static int GET=0;
      public static int POST=1;
      private URL servlet;
      // the URL of the servlet to send messages to
      public Servlet_Message(URL servlet) { this.servlet=servlet; }
      public String sendMessage(Properties args) throws IOException { return sendMessage(args,POST); }
      // Send the request. Return the input stream with the response if the request succeeds.
      // @param args the arguments to send to the servlet
      // @param method GET or POST
      // @exception IOException if error sending request
      // @return the response from the servlet to this message
      public String sendMessage(Properties args,int method) throws IOException
        String Input_Line;
        StringBuffer Result_Buf=new StringBuffer();
        // Set this up any way you want -- POST can be used for all calls, but request headers
        // cannot be set in JDK 1.0.2 so the query string still must be used to pass arguments.
        if (method==GET)
          URL url=new URL(servlet.toExternalForm()+"?"+toEncodedString(args));
          BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
        else     
          URLConnection conn=servlet.openConnection();
          conn.setDoInput(true);
          conn.setDoOutput(true);           
          conn.setUseCaches(false);
          // Work around a Netscape bug
          conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          // POST the request data (html form encoded)
          DataOutputStream out=new DataOutputStream(conn.getOutputStream());
          if (args!=null && args.size()>0)
            out.writeBytes(toEncodedString(args));
    //        System.out.println("ServletMessage args: "+args);
    //        System.out.println("ServletMessage toEncString args: "+toEncodedString(args));     
          BufferedReader in=new BufferedReader(new InputStreamReader(conn.getInputStream()));
          while ((Input_Line=in.readLine()) != null) Result_Buf.append(Input_Line+"\n");
          out.flush();
          out.close(); // ESSENTIAL for this to work!          
        return Result_Buf.toString();               // Read the POST response data   
      // Encode the arguments in the property set as a URL-encoded string. Multiple name=value pairs are separated by ampersands.
      // @return the URLEncoded string with name=value pairs
      public String toEncodedString(Properties args)
        StringBuffer sb=new StringBuffer();
        if (args!=null)
          String sep="";
          Enumeration names=args.propertyNames();
          while (names.hasMoreElements())
            String name=(String)names.nextElement();
            try { sb.append(sep+URLEncoder.encode(name,"UTF-8")+"="+URLEncoder.encode(args.getProperty(name),"UTF-8")); }
    //        try { sb.append(sep+URLEncoder.encode(name,"UTF-16")+"="+URLEncoder.encode(args.getProperty(name),"UTF-16")); }
            catch (UnsupportedEncodingException e) { System.out.println(e); }
            sep="&";
        return sb.toString();
    }As shown above the servlet need to encode a string.
    Now my question becomes :
    <1> Is it possible to send an object to a servlet, if so how ? And at the receiving end how to get it back to an object ?
    <2> If it can't be done, how can I be sure to encode the string in the right format to send it over to the servlet ?
    Frank

  • ALSB 3 roll back a transaction without sending a fault message

    Hi,
    I have a proxy service exposed as a web service, which has some operations that call some tuxedo systems, do some transformation of the data, etc.
    When any of it's operations is invoked I have to build an XML reply in both success AND error cases. The difference between both is a response code, if the call to the backend tuxedo system responded with a stream that starts with OK then everything is fine and I build the reply and send it back, but if an error ocurred it will send back an stream that starts with ER followed by an error code, with which I will have to build the SAME XML but using this error code and send it back to the client instead as a "successful" invocation instead of sending a SOAP fault message. Also I need to roll back the whole transaction in that error case. The system works like that and it can't be changed, we are building this proxy service based on a WSDL file given to us by the partner company that invokes our service and there's lots of other clients that do it in the same way. The problem is that I haven't found a way to roll back the transaction without making the proxy service send a fault message that the client system won't understand. The "Raise error" and "Reply with failure" do roll back the transaction but both send a fault message. Is there a way to answer "successfully" to the client but make an explicit rollback?

    Hi,
    Check the blog http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22017.. [original link is broken] [original link is broken] [original link is broken]
    You can handle the exception on your web service and model a Notification task so that you can send e-mail notification to the sender in case of exception
    Regards, Anil

  • Compressing a large PDF document using command line or Java code without GUI operations

    hi,
    I have a programatically generated very large PDF file with lots of tables and cells in it. The size of the file is few MBs. Using Adobe pro, I am able to reduce the size of the PDF in KBs. I want to achive it either through a command line or using Java API without GUI interaction.
    I am using JDK1.6.
    Thanks.

    I think you need the scripting or SDK forums http://forums.adobe.com/community/acrobat
    As far as I know, Acrobat does not have command line operation

  • Load sound in java application without use of newAudioClip api.

    In personal java 1.2, (JDK1.1.8), the method newAudioClip is unavailable to load sound. What other api can one use to load sound into the java application in this case?

    there's nothing wrong with the old one, except that it's a api of the applet. If you try to run the applet thru' the java app. (without the browser or applet viewer), the getaudioclip api will fail.
    This is the limitation I am facing, 'cos I am developing in Personal Java1.2 env.

  • Is it possible to login into the Java instance without password's input, using only my Windows workstation authorization?

    Dear Sirs,
    I try to do an authorization to my NW 7.3 Java instance through my Windows domain authorization.
    I done:
    1) Create connection to LDAP-server and tested it.
    2) Add windows domain certificate to TrustedCAs
    3) Configure SPnego
    Now, I can to login in my NW7.3 Java instance with my windows password, but however I must to input password when I open NW7.3 Java homepage.
    Is it possible to login into the Java instance without password's input, using my windows workstation login/password?
    What I have to do for that?
    I use Windows XP on my workstation and IE 8.0.6 & Chrome 38.0.2125.
    Best regards,
    Alexey Lugovskoy

    Please check
    Using Kerberos Authentication on SAP NetWeaver AS Java - User Authentication and Single Sign-On - SAP Library (NW7.3)
    Using Kerberos Authentication for Single Sign-On - User Authentication and Single Sign-On - SAP Library (NW7.0)

  • Call an MM transaction without creating a new LUW

    Hello Experts,
    I have created a new Z_ transaction in which I want to call an existing Materials Management
    transaction (MB1B). Additionally, in my transaction I update some extra custom (z_) tables. I would like to have one LUW so as to perform all updates (both custom tables and SAP tables updated by the MM transaction) together at the final "commit work" in my program.
    Is there a way to call the MM transaction without creating a new LUW in my calling program (as the CALL TRANSACTION statement does)?
    I have read that one way is to use the CALL DIALOG statement instead. Is it a safe method to use?
    Please give as much detailed info (with examples) as possible.
    Thank you very much in advance,
    Orestis

    Hi Sandra,
    My requirement is to call a transacton in a subscreen. Created a screen 100 that is devided into 2 one for custom container to place tree control and  another for subscreen that is to call transaction.
    Call transaction works fine, but this transaction is being opened in new screen(as each transaction use new LUW)., is there any to display the transaction in the sub screen area instead of new screen..
    For ex, very similar to t-code SE80. In se80, choose other object, and choose more, and select trasaction  and enter any t-code, then it displays same of SE93 in the right side of the screen...hope it is clear..
    Regards, Laks

  • IS IT POSSIBLE TO CREATE TRANSACTION WITHOUT USING ACTION BOX?

    HI,
    We are trying to implement CIC NON-TELEPHONY.
    Our requirment is simple we need to create complaint from CIC.
    Is it possible to create a transaction without calling it from action box using default workspaces.
    I mean i will not configure action box at all all i do is create a default work space for complaint which appears when the CIC screen is called up.
    Is it really possible to create this way or is it mandatory that the transaction should be called from action box only to create it?
    Can some one please advice on this we just need to create a couple of transactions from CIC 'cause we are planning to set up a small call centre.
    Though i am not sure of the way it needs to be created i tried to create it with default workspaces ( i mean i did not call it from the action box) but the problem is while i create the transaction in this way i have a problem with partner determination and organization determination they are wrongly determined.
    So, i need to confirm is this way of creating acceptable.
    Awaiting suggestions
    Regards,
    SAM

    Hi Sam,
    As far as I know, the way that you use the Default workspace(Business Activity) with the transaction type as Complaint should be fine. There is no hard and fast rule to only create the Complaints in CIC via Action Box.
    Pertain to the Partner / Org. Determination, when you launch CIC, then as per the configuration, the default workspace(Business Activity) of the transaction type Complaint will be used and at this very begining itself the partner determination(associated with the transaction type) will be executed. And this is what you can see in the workspace as well.
    When you confirm a BP, then as per the customizing maintained in the transaction CRMC_CIC_SEARCH_RULE("Profiles for contact search"), the BP1 and BP2 partner functions will be pushed into the Activity you made as default for the interaction.
    This is how the CIC - with Business Activities & Partner Functions will work. I guess, apart from the way that you had made the default workspace of the transaction type as Complaint, you can also have a look at the above mentioned transaction for Contact searches and according to your need you can change the partner functions.
    Hope this information helps !
    With Best Regards,
    Vinod

  • Is it possible to run the java program without main?

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    Ramya

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    RamyaWhy do you ask? It sounds like an odd question. Your program can be an applet and it doesn't need a main method in that case.
    Kaj

  • End transaction without saving it

    Hi All
    A. Is there any possible with a button standard sap, to get out from a document
    transaction without saving it? after confirm account? (i am not working with IVR)
    B. Is there any possible to get out from document transaction without
    saving the changes even i made change.
    for example:
    1.Navigate to the INBOX
    2.Chosse transaction: press the link.
    3.Press change button
    4.Now lets say that i made some change and then i understand that is is
    a mistake. How can i get out without saving this changes.
    In the win guy or PCUI there is a pop up asked you to save or not. in The ICWeb
    I know there are no pop ups.
    Any sugested
    Did someone deal with such request?
    Thanks
    Merav

    Method:
    CL_GUI_FRONTEND_SERVICES->REGISTRY_GET_VALUE(
    ROOT = 1
    KEY = Software\Microsoft\Windows NT\CurrentVersion\Windows
    VALUE = Device

  • Message Error: 10 (Transaction without Amount)

    Hi Experts,
    When i am running depreciation run this error is occurring every time. Although the financial impact of depreciation does occur. Kindly let me know how can i solve this error.
    Kind Regards,
    Ozair Shamsi

    HI,
    Check below threads:
    Fixed Assets - Depreciation Run - Error -10 (Transaction Without Amount)
    Transaction without amount
    aldo check SAP Note 1166310
    Thanks,
    neetu

  • How to run java application without having java environment in  a machine

    can i run java application without having java environment(JVM) in a machine.I mean i dont have installed j2se or jdk in my machine.And i have an j2ee application running on another host which is built in swings.I want to access that application in my machine
    can any one help regarding my problem

    If you only need to access the program from one machine and you are running a Unix-like operating system (e.g., Linux, Solaris), you can use the remote display capabilities of X11. In this case you have to choose the host where the app will be displayed when you start it:
    $ DISPLAY=<hostname>:0.0
    $ export DISPLAY
    $ java ...
    If you want to be able to display it on both machines at the same time, or if you are using windows, then try something like VNC (http;//www.realvnc.com). Or if you are running windows and your version supports it, you can use windows remote desktop.

  • Map xsd complex type to existing java class without adding JAXB annotations

    Hello
    I've got a case where I should map an xsd complex type to an existing Java class without modifying that class, i.e. without adding JAXB annotations to that class.
    Is this possible somehow?
    As far as I've understood, the <javaType> declaration (adapter, parse/print methods) can only be used for xsd simple types.
    Thanks, Tom

    It should be possible to implement an XmlAdapter<...,...> which performs the required conversion between the original type and a JAXB-annotated type. Then, at the places where the original type is used, the @XmlJavaTypeAdapter annotation would be used.
    The xjc compiler supports this for xsd simple types (xjc:javaType annotation), but not for complex types.
    Any idea why this is restricted to simple types?
    Would it be possible to implement a xjc plugin which does this for complex types?
    Thanks Tom.

  • Executing transaction without active Undo Tablespace

    Hi,
    DB: 9.2.0.5
    OS : AIX 5.2
    I have opened my standby database in READ ONLY mode.I have undo tablespace.It is live setup and users are checking data with standby database.
    SQL> show parameter aq_tm
    NAME TYPE VALUE
    aq_tm_processes integer 0
    SQL>
    SQL> show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 10800
    undo_suppress_errors boolean FALSE
    undo_tablespace string UNDOTBS1
    SQL>
    My standby alertlog getting warning message as
    Mon Dec 13 12:16:39 2010
    ***Warning - Executing transaction without active Undo Tablespace
    Mon Dec 13 12:27:37 2010
    ***Warning - Executing transaction without active Undo Tablespace
    Mon Dec 13 12:28:03 2010
    ***Warning - Executing transaction without active Undo Tablespace
    Mon Dec 13 12:28:17 2010
    ***Warning - Executing transaction without active Undo Tablespace
    Mon Dec 13 12:34:43 2010
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    Mon Dec 13 12:35:22 2010
    ***Warning - Executing transaction without active Undo Tablespace
    ***Warning - Executing transaction without active Undo Tablespace
    Please help me.
    Thanks,
    sunand

    Hi Forstmann,
    Thanks for your quick reply.
    I have temp tablespace and see the below output.
    SQL> select name from v$tempfile;
    no rows selected
    Which means i do not have any temp file to temp tablespace.
    How do i can create tempfile in standby?.In what following states i can create,
    1) MOUNT ( Recovery mode canceled)
    2) READ ONLY
    3) opened after FAILOVER
    4) At any stage i can
    My client is planning to check the DR server by doing FAILOVER.After that will create standby database again from primary.
    Thanks,
    Sunand

Maybe you are looking for

  • How to retrieve old purchases with the same Apple ID but from a different country

    I used to be on the US app store and purchased apps, music and books on it. Now I have changed it to a South African account but can't update apps or download my old apps onto new devices. Any advice would be appreciated. Thanks

  • AVCHD Audio not importing correctly to Premiere

    Hey folks, I have some interviews in AVCHD files that I am editing for work. I correctly preserved the AVCHD file structure, and when I playback the interview in Quicktime, there is no issue with the audio. However, when imported into Premiere Pro, t

  • Trans Code to check the Date of Termination in Setup Tables-Very Urgent!!

    Hello BW Gurus,       I need to check the date of termination I have given while filling up the setup tables to verify when my delta loads would stop running. NPRT transaction code just gives me the time it took to fillup the tables but the date of t

  • Pls. tell me what is the syntax the report output

    Hi In internal table fields name are department , degination , workers . dept.             degination IT                   manager                      ***. manager                          IT officer                         IT officer               

  • Errant Outlook Data File

    I recently acquired a new computer and wanted to load my Outlook contact list onto my new computer.  I followed online instructions but when I came to identifying the file into which the pst data should be copied, that option did not exist.  I tried