Triggers and TopLink

Hello guys,
Is there any problem in use triggers with JPA? does it affects the JPA Transactions?
Please !! Help me !! , I can't sleep with this problem :)
Thanks in advance

Triggers on tables you're updating are problematic in general as they may modify data as it is written. Fortunately in TopLink you can configure a "returning policy" to refresh data after it is written. When using the Oracle Database, TopLink will add a RETURNING clause to inserts and updates. This means updates are returned to TopLink and applied to your objects in a single database round trip. On other databases a SELECT is generated to obtain the modified values. There's a Returning Policy How-To on OTN that provides more details.
In EclipseLink JPA, the returning policy can be configured through annotations.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Function and triggers and procedures

    sorry to asking this question,
    In oracle. we use the function and triggers and procedure.
    for eg:
    if we wrote an trigger for a table. it fires at a time manipulating table. (database contains table contains datas and database also contains triggers likewise function,procedure).
    but my questions?: is
    In my database I kept only tables. no triggers,no function,no procedures. and
    i dont want to kept this triggers, function, procedures in database  Instead of i want to kept this triggers, function, procedures in business logic layers(middle tier)
    is it possible? .
    if yes means, how to write or where to write? please help me, or else send the guidance documents or blog releated to it.

    Subu123,
    the +1 related to Would be great if you can take step back and see the implementation from another angle. First see why do you need DB trigger/function etc.Then check whether it is possible to implement the functionality using ADF BC + feasibility study between 2 approaches(I didn't mean to invoke DB objects from business components, instead checking the feasibility of implement the same functionality in your EntityObj/ViewObj/Service calls )Before making a decision for or against holding fuctions, triggers and procedures in the DB, you have to get the whole picture.
    Think about a trigger outside the DB. What could this be and why or for what is it used?
    All the answers are pointing to 'lets keep them in the DB'. Now there are situation where you don't have a DB or are not allows to use it. Still there can be triggers, only they are implemented in a different way.
    The same can be said for procedures and functions.
    So you have to think about the whole problem and how each sub problem you have to solve work together to resolve the whole problem.
    I'm personally tend to keep the business logic the the DB if the business logic is already there (e.g. I have to migrate an old forms app).
    If I design a new app I tend to keep the logic in java. Only sequences (for generating ids) and some other stuff which is purely db related like cleaning up tables I keep in the DB.
    Timo

  • Problem using TAPI triggers and merge statement

    Hi,
    I use Designer tapi triggers on a table. When I try to execute a merge statement, I get the following error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    Is there a restriction when using TAPI triggers and merge statements that anyone is aware of?

    No restrictions on MERGE commands that I know of. I have, however, seen the TAPI give inexplicable ORA-06502 errors. It would help to know what line in which procedure or trigger gave the error. That information should have been in the error stack.

  • Why ADF Business Components and TopLink

    Hi All,
    Why are there two types of components in Businses Tier? (ADF Business Components and TopLink). Even through there are other types, I can visualize the use of other components but ADF Business Components & TopLink seems to serve the same requirement.
    Can some one provide me information on what is the difference between these two and when to use which one?

    ADF Business Components (aka BC4J) are different from Toplink from approach point of view. Basically if you are more comfortable with SQL and want fine grain control over what and how SQL are run against the database, BC4J is the way to go, because, it's you who write the queries(in ViewObjects)
    If you are from more of java backgroup and can visualize things in term of Object and relationships among objects, so on and so forth then Toplink would be the right choice.
    Pls see the post by Shay in his blog:
    http://blogs.oracle.com/shay/2006/03/10
    regards - rutwik

  • How to use analog Triggering and External clock scan

    Hi, there. I want to measure the engine cylinder pressure with an PXI6070-E card and BEI encoder. I have tried using Cont Acq&Graph ExtScanClk D-Trig.vi and Cont Acq&Graph ExtScanClk Soft A-Trig.vi , but they don't work. What I did was to connect a 50HZ pulse to PFI0 (analog triggering, I changed the code from digital triggering to analog triggering), and a 100K pulse to PFI7 (startscan), and an 50 HZ analog signal to ACH0. But the code always says: timeout. If I use internal clock, it works fine. Could you please give me some help? THANKS A LOT!

    Hey Wyuan,
    I tested the Cont Acq&Graph ExtScanClk Soft A-Trig.vi and it worked fine. However, the Cont Acq&Graph ExtScanClk D-Trig.vi has a small error in its logic that will prevent the data from ever being displayed to the graph. In order to run the examples you need to connect a trigger to pin 11 and a scan clock to pin 38. A 10kHz square wave would be fine for the clock signal and just a single pulse would work for the digital trigger.
    One additional think to keep in mind is the grounding. You might need to connect you ground from your signals to a DGND pin. I am including the two programs that I used for the test.
    I hope this helps,
    Joshua
    Attachments:
    Cont_Acq&Graph_ExtScanClk_D-Trig.vi ‏121 KB
    Cont_Acq&Graph_ExtScanClk_Soft_A-Trig.vi ‏153 KB

  • Sql query to  know the number of triggers and cursors present in a schema?

    friends,is there any way to know the number of triggers and cursors preseent in a schema.
    thanks in advance..

    what do you mean by triggers in a schema? is it the triggers owned by that schema? or the triggers applied on tables owned by that schema? remember you may own triggers applied on the tables belong to other schemas. Anyways, all this information can be extracted from oracle dictionary using a combination of all_triggers and all_tables.
    As far as cursors, please elaborate. Do you mean cursors declared in PL/SQL blocks?

  • Urgently!! Deploy project using Struts and Toplink

    Hello. I want to make a deploy of a project in wich I'm using Struts and Toplink technologies.
    I'm using JDeveloper 10g for Windows and my production server is a SUN V880 with Soloaris 8 and I make it ok, but when I run it since a PC in the intranet the following errors appears (obviously those don't appear before):
    java.lang.NullPointerException     at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309)     at jsp.login._jspService(_login.java:50)     [SRC:/jsp/login.jsp:5]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:567)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)     at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:536)
    Thank you so much for help.

    NOO!! :( I don't install any libraries in the server, but in the WAR file of the application, in the lib folder, there was the jars corresponding. I thought that those libraries, in the WAR file, was "local" to the project, anyway, the Struts and Toplink libraries must be global at server level, 'cause I will use it sure once agian, and now I'm trying to install those in the server...
    Thank you so much!!

  • Triggering and reading on two HP/Agilent 34401A DMMs at same time

    Hi folks,
    I'm VERY new to LabVIEW and need some help with a measurement.  I'm using LV 8.2 with all equipment on GPIB.  I have two 34401A multimeters, triggered externally using an HP 33120A function generator.   I've downloaded the example vi's and drivers and everything works fine.  My problem is with the speed of the triggering and the synchronization between the two multimeters on the same trigger.  I've read the manual and for this multimeter, it claims it can be triggered and read over GPIB at 1kHz (display off, auto range off, delay= 0, 4.5 digits).  I'm finding it is nowhere near this speed.  The fastest I have successfully triggered and recorded the data was at 100 Hz, anything higher and it no longer stays in sync with the trigger (i.e. for 200 measurements at 100 Hz, I'm getting all 200 measurements, but over 3-5 seconds).  The trigger speed is the first problem.  The second problem is getting the two meters to take a reading at the same time.  One meter always lags the other (or vice versa) by 1 to 3 readings.  My goal is to continuously (for about 60 seconds) read both multimeters as fast as possible and at the same time (250-500 Hz would be fantastic) and write it to a file.  Can anyone give me some advice on this?  Is a software trigger the way to go?  Is there some limitation with GPIB that it cannot read/write to two devices this fast? 
    Thanks!
    P.S. I've been experimenting mostly with the example code provided by NI and a .vi posted in this forum thread (http://sine.ni.com/niforum/niforumforumDU=http://forums.ni.com/ni/board/messageboard.id=170&message....) hp34401a_-_testing.vi from Kunal.  If anyone could share some other example vi's it would be very helpful!

    Hi plasma420,
    I should have read your post more carefully - was thinking it was a 1 sec acquisition, not 1 minute!
    Getting your LabVIEW app to reliably respond to a measurement (detect/read) every 2 to 4 ms is going to be tough - especially if in a multi-tasking OS environment.  On a 2GHz box running a normal Windows XP or 2K install,  I suspect you could see an occasional "hiccup" even at 100Hz.  A bit of searching the forum turned up this old-but-still-valuable (even entertaining) post related to improving determinism of DAQ applications on a PC.
    Observation: The listed max measurement-rate of the 34401 (1000Hz) may assume the GPIB-bus is dedicated to one instrument - the requirement to read from two instruments sequentially, may necessarily increase time spent servicing each trigger - decreasing maximum theoretical throughput.
    The first rule for "high-speed" multi-sample DAQ - especially under Windows - is to make it a hardware task instead of a software loop;  the 34401 doesn't seem well suited here.  I hate to suggest this, but... have you considered purchasing one of NIs multi-channel DAQ devices?  With a $360 PCI 6010 + cable and break-out box, you could have one of the LabVIEW DAQ examples running in ~ 30 min.  The 6010 was the cheapest 16-bit board I could find, ask your sales-rep for other alternatives if you go this route...
    Cheers!
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • Trigger, triggers and more triggers

    I've been given theenviable task of reviewing the triggers on a legacy application, as an example a typical table will have between 1 and 10 before insert triggers and I've been asked to validate the logic in the triggers.
    Does anyone know if there are any tools available to help with this, so far having looked at the first table (I was asked to loko at this specifically because someone wants to add yet another trigger) I'm starting to lose the will to live, 4 of the triggers currently in place alter similar fields makeing the results indeterminate. I have a nasty feeling the only way to be certain is to cross check every trigger and compile some kind of cross reference I'd really like some kind of toolset to make this easier.
    So far my analysis is the logic is horribly broken and really the whole shambles should be ripped out an re-wrtten properly this time, preferably fixing the problems in the front end rather than trying to bandage the data using triggers..

    You may have to look into dba_triggers and dba_dependenices too see how may triggers and if all depned on same object,
    This is why Tom kyte recommands using inline code instead of triggers.
    Good luck,

  • WL6.1 and Toplink 3.6.1

    I am having problems with connections not closing, we have a connection pool
    setup to our Sybase ASE 12.0 database using the jconnect driver.
    The connection pool maxes out at 50 connections but after those 50
    connections are gone, requests fail...
    Any Ideas?

    Hello,
    I am having same problem with weblogic6.1sp3 and toplink 903.
    I have one connection pool 'OraclePool'.
    I have two data sources added and refereing to that pool.
    My toplink.xml looks like this.
    <login>
    <datasource>oracleDataSource</datasource>
    <non-jts-datasource>oracleNonJTSDataSource</non-jts-datasource>
    </login>
    I have max capacity of 60 to that pool.
    When i run sql queries simultaneously server works ok, it uses all connections efficiently.
    But when i use update method using toplink, connections max out.
    And it says 'No connections available in the pool'.
    How can we find out if toplink closes connections efficiently
    after each transaction. Please let me know
    what is wrong with my setup.
    Thanks
    George

  • Can be toplink-essentials.jar and toplink-essentials-agent.jar shared ?

    I have 2 apps, A and B, toplink-essentials.jar and toplink-essentials-agent.jar are not in their war /lib directory. It is in /common/lib (Tomcat 5.5) or /toplink/jlib (OC4J 10.1.3.2.0).
    First I deploy and run A - it works, then I deploy and run B - it fails with exception: No Persistence provider for EntityManager named ...
    When I do it in opposite sequence, B works ok, A fails.
    When I add toplink-essentials.jar and toplink-essentials-agent.jar into war /lib, both works OK, but only on Tomcat. On OC4J not. Itried to add orion-web.xml
    <orion-web-app>
    <web-app-class-loader search-local-classes-first="true"/>
    </orion-web-app>
    but without success. Second application still failed.
    Can be toplink jars shared between applications ?
    Tested with build 41
    Lumir

    Note: The agent JAR is only needed when starting a
    client outside the container.Yes, I kow it - but I am confused, that OC4J /toplink/jlib contain agent, and tutorial at
    http://www.oracle.com/technology/products/ias/toplink/jpa/examples/jsf-jpa-example.html#CHDDIFII
    also say: Add toplink-essentials.jar and toplink-essentials-agent.jar to <EXAMPLE_HOME>\lib.
    Is there any more information in the stack trace that
    might help figure out why the second persistence unit
    cannot be initialized?javax.persistence.PersistenceException: No Persistence provider for EntityManager named xxx
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
    Are you setting up any TopLink session configuration
    properties in your persistence unit (i.e.
    toplink.session-name)?No. I have only session customizer, that does following in customize()
    JNDIConnector connector = (JNDIConnector) session.getLogin().getConnector();
    connector.setLookupType(JNDIConnector.STRING_LOOKUP);          
    session.getLogin().setTableQualifier(schema);
    Bye,
    Lumir

  • Time bound policy :: CPSC Server down :: Re-triggering and Notification

    I have some Service Requests which are triggered by Time bound policy that execute, say for eg; Power Up some servers. But during a scenario of CPSC server being down during the time of Time bound Service request triggering, none of the requests are triggered  and also after the CPSC server is up again after few minutes past the triggering time. Is there a way to get notified if a Time bound policy is not triggered, like receiving an email? 
    Please let me know if there is any possible way to get notified during failure of time bound policy request triggering.
    Thanks,
    Anish

    Hi,
    According to event log, Winlogon process takes a long time to handle logoff event. That's to say winlogon process is waiting for response to logoff.  
    According to your description after, this problem is most probably caused by Avecto. You can try to disable or uninstall it temporarily for test.
    To make further troubleshoot with this problem, you can try to use WPT (Windows Performance Tool) to make troubleshoot.
    http://blogs.technet.com/b/askpfeplat/archive/2013/03/22/troubleshooting-windows-performance-issues-using-the-windows-performance-recorder.aspx
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Comparision bw BC and TopLink business service

    Hi Experts,
    I am new to JDev. It appears to me that developing applications with BC in the back end is easier.
    Is there any disadvantage of using AppModule as Data Control as compared to Toplink. ?
    Can we use multiple types of Business Services in the same applications. eg AppMod and TopLink just in case.?

    You are correct in your observation that ADF BC is easier to develop with since it offers more out-of-the-box declarative features.
    There are also some things that TopLink does better though.
    For example you can more easily map an OO designed set of object to an existing database (meet in the middle scenario).
    Another thing is that with TopLink you are using java classes that don't need to extend any interface (POJO).
    While ADF BC wizards are only available in JDev, TopLink has it's own stand alone tool - which means it is a bit easier to use if you are not using JDeveloper as your tool.
    At the end of the day the big difference though is the "way of thinking" - see this blog entry:
    http://blogs.oracle.com/shay/2006/03/10
    And the great thing is that you can have both used in the same project :-)

  • Fork : triggering and terminating event ?

    Hi Experts,
    I am a begginer in  Workflow ..
    I just want to know how Fork can be used for paralled processing with triggering and  terminating event.
    It would be appreciated if provided with some scenarion in detailed steps.
    Thanks in advance.
    Ganesh..

    Mike,
    It would be HELPFUL for me if i get my problem solved as earlier so i can concentrate on other my commited topics..thats why expecting info., from the experts.
    Anyway , you  triggered me to read SAP help..thanks for the indirect motivation..
    Let me start reading the SAP help information!!!
    Thanks .
    Ganesh

  • JDeveloper and Toplink

    I am having problem using jdev and toplink. The toplink xml file ([projectname].xml) in the src/meta-inf directory is no longer being updated from the changes made in the class descriptors and toplink mapping file (mwp).
    How do i fix this ? If not all the changes I made in Jdev are not translated into the toplink xml and when deployment I am encountering errors.
    j.

    You should probably ask this on the TopLink forum - but basically you need to either be working on TopLink from inside JDeveloper or from the mapping workbench - you can't work on a project from both at the same time.

Maybe you are looking for