Обсуждение: How to notify JBoss J2EE application in a trigger or rule???

Поиск
Список
Период
Сортировка

How to notify JBoss J2EE application in a trigger or rule???

От
Joost Kraaijeveld
Дата:
Hi,

I want a PostgreSQL trigger or rule that notifies a JBoss deployed J2EE
application of a certain event.

I was hoping that pljava would work, but for some -yet unknown to me-
reason, it does not work on my Debian AMD64 with Sun 1.5.0-7 JVM.

Does anyone have an (working???) example or a pointer to an example of
how to do this?

TIA

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [JDBC] How to notify JBoss J2EE application in a trigger or

От
Joost Kraaijeveld
Дата:
Hi Markus,

On Thu, 2006-06-22 at 13:04 +0200, Markus Schaber wrote:
> Hi, Hoost,
>
> Joost Kraaijeveld wrote:
>
> > I want a PostgreSQL trigger or rule that notifies a JBoss deployed J2EE
> > application of a certain event.
> >
> > I was hoping that pljava would work, but for some -yet unknown to me-
> > reason, it does not work on my Debian AMD64 with Sun 1.5.0-7 JVM.
> >
> > Does anyone have an (working???) example or a pointer to an example of
> > how to do this?
>
> Hmm, did you try the GCJ-based pljava variant?
No, I did not. As far as I know, I *must* use the Sun JVM for JBoss, and
I don't know if and how I can mix the GJC and Sun Java environment. Is
that possible with (almost) no hassle and readme's?

> And, as an workaround, have an extra bean sitting in the JBoss that
> LISTENs, and the trigger in SQL simply NOTIFYing it?
Can you elaborate on that? What do you mean with LISTEN and NOTIFY?

TIA

--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [JDBC] How to notify JBoss J2EE application in a trigger or rule???

От
Dave Cramer
Дата:
Did you try the pl/java list ?

Also there is pl/j which is much better designed for this.

Dave
On 22-Jun-06, at 6:59 AM, Joost Kraaijeveld wrote:

> Hi,
>
> I want a PostgreSQL trigger or rule that notifies a JBoss deployed
> J2EE
> application of a certain event.
>
> I was hoping that pljava would work, but for some -yet unknown to me-
> reason, it does not work on my Debian AMD64 with Sun 1.5.0-7 JVM.
>
> Does anyone have an (working???) example or a pointer to an example of
> how to do this?
>
> TIA
>
> --
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> web: www.askesis.nl
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that
> your
>        message can get through to the mailing list cleanly
>


Re: [JDBC] How to notify JBoss J2EE application in a trigger or

От
Joost Kraaijeveld
Дата:
On Thu, 2006-06-22 at 07:17 -0400, Dave Cramer wrote:
> Did you try the pl/java list ?
Yes, I did. Hence  the "yet unknow to me." I am also looking at the
source, but I am fairly convinced that I am bitten by the "zlib" bug,
which results in a lot of work to get it working. Besides the work, it
will also lead to "non apt-get installable" software which I do do not
fancy in terms of support....

> Also there is pl/j which is much better designed for this.
OK, I will look into that. Could you hint as to why it is much better
designed?




--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl

Re: [JDBC] How to notify JBoss J2EE application in a trigger or rule???

От
Dave Cramer
Дата:
On 22-Jun-06, at 7:25 AM, Joost Kraaijeveld wrote:

> On Thu, 2006-06-22 at 07:17 -0400, Dave Cramer wrote:
>> Did you try the pl/java list ?
> Yes, I did. Hence  the "yet unknow to me." I am also looking at the
> source, but I am fairly convinced that I am bitten by the "zlib" bug,
> which results in a lot of work to get it working. Besides the work, it
> will also lead to "non apt-get installable" software which I do do not
> fancy in terms of support....
>
>> Also there is pl/j which is much better designed for this.
> OK, I will look into that. Could you hint as to why it is much better
> designed?
>
pl/java uses JNI, and a JVM per connection, which also means that the
JVM must run on the same machine as the server, both of these are
showstoppers for me. On the other hand it is simple.

