Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Pattern »

Re: How to notify j2ee server from Oracle?

Jin Chun

2003-12-17


Hi Robert,
  I guess I would only be speculating since I'm not sure how your
integration is laid out :-).
But, if you are using a shared database with the other system, and a simple
web presentation front end through
JBoss, then jms may be overkill if you can simply refresh the data on
demand from shared access to table/s.
Otherwise, you could always translate and retransmit the event message. For
example, the non-j2ee application
updates a table with a trigger coded to send an event message via oracle
aq. This event message is consumed
using competing consumers via MDB's (jms) in jboss. The MDB uses the event
data to update the j2ee's application
tables and then retransmits an internal (to the j2ee application) event
message over pub sub as another notification
event, but a different one where all nodes subscribing to the topic only
use the data without acting on it (for caching maybe?).

Hope this helps,
if not, feel free to go into more depth at my direct address below.

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/17/2003 02:27 PM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>---------------------------------------------------------------------------------------------------------------------------------------------|
|                                                                                              |
|     To:     J2EEPATTERNS-INTEREST@(protected)                                                            |
|     cc:                                                                                       |
|     Subject: Re: How to notify j2ee server from Oracle?                                                       |
>---------------------------------------------------------------------------------------------------------------------------------------------|




Hi Jin,
The problem with point to point is that if cluster node goes down I am
connecting to then my connection from DB is down event if other nodes are
up.
If I use the pub/sub then all nodes will try to process the same message,
which I do not want to happen.
So my question is: what is the best/easiest solution?
Thanks a lot for taking the time.
robert

-----Original Message-----
From: Jin Chun [mailto:ByungChun@(protected)]
Sent: Wednesday, December 17, 2003 2:05 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: How to notify j2ee server from Oracle?


Hi Robert,
 I guess I was misunderstanding :-). If you use a queue (point to point)
then only one consumer will get each message.
If you want every node to be notified, then you would use a topic (pub/sub)
to broadcast the notification.

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/17/2003 01:37 PM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>
---------------------------------------------------------------------------------------------------------------------------------------------|

|
|
|     To:     J2EEPATTERNS-INTEREST@(protected)
|
|     cc:
|
|     Subject: Re: How to notify j2ee server from Oracle?
|
>
---------------------------------------------------------------------------------------------------------------------------------------------|





Jin,
I am glad that this should work for me :)
I am missing something ... as you can see MDB are new to me ...so few more
questions..
Why would I need multiple consumers on each node for the same transaction?
How am I ensuring that only one message on one node is consumed?
How all nodes of the cluster are being notified if I use point to point?

robert



-----Original Message-----
From: Jin Chun [mailto:ByungChun@(protected)]
Sent: Wednesday, December 17, 2003 12:38 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: How to notify j2ee server from Oracle?


Hi Robert,
 I think you have an easy solution :-). You can have multiple consumers
on each jboss node receiving from the oracle AQ queues (point to point
queues
through their jms api's), this will ensure that only one consumer will
consume each message. Unless you have some other kind of requirement
(such as message ordering, resequencing, etc), this should work for you.

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/17/2003 11:56 AM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>
---------------------------------------------------------------------------------------------------------------------------------------------|


|
|
|     To:     J2EEPATTERNS-INTEREST@(protected)
|
|     cc:
|
|     Subject: Re: How to notify j2ee server from Oracle?
|
>
---------------------------------------------------------------------------------------------------------------------------------------------|






Jin,
It looks like you open more doors for me ... and more questions :)
If I use point to point this would not work too well with cluster since if
the node I am pointing to goes down I am out of luck. If I use
publish/subscribe then which node should consume? I would have to code
around it.
We are using 9iAS and Jboss.
Thanks a lot.
robert

-----Original Message-----
From: Jin Chun [mailto:ByungChun@(protected)]
Sent: Wednesday, December 17, 2003 11:39 AM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: How to notify j2ee server from Oracle?


Hi Robert,
 I guess it depends :-). Depending on your needs, you can either use
