> -----Original Message-----
> From: Tillin, Dan [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 16, 2003 5:58 PM
> To: Struts Users Mailing List
> Cc: NYIMI Jose (BMB)
> Subject: RE: [OT] EJB LIKE A TRIGGER
> 
> 
> How about using JMS and message driven beans (MDB)? If your 
> trigger process doesn't need to be part of the original 
> transaction you could put a message on a JMS queue from your

Putting a JMS means for me asking the systemA to do it,
so changing the functionality of that system.
And as i said the requirement do not allow me to do that.


> main business process (presumably the session bean or entity 
> bean). The MDB will then be sent the message by the container 
> and do the synch in a separate process. 
> You'll have to decide whether the MDB should be given all the 
> info to insert/update or should read from the first DB and 
> then write to the second DB.
> 
> This kind of stuff is what JMS and MDBs are made for!
> 
> However, you mention wanting to do this every x seconds. Java 
> 1.3 + provides a timer service (which will be available for 

The x senconds stuff is not mandatory. I can do something else if there is a way.


> EJBs in EJB2.1 - currently at final draft v2) 
> so that you can periodically execute an process. So if you 
> need to batch this stuff up, you could write a Java class 
> implementing the timer service (perhaps as a start up task in 
> Weblogic or equivalents in Websphere or whatever container 
> you're using for the configuarbility) and either get this to 
> do the work or to invoke a session bean to do the work. How 
> you know what has been updated/inserted is a database issue I 
> guess. (Note the JMS/MDB solution doesn't have that problem, 

Indeed, the current solution is a batch Perl script using DBI module, actually it's a 
while(1) loop
that caches data and for each iteration compares the cache with the refreshed data.
if there is changes, it inserts them into a predefined table of systemB then calls a 
stored procedure
who is reponsable for doing the synch. This stored procedure also contains
validation rules and so one ... you see a little bit why we are moving to j2ee :)

> but may cause too much of a locking headache).If you wrote a 
> simple Java class now, I can't see it being too much trouble 
> to move it into a session bean later when EJB2.1 is available.

That's what i was thinking about but i'm affraid i need to implement this business 
myself.
I was hopping there is a configuration solution from the container itself.
Saying to him for instance this my table(or view) and so one , so give me the list
of updated/inserted/deleted rows whenever this occur.
A little bit like there is an automatic refresh of data that you cache in an entity 
bean via the ejbload() method.

Jos�.

> 
> Hope this helps to point you in the right direction,
> 
> Cheers 
> 
> Dan
> 
> -----Original Message-----
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2003 16:07
> To: 'Struts Users Mailing List'
> Subject: RE: [OT] EJB LIKE A TRIGGER
> 
> 
> My team did something similar to this last year, but we had 
> to write our own mechanism involving cached flags that would 
> indicate to the session fa�ade when an entity when had last 
> been used to update the database.  But as far querying the db 
> and recovering the number of records that were added, 
> modified or deleted, I don't think that can be done.  If it 
> can it's not going to be trivial.
> 
> Try [EMAIL PROTECTED], which is more EJB-centric 
> than this list. There is also an EJB-INTEREST mail list.
> 
> Mark
> 
> -----Original Message-----
> From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 16, 2003 9:59 AM
> To: Struts Users Mailing List
> Subject: [OT] EJB LIKE A TRIGGER
> 
> 
> Hello,
> I' moving my code from Perl to Java/J2EE.
> The goal is to integrate 2 systems, to be short
> the business is mainly to transfert any 
> update, insert, delete from sytemA to systemB.
> Those 2 sytems use Oracle database.
> The requirement doesn't allow me to create any trigger on 
> Oracle databases.
> 
> I there a way to go for an EJB solution that will act like a 
> trigger ? The business of this EJB will be : "every x seconds 
> (configurable) check changes from a given table (or view) et 
> return the list 
> of rows that have been updated, inserted or deleted."
> 
> Do i need to re-invite the wheel or is this something that 
> the container can handle itself ? 
> (i'm thinking about ejbload() method of an entity bean)
> 
> =======================
> Jos� Nyimi Mbambi
> IT Analyst
> http://www.proximus.be
> 
> 
> 
> 
> **** DISCLAIMER ****
> 
> "This e-mail and any attachment thereto may contain 
> information which is confidential and/or protected by 
> intellectual property rights and are intended for the sole 
> use of the recipient(s) named above. 
> Any use of the information contained herein (including, but 
> not limited to, total or partial reproduction, communication 
> or distribution in any form) by other persons than the 
> designated recipient(s) is prohibited. 
> If you have received this e-mail in error, please notify the 
> sender either by telephone or by e-mail and delete the 
> material from any computer".
> 
> Thank you for your cooperation.
> 
> For further information about Proximus mobile phone services 
> please see our website at http://www.proximus.be or refer to 
> any Proximus agent.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to