How to start and finish a transaction using EJB 3.0 in JDeveloper

Hello everybody!
Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
Any help will be appreciate.

I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
Does anybody can help?

Similar Messages

  • How to Starting and Stopping OC4J Server using Ant

    How to Starting and Stopping OC4J Server using Ant
    In the ant task definitions for ant-oracle-classes.jar (see antlib.xml) there are two tasks called
         name="restartServer" classname="oracle.ant.taskdefs.deploy.JSR88StartServer"
         name="shutdownServer" classname="oracle.ant.taskdefs.deploy.JSR88ShutdownServer"
    I thought that these would shutdown and start the OC4J server. I guessed the parameters as – (Does anyone know where 50 ant targets are documented?)
    <oracle:restartServer
    userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    <oracle:shutdownServer
         userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    This, however does not start and stop the SOA suite. To do that I've hacked this solution together -
    <path id="oc4j.console">
         <pathelement location="${oracle.home}/config"/>
         <pathelement location="${oracle.home}/jlib/startupconsole.jar"/>
         <pathelement location="${oracle.home}/opmn/lib/optic.jar"/>
         <pathelement location="${oracle.home}/lib/xmlparserv2.jar"/>
    </path>
    <target name="stop" description="stop oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="stop"/>
         </java>
    </target>
    <target name="start" description="restart oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="start"/>
         </java>
    </target>
    This sort of works – except when the SOA suite doesn't stop cleanly – and needs user interaction to press a Close button. This isn't very useful when doing a continous integration build and deploy.
    So, does anyone have any suggestions or alternative methods to do this?
    - frank

    Actually if the server throws exceptions when it stops (which it always has since we applied patch 10.1.3.3) this technique will pause until a user responds to pop-up ... So a better way (I think) is -
    <target name="start" description="start oc4j server" depends="init">
    <java classname="oracle.appserver.startupconsole.view.Runner">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="start"/>
    </java>
    </target>
    <target name="stop" description="stop oc4j server" depends="init">
    <echo message="We expect OC4J *NOT* to stop cleanly, so we will timeout after 3 minutes ..."/>
    <java classname="oracle.appserver.startupconsole.view.Runner" fork="true" timeout="180000">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="stop"/>
    </java>
    </target>
    <target name="restart" description="restart oc4j server">
    <antcall target="stop"/>
    <!-- wait for server to quieten down -->
    <waitfor maxwait="2" maxwaitunit="minute">
    <not><http url="http://${oc4j.http.hostname}:${oc4j.http.port}"/></not>
    </waitfor>
    <antcall target="start"/>
    </target>

  • NI PCI 6225: How to start and stop an acquisition using triggers

    Hi,
    Hi already spent two days reading the previous post on start/stop trigger and end up with just a complet breakdown....
    I'm using a NI PCI 6225 for a project on brain activity.
    I want to start the aquisition of 10 channels at 1Khz on a first trigger (i.e. portline 0) and stop it on a second trigger (i.e. portline 1). The duration of the recording should not exceed 5min.
    Any help will really be apreciated as well as some explanations. I'm not an expert but I do can understand if I'm being explained...slowly. I hope this post will not contribute additionally to the/my confusion on this topic....
    Thanks for your attention and help,
    OD

    Hi,
    Unfortunately, it is not possible to stop the acquisition with a second trigger (just start the task). There are some approaches to what you need, but not exactly the same. Please take a look to the next example.
    http://zone.ni.com/devzone/cda/epd/p/id/5028
    I think the only way to perform what you need will be by software and with all the consideration about timing that you should already know.
    Regards,
    Richard.

  • How to start AND end a loop using a Boolean Button set to "Switch When Released" operation

    I have a Boolean button set to "Switch When Released" operation. When I press this button (now it's in the On state) I want to run a loop that does something continupously (for now, let's say it displays a simulated sine wave) until I press the button again (now the button is in the Off state) in which case, I want to end the loop. I am wiring my button to the loop condition that's set to "Continue if true" and have a "Wait Until Next ms Multiple" of 200 ms (I tried up to 500 ms). When I run the VI and press the button the first time, I see the sine wave displayed. But when I press the button again, nothing happens. It looks like it does not respond to the user interface. What's happening. What am I doing wrong? I'm using an Event Handler design pattern. I've also tried the Producer/Consumer (Events) design pattern. But I don't imagine the particular design pattern should make a difference. I've attached my code. Thanx.
    Fataneh
    Attachments:
    My_Event_Handler.vi ‏107 KB

    A simple solution would be to harness the timeout event, where you would put your data simulation. No need for parallel loops and local variables.
    The event timeout is starts out as  -1 (infinite) but pressing the start/stop button toggles between a 200ms and an infinite timout whenever it is pressed. Since the evet structure always runs, all other events (e.g. stop) are also serviced.
    Please ask if anything is not clear... Good luck!
    Message Edited by altenbach on 07-13-2005 04:20 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    My_Event_HandlerMOD_CA.vi ‏116 KB

  • How to start and finish a 16:9 project?

    Hi,
    I got this movie, what was shot on a 16:9 camera. I did import it to FCE2 and edit like normally i do ( i did not change any settings )
    After that i did import it to IDvd. I'm using a 16:3 theme. And the problem is:
    When I preview the theme is ok on a 16:3 preview window, but if i play the movie it's play on a square ( 4:3 ) I still have a black strip on the top and botton of my movie. And a have a 4:3 aspect on a 16:9 screen ( like two strips on both sides)
    What i did wrong? Is there any way to not lost what i did edit?
    Thanks you all.

    The material needs to be correctly defined as anamorphic. That has to be done first. But that doesn't affect the material that's in the timeline. From your description it sounds as if the first sequence you edited was wrong, not in the widescreen format, and the material edited into was not properly defined. Basically you now have a mess.
    The material in the incorrect edited sequence needs to be copied into a correct widescreen sequence. Unfortunately that's not enough. The material that's now been edited into the correct sequence itself needs to be fixed by fixing the aspect ratio. Look at at one of the clips in the timeline and check it in the viewer. It's aspect ratio is probably distorted and needs to be fixed.

  • I am having data i want to measure pulse width without using hardware and tell me how to start and stop soft timer using labview

    soft pulse width measurement

    If you are creating a pulse in software somehow, then you can use Pulse Measurements.vi that's on the Analyze>Waveform Measurements palette. This will require that the input is of the waveform data type with signal and timing information. There's several timing functions on the time & Dialog palette that you could probably use. Check out Tick Count and Elapsed Time. If you could provide more details on what exactly you need to do, we could provide more help.

  • I entered a new calendar event at I cloud on my laptop.  The enent showed up on my I Phone  4S but, the start and finish times on the entry in I cloud was different than the times shown on the I phone calendar.  How do I sync the time in my I Phone with

    I entered a new calender event using I cloud on my laptop. The enent transfered to my i Phone 5 S but, the start and finish times shown st i cloud on the laptop are different than the times shown on the i phone.  How do I sync the times on the i Phone with the times shown on the laptop i cloud calender?

    Turn off time zone support on the phone.

  • Timeline Start and Finish Dates - how to not display finish dates for tasks not added to timeline

    I have a project, Project 1, with start date 1 Jan 2014 and finish date 31 Dec 2014.  When I switch to timeline view, the timeline spans this period. I now want to create a second view for a sub project within Project 1, called Project 1A.  It
    starts 1 June 2014 and finishes 31 August. I only want to see Project 1A's tasks and time span on this second custom timeline view. I create the new view, add the tasks from Project 1A to the timeline, and save the view as CustomView1A. My problem: CustomView1A
    shows the tasks for Project 1A, but also shows the dead space between 1 Jan 2014 and 1 June 2014, as well as the dead space between 31 August and 31 December.
    I dont want to see the dead space. I want CustomView 1A's timeline to start and finish on Project 1A's start and finish dates.
    How do I adjust CustomView 1A's timeline borders on the left and right to exclude the dead space?
    Hanneliese Fourie

    Dear Sir,
    I checked in CO41 and it allows me to convert planned order to production order and not have any provision to re-scheduling the planned order . Any function to reschedule planned order to future dates ( whose start dates and finish dates are in past ) ?
    Thanks,
    SL

  • How to be more specific with start and finish times in microsoft project

    I am trying to schedule down to the hour with the start and finish information. Is that possible? 

    schedhelp,
    a) yopu can set the "time" for either Start Date or "finish" date, but not both. Project caluclates one or the other when you supply one value.
    b)  Yes, you can definitely schedule down to an hour, however manually typing in the start or finish times will create constraints for the schedule and you are really not using Project for what it is supposed to do (Dynamic Scheudling).
    c) If you are just using project Online, in the Schedule PDP, navigate to Options tab, and select Time with Date, to see the times attached to each of the dates, and modify them
    d) if you are using project Pro, go to File >> Options >> General >> date format and select a format that shows time along with date, to see the times attached to each of the dates, and modify them
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • AR - How to Complete and Incomplete a Transaction

    Hi,
    We have a requirement, where after a transaction is created by AutoInvoice, we want to make the Transaction Incomplete, so that it cannot be posted to GL. Send the Transaction for some approval and once approval is obtained, make the Transaction complete, so that the normal Transaction process can continue.
    We could not find any API to make a Transaction Complete or Incomplete. Can somebody suggest how to achieve this?
    Thanks.
    Prabhat

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • How to Start process in ProcessChain Without using Repeat option?

    How to Start process in ProcessChain Without using Repeat option?

    Se16 -- table:RSPCPROCESSLOG - click on display entries.
    Entet the variant, instance start date (this info you can get from the "display message" of PC.
    Now execute to display the table entries of RSPCPROCESSLOG.
    Next goto SE37 transaction --enter RSPC_PROCESS_FINISH
    Take the entries from the above table to set the input parameters of the FM.
    I_logid = log_id(from above table)
    I_type = type(from above table)
    i_variant = varaint (from above table)
    i_instance = (from above table)
    Click on F8(EXECUTE)
    now the actual process is set to gree and the process chain will be triggered (rest of the PC with out repeating the step from where is was red).

  • Planning Profile Start and Finish Dates (Project systems)

    Hi Friends,
    I need a help from you in regard to Start and Finish dates of Planning Profile dates.
    For transactions cmp3 and cmp9, the start date should be the current date, and Finish date should be End of the current year for the selected profiles. I had done the necessary configuration for profiles in spro and tried. I could make the starting date appear as current date, but the year is increasing the next day, which i do not want.
    Can anyone suggest how to tackle this problem. Can we get the soln, by any non standard method.
    I appreaciate your valuable views.
    Regards,
    VENKAT

    The fourth parameter of your start condition is probably incorrect. When your event is not in the queue, the virtual attribute doesn't bind the webservice to the agent determination subworkflow, which probably causes the third instance of the org management object to fail, resulting in a knock on effect of the workflow inserting an incorrect planning date.
    Alternatively, might I gently suggest posting your question in a PS forum, we mostly deal with workflow and BPM-related issues here.
    Cheers,
    Mike

  • 2LIS_04_P_MATNR Delta - Actual Start and Finish Dates

    My company is experiencing a problem with retrieving the actual start and finish dates and times from the 2LIS_04_P_MATNR data source with delta extraction. The R/3 source system is version 4.6C. The BI system is version 7.0. Specifically, the data source fields GETRI, GEUZI (finish), GSTRI, GSUZI (start) are sometimes never populated with data. These fields are often blank in the production data extracted. It was observed that the actual delivery date for the order (posting date of goods receipt from process order) was often an earlier date than the GETRI date. This scenario was tried in test systems, and it was found that if the final goods receipt for the process order was posted before the end of the last phase was confirmed, the actual finish date and time fields were not transferred to BI from R/3. In fact, it was noted that a new record was not created in the 2LIS_04_P_MATNR delta queue when the end of the last phase was confirmed. Regarding the actual start data, this is missing if a goods receipt from the process order is posted before the start of the first phase is confirmed.
    Has anyone else experienced this problem? How was it resolved?
    SAP Notes have been searched regarding this problem, and in fact, a customer message has been opened with SAP for this problem. However, we thought we would try asking the community as well, to see if any other users have experienced this, and how the problem was resolved. We also understand that it may be an unusual practice to post a goods receipt from the process order before the end of the last phase is confirmed. In a more general sense, has anyone else experienced that some of the data source fields are never populated if the R/3 information is entered after the posting of the final goods receipt against the process order? Our testing indicated that no more delta records are created for the 2LIS_04_P_MATNR data source after the final goods receipt was posted.
    Thank you,
    Chris Sopek

    Hello,
    we are experiencing your same problem! The only difference to your scenario is that wer are currently operating on SAP ECC 6.0.
    Did you receive any answer from SAP?
    We opened a request for the same topic.
    Thanks

  • How to Start and Stop Processes?

    How to Start and Stop Processes?
    Im trying to create a program which allows me to Start and Stop (and Restart) GameServers. I will then expand on this so i can start and stop them through a web applet with build in useraccounts.
    Currently the way we do this is to log into the server using a RemoteAssistance. Which is not very safe as the users have the abbility to do anything on the server and potentially corrupt it.
    Below is my code for how i start the servers. But i dont know how i would stop the process.
                    private void startServers()
                   for(GameServer gs : servers)
                        int ID = Integer.parseInt(gs.getID());
                        if(isChecked(ID))
                             try
                                  String cmd[] = gs.getStartString();
                                  Runtime.getRuntime().exec(cmd);
                                  int sleepPeriod = Integer.parseInt(sleepField.getText());
                                  Thread.sleep(sleepPeriod*100);     
                             catch(Exception e)
                             System.out.println(e);
                   }//end of iterator
                   JOptionPane.showMessageDialog(null,"All Selected Servers Have been started.","Servers Started",2);     
         }//end of startserversAnyhelp would be great thanks.

    Using the process class would give you a nicer API, but using destroy isn't a nice way to shutdown a process. Its like killing the process with your task manager. You should make a connection in some way with the game server and tell it to shutdown in stead (gracefull termination).

  • How to Start and Stop the SAP System

    Hi,
    I have installed "Sneak Preview"; Searched for start and stop scripts but there are more than one script which has named start.bat and stop.bat. Moreover, I searched the documents which comes with Sneak Preview but could find useful instruction there either.
    Question: Could you please point me to the documentation where it explains the starting and stopping SAP, for Sneak Preview?
    Thanks in advance
    Jawad Kakar

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

Maybe you are looking for

  • Performance Issue: Wait event "log file sync" and "Execute to Parse %"

    In one of our test environments users are complaining about slow response. In statspack report folowing are the top-5 wait events Event Waits Time (cs) Wt Time log file parallel write 1,046 988 37.71 log file sync 775 774 29.54 db file scattered read

  • Is it possible to install a HDD from a 2012 Mac Mini into my 2010 MBP?

    I'm thinking of upgrading the hard drive in my 2010 Macbook Pro and I had the idea that instead of this I could upgrade the hard drive in my late 2012 Mac Mini and use the original Mac Mini drive in my MBP. Is this doable? Would there be any issues w

  • Video doesn't play on internet

    Hey Good People,   I have been scratching my head trying to figure out why this Flash video doesn't play.  I checked to make sure it is in the correct format. I've tried FLV and H.264 neither of which plays.  The custom play button appears and the al

  • Is Front Row multi Region?

    I have just got Front Row for my PowerBook and put one of my movie DVD's in and front row played it without asking me what region I would like to choose, As I have lived in the US, the UK and Australia I have DVD's from 3 different regions which is w

  • Vendor posted checks configuration

    hi, can any bodey help me out in doing config settings for vendor post dated checks issuing with regards, jaya prakash