Autonomous Tranasction in Java

How can I use a similar concept as autonomous transaction in java. My requirement is to connect to a particular block, and should not have any impact on the transaction. How can I achieve this? Thank you in advance

In EJB, there is something similar (if you don't want to go with multiple db connections), known as nested transactions - see http://stackoverflow.com/questions/10817838/ejb-3-0-nested-transaction-requires-new or Java Enterprise Stuff: EJB transactions: deepening (search for REQUIRES_NEW)

Tags: Java

Similar Questions

  • update calendar does not have agents?

    Hello

    I created the interface. The amount of the fine running.

    Then I generated as a scheduling scenario.

    I insert the new calendar & then I'm updating the schedule of agents.

    ' ' I get the error message like: " unable to connect to agent"

    I have no hourly status of the session.

    Please help me.

    Thanks in advance,

    A.Kavya.

    You probably have not set your physical agent properly. I guess that until now, you have everything under the Local Agent that is built in the Studio of the ODI and therefore do not have to check if you have configured correctly executed in fact autonomous agent or Java EE.  You will not be able to run or schedule to run scenarios, until you complete this configuration step as none of these 2 tasks can be performed using the Local Agent.

    There is a lot of documentation available Oracle to help through the steps required to configure and agent of Googling so happy :-)

  • Error when loading of the APEX listener, appex_rl and appex_rt not found

    Trying to load the earpiece of the APEX, but 'appex_rt is not configured and errors will be ignored ", also for appex_rl, now it is stuck on @48231ms.

    Previous stages of the installation went well.

    He started very well...

    listener install 1.PNG

    then got the errors, but he continued... (see SEVERUS)

    listener install error 1.PNG

    final State, another error, now it is stuck

    listener install error 2.PNG

    listener install 3.PNG

    Hi Wm Peck 1958

    WM Peck 1958 wrote:

    Trying to load the earpiece of the APEX, but 'appex_rt is not configured and errors will be ignored ", also for appex_rl, now it is stuck on @48231ms.

    Previous stages of the installation went well.

    How do you use ADR/APEX listener? Autonomous/deployed on Java EE server?

    Want to host RESTful web services on your instance APEX?

    Looking at the error you found, it is because:

    During the installation of the ADR, he asked three databases users? : APEX_PUBLIC_USER, APEX_LISTENER and APEX_REST_PUBLIC_USER.

    Whose APEX_PUBLIC_USER is required for the operation of the Applications Oracle APEX. APEX_LISTENER (which corresponds to the configuration of apex_al) and APEX_REST_PUBLIC_USER (which corresponds to the apex_rt configuration) in ADR are required for the accommodation of RESTful services.

    The problem, I think it's that you haven't configured the RESTful services before installing ADR where the APEX_LISTENER and the APEX_REST_PUBLIC_USER does not exist and so the configuration of the ADR fails.

    It is fine if you do not configure the RESTful services (just want to use Oracle APEX), but when the ADR facility you should ignore configuration APEX_LISTENER and APEX_REST_PUBLIC_USER accounts.

    Moreover, I think that you use EA(Early Adopter) version of ADR version 3.0 of knowing, but I think you should go for the stable version of ADR version 2.0.10 Viz.

    The ADR 3.0 configuration is more advanced (complex bit) than the 2.0 because it contains information about 5 database users (i.e., APEX_PUBLIC_USER, APEX_LISTENER, APEX_REST_PUBLIC_USER, ORDS_METADATA and ORDS_PUBLIC_USER).

    Finally, I think you want the instance Oracle APEX for purposes of personal training, using Gateway (EPG) of embedded PL/SQL would be sufficient now as suggested by fac586 here: Re: getting started with APEX after download

    Suggestion: You should post data Services Oracle REMAINS related matters to the appropriate i.e. forum ADR, SODA & JSON in the database.

    Reference:

    I hope this helps!

    Kind regards

    Kiran

  • Issue starting oraclediagent console weblogic - ODI Webservice

    Hello
    We have an obligation to publish the ODI scenrio as Web service so that other applications can initiate the ODI scenario. We do not have a good expert to ODI we have searched the Web and went through all the documents and articles to understand how to implement this. We found the Public Web Service will be contributes to the execution of a Web service scenario. We have made steps below:

    1 > installed WebLogic
    2 > ODI installed with the developer component, autonomous Agent and Java J2EE (which contains the Public Web Service)
    3 > installation ODI creating new agent, has provided details of repository SUPERVISOR, MASTER and WORK. Installation is completed successfully and able to connect to the repo by using the ODI client.
    4 > started the weblogic server. In deployed applications, "oraclediagent" State is shown as being down. I tried to start from console, but get error below.


    + weblogic.application.ModuleException: [HTTP:101216] Servlet: 'AgentServlet' failed by preloading at startup in a Web application: "oraclediagent." ODI-1400: Agent OracleDIAgent start failure: JDBC connection error occurs when connecting to the master repository. ODI-1545: missing credentials supervisor odi credential store a map [oracle.odi.credmap] with [SUPERVISOR] key. to oracle.odi.runtime.agent.support.JPSCredentialProvider.getCredential(JPSCredentialProvider.java:48) to oracle.odi.runtime.agent.CompositeCrendentialProvider.getCredential(CompositeCrendentialProvider.java:48) to oracle.odi.runtime.agent.servlet.AgentServlet.startup(AgentServlet.java:323) to oracle.odi.runtime.agent.servlet.AgentServlet.init(AgentServlet.java:239) to javax.servlet.GenericServlet.init(GenericServlet.java:241) to +.

    This error made it clear that it is the lack of credentials. We checked the datasources of the master and work repositore that are correct but do not know how to upgrade the credentials of SUPERVISOR.

    Can someone help me please in the resolution of this error. I'll correct way to achieve my requirement? If not, please guide me through correct path :)

    Thanks in advance.

    Concerning
    KK

    Published by: 966531 on October 19, 2012 05:47

    After the start, server admin
    Oracle_ODI1\common\bin
    WLST

    Connect()
    WebLogic
    EU1
    http://:

    createCred (map = "oracle.odi.credmap", key = "SUPERVISOR", user = "SUPERVISOR", password = "welcome1", desc = "ODI Login")
    createCred (map = "oracle.odi.credmap", key = "base_domain", user = "weblogic", password = "welcome1", desc = "Information for the identification of WLS" ")
    createCred (map = "oracle.apps.security", key = "SUPERVISOR", user = "SUPERVISOR", password = "welcome1", desc = "ODI Login")
    createCred (map = "oracle.apps.security", key = "weblogic", user = "SUPERVISOR", password = "welcome1", desc = "ODI Login")

    then start the managed server odi_server1

    then odiconsole/em/OracleDiAgent all the work.

  • I have to install studio ODI on Java EE server

    I'm going to install:

    (1) studio ODI on my desk

    (2) agent on a weblogic Server Java EE

    Questions:

    (1) do I need to install an autonomous Agent on my desk

    (2) on Weblogic server that I want to install Java EE agent, do I need to install Studio ODI on that?

    Thanks for help


    No to both questions. ODI Studio is simply a client and not necessary on the Weblogic Server and the ODI Studio comes with a local agent as part of the installation that will allow you to run / test your design objects of time as you wish. You will need to an autonomous agent, or a configured Java EE agent if you want to run load Plans

  • Agent JAVA EE - where should I put third party jdbc database drivers?

    Hello

    I need to move from stand-alone agent to ee java agent deployed on weblogic server. This is my independent agent configuration:
    -jdbc drivers of third-party required for integration with third party database servers: mysql and firebird. When you use autonomous agent, I put the driver files corresponding to the directory of the agent/drivers and it works. Where should I put third-party drivers to make them visible to java ee officer?
    -configuration of the agent of database coneection: non-standard options you need. When you use autonomous agent, I need to change some of the options in the agent/bin/odiparams.sh file:
    ODI_CONNECTION_RETRY_COUNT = 1000
    ODI_CONNECTION_RETRY_DELAY = 7000
    How to install agent java ee in the same way? Is this possible? I need my agent to connect to the repository (oracle database) in the case where when the connection is lost.

    Can you help me?

    You can add the jars to D:\Oracle\Middleware\wlserver_10.3\server\ext
    and then add the path of the driver jar at the entrance WEBLOGIC_CLASSPATH in the location of the commonEnv.bat file in the folder bin (D:\Oracle\Middleware\wlserver_10.3\common\bin).
    Restart the server instance.

    Chantal
    http;//dwteam.in

  • Plan load and Virtual Machine Java

    Hello

    We are thinking using ODI 11 g workload, but I have a question about their behavior.
    Suppose I have a support plan that launches 2 scenarios in parallel with autonomous agent.

    ODI will launch 2 Java Virtual Machine "as if we just run commands 2 ODI (startscen.bat)" or it will use only 1 Virtual Machine?

    In terms of support, both scenarios will be launched with their own session ID. They are independent, with the exception of all the constraints you apply in terms of load. If they are in a parallel step, both scenarios will work in parallel, in different sessions, as if they had been executed individually batch files.

  • The ODI 10 g upgrade to ODI 11 g: upgrade of the auxiliary java error

    Hi gurus,


    I am currently upgrading an installation from 10g to the 11.1.1.6 version.

    I cloned the deposits, then installed the autonomous agent of 11g.
    When I am trying to run the Update Wizard, I get the following error message:

    C:\oracle\product\11.1.1\Oracle_ODI_1\bin > ua.bat
    C:\oracle\product\11.1.1\Oracle_ODI_1\upgrade\temp\jdk_version.log
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version in .class file number
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    in java.net.URLClassLoader.access$ 100 (URLClassLoader.java:56)
    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version in .class file number
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    in java.net.URLClassLoader.access$ 100 (URLClassLoader.java:56)
    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


    Would it be because of the JDK or JRE version? Mine is 1.5.0_18_b02 of Java.
    The operating system is Windows Server 2003.



    Thanks in advance for your help.



    Concerning

    According to the ODI 11 g Certification Matrix (link given below)--> Certification tab for the ODI system

    http://www.Oracle.com/technetwork/middleware/data-integrator/ODI-11gr1certmatrix-163773.xls

    You should use Oracle JDK 1.6.0_29 or higher.

  • Java Classpath options

    My question is about the Java classpath options in a production environment.

    The company that I work wants to start developing Java applications. These applications will not work via a web but autonomous container on a unix machine. We are setting up the environment and don't know about best practices in the industry. Where he specifically addresses classpath. We have about 15 developers and do not know how to set up the environment on the production machine so that:
    (A) the migration process is not too complex (developers do not migrate/implement the production code, they develop and organize it and other employees moving it production).
    (B) there is no danger of getting wrong versions of libraries (for example I write code using some toolkit version 2 and a co-worker uses version 3 of the same Toolbox).

    Here's what we found.
    1 require that all developers to place their Java code in jars executable with an attribute of the CLASS LEADING and the CLASSPATH attribute set. Here, there is no classpath on the production environment, and each developer would be responsible for everything that setting in the jar. A single object to be migrated.
    2. requiring that all developers to write a shell script to accompany their Java code that will set up the CLASSPATH. This adds programs and another object/step of the migration.
    3. just throw all the library JAR files in the class path main JRE on the machine production and classes in a folder/class pointed to by $CLASSPATH. This seems like a bad idea and could be confusing.
    4 require that all developers to use Chargers custom in their programs - classes we do not really understand this method.

    Thanks for any advice on this issue.

    It is 1 OR 2 or 3 or 4? I think.

    4 n ° play with class loaders does not part of normal development. Can cause headaches without end and too complex Java code.
    3 n ° avoid having to play with a global $CLASSPATH. It is recommended that each program uses its own classpath, if necessary.
    2 n ° a little better that complication 3, but with the addition of a running shell script.
    1. Yes.

  • Pipeline raised ORA-06519 function: active autonomous transaction detected

    Hi all

    My name is John and I have a problem I need to share with you the guru and the experts. I created the following function of pipeline under user Oracle ABC:

    CREATE or replace FUNCTION SomeFunction(p_from_date DATE, p_to_date DATE) T_TAB_A RETURN pipelined
    IS
    PRAGMA autonomous_transaction;
    BEGIN
    DELETE FROM temp_rcm;

    INSERT INTO temp_rcm
    SELECT * FROM int.facility fd.
    int. Capacity co
    WHERE co.resource_name = fd.resource_name
    AND co.trade_date = fd.trade_date
    AND co.trade_date BETWEEN p_from_date AND p_to_date;

    COMMIT;

    FOR rec IN (SELECT co.*
    OF temp_rcm co
    o left join int.outage
    WE (o.flag = 'Y')
    AND o.reason_flag = 'F'
    AND o.INTERVAL = co. INTERVAL OF
    AND co.resource_name = o.resource_name)
    ORDER OF co. MEANTIME,
    Co.Name) LOOP
    pipe ROW (T_A (CRE. INTERVAL, rec.trade_date,
    Rec.resource_name, Rec.day_of_week_long, rec.working_day, rec.peak));
    END LOOP;

    RETURN;
    END SomeFunction;


    I could compile and create the function SomeFunction successfully, but when I executed the following command:

    Select * from table (SomeFunction (to_date ('01 / 01/2010 ', to_date('01/01/2010')));)

    I went with the Oracle error: ORA-06519: active autonomous transaction detected and restored

    I searched on the web, such Oracle error occurs when the function has a missing "COMMIT" or "ROLLBACK" command inside an autonomous_transaction. But the fact is that I have already included the "COMMIT"; in the function. I suspected that the error was caused by the paintings that I did against (such as int.facility and int.capacity) were all the views which belonged to another schema called int. Or is it something that miss me in the service? Thank you for your time and your help.

    Kind regards
    John

    This isn't how a ref cursor is used in general. See this thread: {: identifier of the thread = 886365}

    I can't really answer your question without knowing what kind of client you are using (Java, c#, etc.).

    However, the thread should shed a lot of light on the ref Cursor.

  • Generic applications Java runs only within Jdeveloper, not at the command line

    JDeveloper 11gR1PS1

    I created a Java program which is autonomous - to be called via Unix scripting. I just chose Generic Application and adds the scope of Java and XML technology. I also have a POT that is provided by a 3rd party to be used as an API.

    When it is run through Jdeveloper (for example to do a right-click on the java class and choose run), the program works very well.

    When run via command line after the deployment of the application as a JAR, I get the following:
    java -jar myprogram.jar
    Value : 123.. Ok
    Exception in thread "main" java.lang.NoClassDefFoundError: com/customer/api/Auth
            at com.company.posauth.myprogram.main(myprogram.java:69)
    Caused by: java.lang.ClassNotFoundException: com.hyweb.posapi_npg.Auth
            at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
            ... 1 more
    He complains about my line by calling the Auth class, which is part of the JAR provided me by the 3rd party. But he runs the successful when run in Jdeveloper.

    The JAR is included as a dependency when you deploy the project.

    Ideas?

    If you want to include the 3rd pot of party in the jar that you produce then you must go into your deployment profile and create a new type library file group, and then select the JAR file in the contributors section.

  • Changes to the table is not reflected in the Java application

    Hi all!
    I'm under Oracle Developer J 11 g.
    I'm quite new to using Java .sql command execution and so feel my way around.
    I used SQL Worksheet the IDE and create tables in a database.
    I also used this SQL worksheet to fill tables and checked the content as well.
    Then using Java, I wrote a code to issue a Select statement in a table to store the contents of the query in
    Some Arraylists... etc etc...
    In any case, I then ran the program and everything seems to work properly.
    So I ran a sql script to insert several rows in the table.
    When I do a select sql query * command, my new lines are there.
    Then I run the Java program and the new lines don't seem to be there?
    Now, I'm stumped. Am I missing something here?
    Please can someone enlighten me?
    Any help would be welcome.

    Hello

    conn.setAutoCommit();
    

    Sound used when you want to work in a transaction. If a connection is in auto-commit mode, then all the sql stmts will be executed and committed as individual tranasction. Some other sql stmts are grouped in a transaction that must be engaged by a method or a cancellation.
    So, once your transaction is complete, replace the State of autocommit to true.

    or

    try {
    // Connect to Oracle using JDBC driver
    System.out.print("*** -> Connecting to -> " + connectionURL + "\n");
    conn = DriverManager.getConnection(connectionURL,"SYSTEM","PASSWORD");
    System.out.print("*** -> Connected as URL -> " + connectionURL + "\n");
    
    // TURN OFF AutoCommit
    //System.out.print("*** -> Turning Off AutoCommit...\n");
    conn.setAutoCommit(false);
    stmt = conn.createStatement (ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
    
    System.out.print("*** -> Opening ResultsSet...\n");
    results = stmt.executeQuery (sql);
    
    conn.commit();
    
    } catch(SQLException sqel) {
    conn.rollback();
    }
    

    Twinkle

  • Need to install Java command line tool

    I get this error after the installation of the new OS sierra. Java is up to date. How can I fix it?  Thank you.

    The most likely cause is the program that wants to use Java's only request the use of Apple legacy Java 6. That the developers didn't like enough to have use Java the right way, you need to install Apple legacy Java 6 or uninstall the program that wants to use Java - likely produced Adobe or a Facebook video chat program.

    Download Java for OS X 2015-001

    Maybe it's that the program requires a JDK be installed instead the JRE from Java.com. So, if you download the SDK Java Oracle of Oracle's Web site, then you might try that if you have a recent version of Java. However, I don't think I've seen someone declare that as successful as the program who need Java so poorly designed.

  • Error Java Run After downloading the new Sierra

    Java is up to date and I get this error message. A couple of times, I have "updated" restarted. Still happens.

    Hi cjshrad,

    Thank you for contributing to the communities of Apple Support. I see in your message you receive a Java error after upgrade to Sierra on your Mac. I'd be happy to help with this!

    First of all, try to install the Java for OS X package found here:

    Download Java for OS X 2015-001

    The next step, if you still see this error, I recommend that you completely uninstall Java from your Mac by following the steps listed here:

    How to uninstall Java on my Mac?

    Once you're done, use this link to download and install the latest version of Java for your Mac:
    Download Java for your Mac - Apple Support

    Take care!

  • Remove Java and Flash Player?

    I asked here how to install Java and Flash Player, and I think I did, but I'm not sure I have remove 100%. Is there a way I can see if they are deleted?

    For Java, open Termonal paste this back in & hit...

    Java-version

    For Flash...

    http://isflashinstalled.com

Maybe you are looking for