pl-j uses an RPC mechanism to call the function remotely. This means
that the JVM can be anywhere, and you don't need a 1-1  mapping of
connections to JVM's

I will warn you that it may be broken at the moment, but I'm fairly
sure that Laszlo could be coerced into fixing it.

Dave
>
>
>
> --
> Groeten,
>
> Joost Kraaijeveld
> Askesis B.V.
> Molukkenstraat 14
> 6524NB Nijmegen
> tel: 024-3888063 / 06-51855277
> fax: 024-3608416
> web: www.askesis.nl
>


Re: [JDBC] How to notify JBoss J2EE application in a trigger or rule???

От
Markus Schaber
Дата:
Hi, Hoost,

Joost Kraaijeveld wrote:

> I want a PostgreSQL trigger or rule that notifies a JBoss deployed J2EE
> application of a certain event.
>
> I was hoping that pljava would work, but for some -yet unknown to me-
> reason, it does not work on my Debian AMD64 with Sun 1.5.0-7 JVM.
>
> Does anyone have an (working???) example or a pointer to an example of
> how to do this?

Hmm, did you try the GCJ-based pljava variant?

And, as an workaround, have an extra bean sitting in the JBoss that
LISTENs, and the trigger in SQL simply NOTIFYing it?

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

Re: [JDBC] How to notify JBoss J2EE application in a trigger or

От
Markus Schaber
Дата:
Hi, Joost,

Joost Kraaijeveld wrote:

>>> Does anyone have an (working???) example or a pointer to an example of
>>> how to do this?
>> Hmm, did you try the GCJ-based pljava variant?
> No, I did not. As far as I know, I *must* use the Sun JVM for JBoss, and
> I don't know if and how I can mix the GJC and Sun Java environment. Is
> that possible with (almost) no hassle and readme's?

I guess that you want to use CORBA or Java Remote Interface between
PostgreSQL and JBoss, and those should abstract between differend JVMs.

>> And, as an workaround, have an extra bean sitting in the JBoss that
>> LISTENs, and the trigger in SQL simply NOTIFYing it?
> Can you elaborate on that? What do you mean with LISTEN and NOTIFY?

http://www.postgresql.org/docs/8.1/interactive/sql-listen.html
http://www.postgresql.org/docs/8.1/interactive/sql-notify.html

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org

Re: [JDBC] How to notify JBoss J2EE application in a

От
Joost Kraaijeveld
Дата:
Hi Markus,

On Thu, 2006-06-22 at 13:34 +0200, Markus Schaber wrote:
> Hi, Joost,
>
> Joost Kraaijeveld wrote:
>
> >>> Does anyone have an (working???) example or a pointer to an example of
> >>> how to do this?
> >> Hmm, did you try the GCJ-based pljava variant?
> > No, I did not. As far as I know, I *must* use the Sun JVM for JBoss, and
> > I don't know if and how I can mix the GJC and Sun Java environment. Is
> > that possible with (almost) no hassle and readme's?
>
> I guess that you want to use CORBA or Java Remote Interface between
> PostgreSQL and JBoss, and those should abstract between differend JVMs.
>
> >> And, as an workaround, have an extra bean sitting in the JBoss that
> >> LISTENs, and the trigger in SQL simply NOTIFYing it?
> > Can you elaborate on that? What do you mean with LISTEN and NOTIFY?
>
> http://www.postgresql.org/docs/8.1/interactive/sql-listen.html
> http://www.postgresql.org/docs/8.1/interactive/sql-notify.html

Although I am tempted to try a Corba solution as you mentioned in
another post (I am the maintainer (sort of)  of the Cygwin port of MICO,
an ORB), I have a NOTIFY/LISTEN example working and it looks OK.

Thanks,


--
Groeten,

Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
web: www.askesis.nl