Welcome to dbForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

jdbc: Asking the DB-server for a notification

 
   Database Forums (Home) -> JDBC Driver RSS
Next:  Cannot connect with the Administator account  
Author Message
Mikhail Teterin

External


Since: Dec 26, 2007
Posts: 5



(Msg. 1) Posted: Wed Dec 26, 2007 3:33 pm
Post subject: jdbc: Asking the DB-server for a notification
Archived from groups: comp>lang>java, others (more info?)

Hello!

How can I ask the DB-server to notify my JDBC-program any time a table is
modified? Trigger?..

Although the server we are currently dealing with is MS SQL, the ideal
solution will be JDBC-generic...

Thanks!

-mi

 >> Stay informed about: jdbc: Asking the DB-server for a notification 
Back to top
Login to vote
Arne_Vajhøj

External


Since: Aug 20, 2006
Posts: 40



(Msg. 2) Posted: Wed Dec 26, 2007 3:58 pm
Post subject: Re: jdbc: Asking the DB-server for a notification [Login to view extended thread Info.]
Archived from groups: microsoft>public>sqlserver>jdbcdriver, others (more info?)

Mikhail Teterin wrote:
> How can I ask the DB-server to notify my JDBC-program any time a table is
> modified? Trigger?..
>
> Although the server we are currently dealing with is MS SQL, the ideal
> solution will be JDBC-generic...

No generic JDBC solution exists.

Maybe the JDBC driver has some SQLServer specific classes that
support notification, but I doubt it.

I can see two solutions that will work on SQLServer and be
possible to reimplement with at least some other databases:

--(update)--SQLServer--(trigger)--MSMQ--(JNI)--Java app

--(update)--SQLServer--(CLR trigger)--(socket)--Java app

and:

--(update)--database X--(trigger)--some MQ--(JMS)--Java app

--(update)--database X--(trigger in Java)--(socket)--Java app

Arne

 >> Stay informed about: jdbc: Asking the DB-server for a notification 
Back to top
Login to vote
sasuke

External


Since: Dec 27, 2007
Posts: 1



(Msg. 3) Posted: Thu Dec 27, 2007 10:00 am
Post subject: Re: jdbc: Asking the DB-server for a notification [Login to view extended thread Info.]
Archived from groups: microsoft>public>sqlserver>jdbcdriver, others (more info?)

On Dec 27, 1:58 am, Arne Vajhøj <a....DeleteThis@vajhoej.dk> wrote:
> --(update)--database X--(trigger)--some MQ--(JMS)--Java app
>
> --(update)--database X--(trigger in Java)--(socket)--Java app
>
> Arne

Hmm...interesting. A simple google search obviously didn't turn up
anything of interest.

Any links on this would be really appreciated.

Regards,
/sasuke.
 >> Stay informed about: jdbc: Asking the DB-server for a notification 
Back to top
Login to vote
Mikhail Teterin

External


Since: Dec 26, 2007
Posts: 5



(Msg. 4) Posted: Thu Dec 27, 2007 1:23 pm
Post subject: Re: jdbc: Asking the DB-server for a notification [Login to view extended thread Info.]
Archived from groups: comp>lang>java>databases, others (more info?)

sasuke wrote:
> Hmm...interesting. A simple google search obviously didn't turn up
> anything of interest.
>
> Any links on this would be really appreciated.

Well, all servers nowadays allow custom extensions to offer new functions
available in SQL.

One could implement such a function, which will be called from the trigger
and notify the client program somehow -- "out of band".

That's Arne's idea, and it is doable.

However, I was hoping, something more uniform is already available, but that
does not seem to be the case Sad

-mi
 >> Stay informed about: jdbc: Asking the DB-server for a notification 
Back to top
Login to vote
Lew

External


Since: Aug 30, 2007
Posts: 57



(Msg. 5) Posted: Thu Dec 27, 2007 7:17 pm
Post subject: Re: jdbc: Asking the DB-server for a notification [Login to view extended thread Info.]
Archived from groups: comp>lang>java>databases, others (more info?)

TwelveEighty wrote:
> On Dec 27, 11:23 am, Mikhail Teterin <usenet+m...@aldan.algebra.com>
> wrote:
>> One could implement such a function, which will be called from the trigger
>> and notify the client program somehow -- "out of band".
>>
>> That's Arne's idea, and it is doable.
>>
>> However, I was hoping, something more uniform is already available, but that
>> does not seem to be the case Sad
>
> I would solve this a little further upstream, if possible. What, for
> example, causes the table to change? Is there someone or something
> that creates a transaction that enters data? Could your program become
> the "business logic" layer that sits in between that and the database?

Isn't this the sort of thing they invented BPEL for?

The insight is that business processes interlock and interact. A process
control system, perhaps with a process control language like BPEL gluing
things together, orchestrates the various business processes that must
coordinate, as in this case, a web application and a database application.

Custom programming can do the same thing. I suspect that thinking of the
custom system as a business-process orchestrator would be useful.

This is a problem space that has been approached for decades, and for which
there are many buzzwords, none of which seem to have emerged as a clear winner.

--
Lew
 >> Stay informed about: jdbc: Asking the DB-server for a notification 
Back to top
Login to vote
Display posts from previous:   
   Database Forums (Home) -> JDBC Driver All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]