agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
[Pljava-dev] Again multithreading
3+ messages / 0 participants
[nested] [flat]

* [Pljava-dev] Again multithreading
@ 2006-02-23 07:23 
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2006-02-23 07:23 UTC (permalink / raw)

I hope, that is my last mail, so that I could absolve this list. :-)

Here my questions:

(1) PL/Java uses one JVM per connection. Run the PL/Java trigger functions in one "main" JVM or run the functions in the JVM of the actuator (e.g. a JDBC connection unsing the SQL-statement 'insert')?

(2) What happens to a thread if it is created in a JVM of an conncetion and the connection is closed?

(3) Referring to my first mail about multihreading, is there any chance to ensure that a thread is called again from the backend?

Sorry for asking so much...


Patrick
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193





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

* [Pljava-dev] Again multithreading
@ 2006-02-23 07:32 
  2006-02-23 07:58 ` [Pljava-dev] Again multithreading 
  0 siblings, 1 reply; 3+ messages in thread

From:  @ 2006-02-23 07:32 UTC (permalink / raw)


I hope, that is my last mail, so that I could absolve this list. :-)

Here my questions:

(1) PL/Java uses one JVM per connection. Run the PL/Java trigger functions in one "main" JVM or run the functions in the JVM of the actuator (e.g. a JDBC connection unsing the SQL-statement 'insert')?

(2) What happens to a thread if it is created in a JVM of an conncetion and the connection is closed?

(3) Referring to my first mail about multihreading, is there any chance to ensure that a thread is called again from the backend?

Sorry for asking so much...


Patrick


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193





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

* [Pljava-dev] Again multithreading
  2006-02-23 07:32 [Pljava-dev] Again multithreading 
@ 2006-02-23 07:58 ` 
  0 siblings, 0 replies; 3+ messages in thread

From:  @ 2006-02-23 07:58 UTC (permalink / raw)

Patrick Peisker wrote:
> (1) PL/Java uses one JVM per connection. Run the PL/Java trigger functions in one "main" JVM or run the functions in the JVM of the actuator (e.g. a JDBC connection unsing the SQL-statement 'insert')?
>
>   
The trigger will be executed in the JVM that becomes embedded in the 
PostgreSQL backend process that represents the connection. PostgreSQL 
spawns a new process for each connection that is opened. The JVM becomes 
part of that process.
> (2) What happens to a thread if it is created in a JVM of an conncetion and the connection is closed?
>
>   
When the connection is closed, the PostgreSQL backend process terminates 
and since the JVM is embedded, it terminates too, in a controlled manner.

> (3) Referring to my first mail about multihreading, is there any chance to ensure that a thread is called again from the backend?
>
>   
No, not unless you do it yourself. If you issue a function call to a 
Java function and let that function sleep for a short period of time, 
other threads that are waiting to use the backend will be released.

Kind Regards,
Thomas Hallgren





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


end of thread, other threads:[~2006-02-23 07:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-23 07:23 [Pljava-dev] Again multithreading 
2006-02-23 07:32 [Pljava-dev] Again multithreading 
2006-02-23 07:58 ` 

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