agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] Transaction & java session
2+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Transaction & java session
@ 2005-10-15 16:29  
  0 siblings, 1 reply; 2+ messages in thread

From:  @ 2005-10-15 16:29 UTC (permalink / raw)

Hi,

there is some method to simulate a java-session related to a transaction?

In other word: the trigger call is excecuted against static class-method.
There
is any way to detect that the call come from a given session and route it
to the
same instance of a given object?

And ... another question: the only wait from PLJAVA to force a rollback is
to execute
a referential-broken INS/UPD?

TIA
Roberto Colmegna


__________________________________________________________________
TISCALI ADSL
Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone 
Telecom a partire da 19,95 Euro/mese.
Attivala subito, I PRIMI DUE MESI SONO GRATIS! CLICCA QUI:
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* [Pljava-dev] Transaction & java session
@ 2005-10-15 19:40  
  parent: 
  0 siblings, 0 replies; 2+ messages in thread

From:  @ 2005-10-15 19:40 UTC (permalink / raw)


rcolmegna at tiscali.it wrote:
> Hi,
>
> there is some method to simulate a java-session related to a transaction?
>
> In other word: the trigger call is excecuted against static class-method.
> There
> is any way to detect that the call come from a given session and route it
> to the
> same instance of a given object?
>   
There is always an implicit session. The current Session can be obtained 
with

Session current = SessionManager.current();

This session maps to the PostgreSQL session, i.e. the backend process 
that PL/Java currently executes in. The duration of this session is 
longer than the duration of a transaction.
> And ... another question: the only wait from PLJAVA to force a 
> rollback is
> to execute
> a referential-broken INS/UPD?
>   
The easiest way to cause a rollback is to simply throw an SQLException.

Regards,
Thomas Hallgren





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-10-15 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-15 16:29 [Pljava-dev] Transaction & java session 
2005-10-15 19:40 ` 

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox