Triggers in the MiddleTier

Hi :)
I'm new to J2EE and have an architectural question for which I haven't found an answer yet.
Most popular DBMSs have triggers to help enforce database integrity. They each have their own language, so I can't easily port
trigger code from one DBMS to the other. Some of them support Java, but I still have to install the triggers, and prepare jar files
independently from the middle tier where the rest of my business logic is; all this hampers easy deployment.
The ideal scenario would be to have triggers in the middle-tier.
What I'm looking for are CMP or JDO implementations supporting them.
I know I can implement this using other techniques, but I find triggers VERY helpful.
If anyone has feedback on this, either triggers implementations, or suggestions as to how they can be replaced, I would greatly appreciate it.
Thanks !
Richard

Yes, but I want my logic to be called just before the Commit takes place on the DBMS (because it encompasses many objects and if I call it from my methods, I may end up calling the same logic many times).
I can post 'reminders' somewhere, somehow, then I could execute my logic only once.
But then I at least have to be able to overload the 'Commit', or be called back by JTA's one (or something like that).
Are there any standard interfaces (JDO, CMP, others) that might offer that functionality ?
Thanks !

Similar Messages

  • Event is not getting triggered in the process chain

    Hi,
    We had a process chain which was triggered by an Event, and it was running fine until few days ago. So I removed the chain from schedule and re-scheduled it again with these details:
    File load: every 2 hrs
    Process chain setting
    Immediate tab: start immediately
    After event: "event name" and "parameter name" and periodic job: ticked
    I activated the chain and scheduled it. But the event is not triggered and the chain does not start. I even tried to trigger the process chain manually in sm64 but the process chain did not start.
    Can someone please tell me steps to automate the event triggering and also any setting that should be taken care off in the info package and the process chain.
    Thanks In advance.
    Ram

    Hello Ram, to start your Process Chain by an event, then you need to maintain the Start process of the process chain. 
    Select "Direct Scheduling".
    In the <b>Change Selections</b>, press <b>After Event</b>.  Put your event name and parameter (if any).  Also click on <b>Periodic job</b>.
    Press Save.  Then Activate and Schedule your process chain.  All your processes should turn green.
    To verify, right-click on the Start process and select <b><u>D</u>isplaying Scheduled Job(s)...</b>.  You should see a job called BI_PROCESS_TRIGGER in a <i>Released</i> status.  You can click on the job and look at the start conditions.
    When you go to trigger the event, use the same event name and parameter (if any) as in the start condition.  Your process chain will then execute.  To insure, use RSPC to view your process chain and press the <b>Logs</b> icon (last one at the top).
    Does this help?

  • How to disable the "turn page" event triggered by the scroll/swipe function?

    The problem is as follows.
    The default behaviour of Acrobat Reader (both stand alone and browser plug-in) is to allow scrolling/swiping with the mouse wheel/trackpad. This is useful when the pdf's page length is greater than the screen's own length, because you can read the pdf with no need to distract your attention from the text to the scrollbar button. However, the same scroll/swipe function turns into a usability problem when the pdf is embedded in a html page and the pdf's page length is smaller than the browser's length. In this case, the scroll/swipe turns the page, distracting your attention from the text to the unintended behaviour of the browser. What happens is that you are so used to scrolling/swiping that you did it unintentionally in the pdf's caption area. You really did not want to turn pages in the pdf. Furthermore, if the pdf takes the whole html page, being a website, the scroll/swipe function flips the website pages in ways that neither the reader nor the writer had ever intended. Hence the question. How to disable, in this case, the "turn page" event triggered by the scroll/swipe function? A JavaScript should do, but the SDK documents did not help so far...
    Message was edited by: 41457173
    Message was edited by: 41457173

    ... or release a patch for the API,
    ... or suggest an alternative route to achieve the intended result.

  • BBP_PO_SEND_XML - Not triggered during the creation of PO

    Hi All,
    We are using SRM 7.0, configuration for sending PO in the form of XML is done as suggested with the method BBP_PO_SEND_XML. The problem is, this BADI is not triggered when we save (even after order) the PO with XML option and the status is displayed as Incorrectly processed. But, when I select the Incorrectly processed output type and click on Repeat Output, the BADI is called and is processed succesfully.
    Any reasons, why the BADI is not triggered during the creation or change of PO and is getting triggered only when we select the option Repeat Output? Please help me in correcting this issue.
    Thanks,
    Phani.

    Logic inside META_PO_SEND was written in user name check. Whereas the method BBP_PO_SEND_XML is triggered with batch user. Due to this reason, custom logic is not triggered.

  • How to do a digital output triggered by the falling edge of a clock?

    Hello !
    I would like to do a digital output (on a given line of a pci 6602 card) triggered by the falling edge of a clock.
    More precisely, a pulse train is generated. I have to output each bit of a variable (first, the LSB ; then, the others bits, until the MSB), each bit being transfered on a falling edge of the pulse train. How could I do that, please ?
    Thank you for helping me.
    Julian.

    see the following link (other forum same subject)
    http://forums.ni.com/ni/board/message?board.id=40&message.id=1634

  • Creating a pop-up in Acrobat X that is triggered when the PDF is opened.

    Hello all,
    I am wanting to create  a pop-up that is triggered when the PDF is opened.
    The problem I am facing is that our customers are filling out the packet , but are not using the purple "Submit" button located at the top of the page to submit the form to us. They are instead printing out the form and faxing it to us, or scanning and emailing the packet, which defeats the whole purpose of it being a fillable, distributed pdf.
    The email invitation that they receive is a bit wordy so I have have pared that down as well. To be honest with the amount of "Read this first" pop ups that we are exposed to daily I think that our customers are simply not reading the instructions properly.
    There was a post here in the forums but the expanation was for Acrobat 7 or 8.
    Any help is appreciated.

    Thank you for the quick response George. I guess a better way communicate what I need to accomplish is "how"
    I went to the toolbar on the right, then "javascript", then "Document Java Scripts". That opened a window that had me name the script, then add it, then put in the scripting (see below). I do not know how to "place it in a document-level JavaScript (outside of a function definition) or in the initial page's Page Open event."
    This is the script I am attempting to use.
    var message = "When you have completed filling out the Tax Organizer, click on the purple "SUBMIT" button at the top of the page. This will automaticall submit your Tax Organizer for you. Be sure to print a copy for your files"
    app.alert(msg,3);
    If you could provide some step by steps that would be super.
    I am wanting this pop-up box to open and the client will have to then click on the "ok" button to make it dissapear so that they can then fill out the PDF.
    The "Submit" button is auto created for me when I choose to distribute the form, I am unaware of any way to move it.
    I feel that my issue is a elementary one, I am currently working through the Adobe Classroom in a Book lessons as all my acrobat skills have been self taught.

  • Search Incremental Crawl is not getting triggered at the scheduled time.

    Hello All,
    Since 1 week i am observing that the incremental crawl is not getting triggered on the scheduled day & time but the next schedule is moving to next day. Let me put down in a detail.
    Content Incremental crawl is scheduled to run daily at 5.00 PM CST. Last 3 days i checked at 5.30 PM CST and found that the incremental crawl is not triggered and the status is Idle. But i noticed that the Next incremental crawl date is moved to next day
    at the same time.
    Can some one help me out how to get out of this issue. Thank You!

    Hi,
    Did you check the crawl logs? Please post here any error message that you come across in Crawl logs.
    Also, does crawl operations are performed when you crawl manually?If yes, have a look at steps below:
    Possible Cause:
    Folder %WinDir%\Tasks is not added with SharePoint Local group WSS_WPG Where Indexer is Running
    Resulution:
    1. Login to the SharePoint Indexer machine with account which has Administrative previlages
    2. Open Command prompt and run the command attrib –s %windir%\tasks.
    %Windir% is the Default installation of Windows
    3. Open Windows Explorer and go to the %Windir%\Tasks folder And open the properties of the Tasks folder
    4. Click the Security tab and Check whether we have WSS_WPG, If it is not there Add the Group with Full Read and Write permissions
    5. Now Open IIS Manager and restrat IIS or at the command prompt Type IISRESET so that the Chages will take place.
    6. From the command prompt Run the command attrib +s %windir%\tasks so that the view goes back to default
    7. Do the above Steps on all the SharePoint servers in the Farm
    Ref: http://blogs.msdn.com/b/vrajas/archive/2012/02/08/moss-2007-schedule-crawls-are-not-starting-automatically.aspx
    Hope it helps!
    Thanks,
    Avni Bhatt
    If this helped you resolve your issue, please mark it Answered

  • Using a PCI-6534 card, how does one write and read from the board simultaneously after being triggered on the StartTrig input ?

    I've copied two NI-developed VI's into a single VI. The first VI is the LV 'Buffered Pattern Input-Trig VI' under examples/daq/digital/653x. Using an external data generator, I send it a pulse on StartTrig, a clock on REQ1 and data on DIOA0. The start pulse is negative going so I set the front panel input to trigger on "falling edge" with clock set to 'external'. This VI is configured as Port 0 and Group 0. Once this VI is triggered I need to then start another VI which is simply the Buffered Pattern Output VI that also ships with LV. This VI is configured on Port 2, Group 1. This VI is used to simply send out a previously d
    efined array of data on DIO C0, C1 and C2.
    So, I receive a Start Trig, then clock in data, and then immediatly want to send out data. My problem is that I can't figure out when my receiving VI gets triggered on the StartTrig input. If I know when the trigger occurs, then I can wire this condition to a case statement and activate the second, or write VI. Without having the Trigger condition be met to enable the output VI, the problem is that it always outputs without even be triggered. So, where or how do I tap to find out when the StartTrig happens ? In other words, how do I know when the receiving VI has received a StartTrig pulse. There's got to be a way to do this, and I need to run in continious mode, so I can keep receiving and sending out data over and over again. Any ideas ? If your answer is to look at the examples, please tell me exact and specific examples, because I have not been able to find any examples directly related to my goal. thanks.
    Kirk

    Nestor-
    I tried your first suggestion of connecting ACK1 to ACK2. But, I get Error 10010 at Digital Buffer Control when I run the VI. I've added an array of 32 ones and zeros to the output VI so that I have some data to write. What's really interesting is when I have a scope probe on ACK1 and ACK2 which are now common, the voltage level is less than 5 volts, around 4.7, but there is something wrong with the signal, a few spikes, I've seen this before, like 2 signals are trying to drive the same output or something. When I remove the connection between ACK1 and ACK2 the signal looks perfect since ACK1 is being driven by my data generator. This leads me to believe that you can't connect ACK1 to ACK2, or atleast you can't do it with the way I have the VI'
    s configured. Also, I have a scope probe monitoring DIOC0 (since I'm writing to Port 2,which is Port C) and I don't see any data coming out, which makes sense since I get the error mentioned above.
    In terms of my configuration, I have 2 VI's on the block diagram. I have Buffered Pattern Input-Trig.VI with the following settings:
    Group: 0
    Device: 1
    Port List: 0
    Buffer Size: 1000
    Clk Soruce: External
    Trigger Type: Start Trigger
    Trigger Condition: Trigger off Falling Edge
    # of pretrigger points: 0
    For the 'writing VI' I copied the Buffered Pattern output-Trig.VI with the following setup:
    Device: 1
    Group: 1
    Port List: 2
    #of updates: 1000
    Clock Source: Internal
    Trigger Condition: Trigger on falling edge
    So, do you have any ideas on what might be wrong ? Just realized that I can attach files, so my VI is attached.
    thanks.
    Kirk
    Attachments:
    input_output_at_the_same_time.vi ‏164 KB

  • Two triggers in the same table and event

    If I created two triggers on the same table and event (before insert), which of them will be triggered first ?...
    The problem from the beginning is that I created the second one as after insert and in the body of the trigger I wrote (:new.xxx:= value) ... then an error (that it should be before insert trigger or update trigger), so I created it as before update ,,, but I have already before update trigger (for primary key)..... and the problem -I think- which of them start first...
    Can make the second one as after insert and make update statement instead of assigning (:new.xxx:= value).....
    Regards

    If I created two triggers on the same table and event
    (before insert), which of them will be triggered
    first ?...As already mentioned, prior to 11g the order of firing is undetermined.
    The problem from the beginning is that I created the
    second one as after insert and in the body of the
    trigger I wrote (:new.xxx:= value) ... then an error
    (that it should be before insert trigger or update
    trigger), so I created it as before update ,,, but I
    have already before update trigger (for primary
    key)..... and the problem -I think- which of them
    start first...If there is a conflict of interest inside the code then you will have to alter your design principle around this to cater for it. Also consider combining the code into a single before insert trigger to prevent any confusion.
    Can make the second one as after insert and make
    update statement instead of assigning (:new.xxx:=
    value).....Attempting to update or query the same table as is causing the trigger to fire will result in a mutating table error. You can't do this.

  • Standard Vendor IDoc CREMDM04 needs to be triggered from the transactions

    The Standard Vendor IDoc CREMDM04 needs to be triggered from the following transactions:
    u2022XK01 (Create Vendor)
    u2022XK02 (Modify Vendor)
    u2022User Exit EXIT_SAPOTM_VEND01 .
    The following are some more details:
    u2022Receiving System: SAP PI
    u2022Sending System: SAP ECC
    u2022Direction: Outbound from SAP ECC.
    How do we achieve it ??
    BR.
    Tan
    Moderator message: please do more research before asking, show what you have done when posting.
    Edited by: Thomas Zloch on Feb 20, 2012

    Hi,
    In Tx. WE42, Select the process code for the corresponding partner and bind your workflow / task inplace of the function module with the process code. Now, this will enable the idoc to get placed in the agents(identified by that workflow)inbox.
    But to design the workflow, you`ll have to use tx. swdd and prior to that get some basic understanding of Business Workflow from SAP Library.
    Hope the info. is helpful and reward points if so.
    Regards

  • Illustrator CS6 constantly crashing on Windows 7 system, triggered by the navigator. Anyone else??

    Hello,
    I have now been experiencing this problem for the past 7 months (since using a PC in my current position on a Windows 7 operating system). It is incredibly frustrating! I had previously used a Mac, and continue to do so at home and do not have this problem.
    Whenever I use the navigation tool in Illustrator CS6, and have done so for a sustained period of time (for example moving across 3+ artboards), Illustrator crashes without warning. I get a message window that says 'Illustrator has encountered a problem and needs to close.' Then when you press OK, it freezes and quite often I have to manually restart the PC by holding the power button down as CS6 is unresponsive in Task Manager, or I have to log out and back in again. I only realised the link with the Navigation tool after this repeatedly happened, up to 4 times a day on average and I kept a log to record what I was doing at that moment. I have only retained my sanity with the help of auto-save. Prior to this I would lose hours of work a day.
    I saw on a similar thread on this forum that said the bug could be triggered by the use of a Wacom tablet (I have an Intuos 3 with the latest drivers) so I tried working with a mouse for 2 weeks and although the problem happened slightly less frequently, it still happened. Therefore I wondered if perhaps the Wacom just increased the speed of the navigator and aggravated the problem. I also read it could be triggered by an Nvidia graphics card, so I installed a Radeon HD6570 but the problem remained.
    Now fast-forward 7 months and I have a whole new system, a brand new PC with 8GB RAM and 3 GHZ processor speed in a last chance attempt to rule out any hardware link. Unfortunately, it has just happened AGAIN. Now I have eliminated any link to hardware, it is clearly a software problem (Namely Windows 7/CS6 incompatibility). A similar problem has also been listed on the Adobe site in which it claimed it would be fixed with an update, but after downloading this the bug is still there.
    Has anyone else experienced this problem? And even though Adobe are aware of it...when can I expect an update that fixes the problem? I can't be the only one. Any advice appreciated. Thanks

    Hello,
    Why did you say nothing has changed? Does that mean it was working but now it's not?
    Do you have a folder called c:\temp? If so rename it to c:\myTemp. If you don't then search for your \Temp folders and delete any XML files, DO NOT DELETE ALL XML files.
    Make sure you are logged in as a local PC administrator, disconnect your network cable, disable your anti-virus and then do a  repair install on Crystal Reports
    Don

  • Triggering of the form FORM USEREXIT_FIELD_MODIFICATION

    Hi All,
    When will this form FORM USEREXIT_FIELD_MODIFICATION will trigger in the user exit 'MV45AFZZ' My requirement is I need to make one field on the screen additional data A Disable based on some condition  for the change transctions VA02, I am writing the code in the form 'FORM USEREXIT_FIELD_MODIFICATION ' but this form is not triggering when I am changing and saving the line items it's triggering at the begining when we are trying to enter into the Ist screen of va02. Can some body will give idea where I have to write my code and what's the exact purpose of the user exit 'USEREXIT_FIELD_MODIFICATION '.
    Thanks&Regards
    Mahesh

    Hi,
    I still do not have my desired solution.
    I can not work with userexit_move_field_to_vbap because this userexit is called at the begin of creating a sales document.
    With Userexit_field_modification I still have the problem that I loose the value in VBAP-KTGRM when I leave the dynpro.
    My coding Inside Userexit_field_modification:
    CASE screen-name.
        WHEN 'VBAP-KTGRM'.
    Set to INPUT on when in Create or Change mode
          IF ( t180-trtyp = charh OR t180-trtyp = charv ).
             screen-input = 1.
          ENDIF.
      ENDCASE.
    These code lines make the field editable but I see no chance to save the entered value of VBAP-KTGRM.
    Thanks again,
    Tobi

  • Overriding the messages that are triggered in the function module

    Hi all,
    Can anybody knows the way to override the messages that is triggered in the Function module.
    Right now we are using a standard function module "SD_CONDITION_VALIDITY_PERIODS" to get validity period of a pricing condition. What happened is we have a missing pricing condition from the master so its checking the table T681 and giving the error. We want to override this condition. If anybody knows a way how we can implement this please let me know.
    Thanks in advance.
    Ved Nayak.

    Did you try going to the message app and clicking on the person name then go to the top and click the load earlier messages button. 

  • User Exits / BADIs triggered during the Material document creation

    Hi Experts,
    Can anybody tell me the User Exits / BADIs /Possibilities that can be triggered during the Material Document Creation which can be used to update the Equipment Master User Statuses.
    Thanks,
    Sangeeta.

    Hey Sangeeta,
      Try these User Exit's
    MGA00001  Material Master (Industry): Checks and Enhancements
    MGA00002  Material Master (Industry): Number Assignment
    MGA00003  Material Master (Industry and Retail): Number Display
    Using Enhancement MGA00001 (Function Exit : EXIT_SAPLMGMU_001 ) you can validate & Change your Material Document Number.
    Badi's
    BADI_EAN_SYSTEMATIC
    BADI_GTIN_VARIANT
    BADI_MAT_F_SPEC_SEL
    BADI_MATERIAL_CHECK
    BADI_MATERIAL_OD
    BADI_MATERIAL_OD
    BADI_MATERIAL_REF
    BADI_MATNR_CHECK_PVS
    BADI_MM_MATNR
    BADI_MM_MATNR
    CDT_CHECK_MATERIAL
    MG_MASS_NEWSEG
    MG_MASS_NEWSEG
    WRF_DISCONT_FACT_E
    Note: This is for transaction code MM01, MM02 & MM03.
    Regards,
    Saravanan M

  • Why is my board triggering on the wrong edge?

    I am using 3 PCI-6110 S Series boards to acquire several channels of analogue data. I have the same trigger signal connected to pin PFI0 of all of these boards which I wish to use to start my acquisition. Although I have configured this trigger to start acquiring on the falling edge, I see that it is sometimes starting on the rising edge - although the majority of the time it does start on the falling edge. It would also appear that when the first card triggers on the 'wrong' edge, the other 2 cards trigger on the correct edge despite the same signal being connected to all. I cannot tell if the other 2 cards ever trigger on the wrong edge when the first one doesn't.
    Does anyone have any suggestions as to why this might happen? Optimally I would like the acquisition to start on the correct edge only but if all my cards would at least start on the same edge then I could get round that. To this means I am looking at perhaps using a RTSI cable between the cards. Should this do the trick?
    The configuration I am using (for all 3 cards) is as follows:
    siStatus = DAQ_Config(Device, 1, 0);
    //although I believe that DAQ_Config() above actually calls this next line I have it in anyway:
    siStatus = Select_Signal(Device, ND_IN_START_TRIGGER, ND_PFI_0, ND_HIGH_TO_LOW);
    siStatus =  AI_Change_Parameter(Device, ND_PFI_0, ND_AI_COUPLING, ND_DC);
    siStatus = SCAN_Setup(Device, m_siNumberOfChannels, m_pasiChannels, m_pasiGains);
    siStatus = SCAN_Start(Device,...);
    One thing I was uncertain about was whether to use 'ND_IN_START_TRIGGER' or 'ND_IN_SCAN_START' in 'Select_Signal()' as I am unsure of the difference. But as my card didn't seem to trigger at all when I used 'ND_IN_SCAN_START' I removed it! I have also tried adding the line:
    siStatus = Configure_HW_Analog_Trigger(Device, ND_ON, liLowLevel, liHighLevel, ND_HIGH_HYSTERESIS, ND_PFI_0);
    where I had liLowLevel = 138 and liHighLevel = 154 to represent 0.8V and 2V respectively but my card did not at all. (It looked to me like perhaps there is an error in the NIDAQ help for Configure_HW_Analog_Trigger() in the calculation of these levels for a 12 bit bipolar device which uses:
    level = (voltage/5 +1) * 128
    so I used
    level = (voltage/10 +1) * 128
    - is this correct?)
    I used this in case my trigger signal had some noise spikes on the rising edge that were being mistaken for falling edges although this looks unlikely.
    I am desperate to get this fixed as am on a tight schedule so would appreciate any suggestions.

    a shame that Apple Support Communities didnt answer to you yet.
    I guess you CANT make a 16:9 ratio picture just because the software does not make you do so.

Maybe you are looking for