competing consumers over point to point queues, or
pub/sub broadcasting. If you are in a j2ee 1.3 environment, you can easily
set up MDB's to consume the event messages.
Otherwise, you will have to bootstrap the consumers on your own (Service
Activators either in a startup servlet or as a custom
service, etc.).

The easiest is probably using point to point queues to process the events,
then you will only consume the event once, depending
also on your needs for message expiration, etc. Which appserver and
available jms providers are you using?

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/17/2003 11:19 AM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>
---------------------------------------------------------------------------------------------------------------------------------------------|



|
|
|     To:     J2EEPATTERNS-INTEREST@(protected)
|
|     cc:
|
|     Subject: Re: How to notify j2ee server from Oracle?
|
>
---------------------------------------------------------------------------------------------------------------------------------------------|







Jin,
How does that work when I have a clustered j2ee server?
How would AQ comunicate with cluster? Would I need an load balancer between
the two?
Thanks.
robert


-----Original Message-----
From: Jin Chun [mailto:ByungChun@(protected)]
Sent: Wednesday, December 17, 2003 10:13 AM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: How to notify j2ee server from Oracle?


Hi Robert,
  not off hand :-), but there should be plenty of examples/docs off of
the oracle otn site.
We aren't doing that specific thing where I am currently, but we have had
multiple jms providers integrated
into the same application server. Following the terminology from the
enterprise integration patterns site
(which is really good IMHO), you can either send the event using push (the
data with the event) or pull
(just the notification, and grab the data yourself).

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/17/2003 12:34 AM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>
---------------------------------------------------------------------------------------------------------------------------------------------|




|
|
|     To:     J2EEPATTERNS-INTEREST@(protected)
|
|     cc:
|
|     Subject: Re: How to notify j2ee server from Oracle?
|
>
---------------------------------------------------------------------------------------------------------------------------------------------|








Jin,
Yes I think that this will work, this is what I was thinking of doing :)
Do you have any links of actual implementations of this?
Thanks.
robert

-----Original Message-----
From: Jin Chun [mailto:ByungChun@(protected)]
Sent: Tuesday, December 16, 2003 2:47 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: How to notify j2ee server from Oracle?


JMHO, but you could always put a trigger on the table, and have the trigger
send
a notification event message off to oracle aq, then have your appserver
code binding
to aq through their jms apis, take the notification as an event message and
do the rest
of the processing.

Jin

Jin Chun


Vice President: Sr. Systems Architect


State Street ? Global Link | www.statestreet.com | www.globallink.com


617.664.1695 | byungchun@(protected)


SCJA SCJP OCP-DBA








Confidentiality Notice: The information contained in the email is intended
for the confidential use of the above-named recipient(s). If the reader of
this message is not the intended recipient or person responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this communication in error, and that any review,
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this in error, please notify the sender
immediately and destroy this message.


|---------+------------------------------------>
|      |       "Augustyn, Robert non   |
|      |       Unisys"            |
|      |       <robert.augustyn@(protected)|
|      |       OM>               |
|      |       Sent by: An interest list|
|      |       for Sun Java Center J2EE |
|      |       Pattern Catalog       |
|      |       <J2EEPATTERNS-INTEREST@(protected)|
|      |       VA.SUN.COM>         |
|      |                        |
|      |                        |
|      |       12/16/2003 02:33 PM    |
|      |       Please respond to An   |
|      |       interest list for Sun   |
|      |       Java Center J2EE Pattern |
|      |       Catalog            |
|      |                        |
|---------+------------------------------------>
>
---------------------------------------------------------------------------------------------------------------------------------------------|





|
|
|     To:     J2EEPATTERNS-INTEREST@(protected)
|
|     cc:
|
|     Subject: How to notify j2ee server from Oracle?
|
>
---------------------------------------------------------------------------------------------------------------------------------------------|









Hi,
Is there a pattern standard way of accomplishing that?
I am looking to notify j2ee server that insert or update happened on a
perticular table in Oracle.
Thanks for your input.
robert

====================================================================
Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:
http://java.sun.com/blueprints/corej2eepatterns List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)



====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)




====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)




====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)




====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)




====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)




====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.