Keeping container alive

View: New views
4 Messages — Rating Filter:   Alert me  

Keeping container alive

by Wacław Borowiec :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Is it normal behavior that the container process is killed after finishing its parent process? I mean that if I start container (JBoss in my case) from within other java program, then after finishing this program the container is down though I don't stop it. There's the same situation when doing it with ant. Is it possible for a container to outlive its parent?

I'll be grateful for help
Waclaw Borowiec

Re: Keeping container alive

by Alexander Brill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If they are both running in the same JVM, and you shut it down, you will end both processes as they will not have a JVM to work in.


On Mon, Dec 15, 2008 at 11:25 AM, Wacław Borowiec <wyborowiec@...> wrote:
Hi

Is it normal behavior that the container process is killed after finishing its parent process? I mean that if I start container (JBoss in my case) from within other java program, then after finishing this program the container is down though I don't stop it. There's the same situation when doing it with ant. Is it possible for a container to outlive its parent?

I'll be grateful for help
Waclaw Borowiec



--
Alexander Brill
http://brill.no

Re: Keeping container alive

by Wacław Borowiec :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So if I execute container.start(), it is started within the same JVM? I looked into org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.doStart(Java) method and it seems that a new JVM is started each time. So why JBoss is dead after the process which executed container.start() finishes?

And one more thing I can't understand. If I finish the process abnormally (e.g. by CTRL+C) JBoss stays alive. It's killed only if the process finishes in a normal way.

Wacław Borowiec

2008/12/17 Alexander Brill <alex@...>
If they are both running in the same JVM, and you shut it down, you will end both processes as they will not have a JVM to work in.



On Mon, Dec 15, 2008 at 11:25 AM, Wacław Borowiec <wyborowiec@...> wrote:
Hi

Is it normal behavior that the container process is killed after finishing its parent process? I mean that if I start container (JBoss in my case) from within other java program, then after finishing this program the container is down though I don't stop it. There's the same situation when doing it with ant. Is it possible for a container to outlive its parent?

I'll be grateful for help
Waclaw Borowiec



--
Alexander Brill
http://brill.no


Re: Keeping container alive

by Alexander Brill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ah, ok..
I haven't looked into that particular bit of code myself. But it sounds like there's some cleanup function starting on shutdown that kills your container, and this is probably not executed when you signal it with ctrl+c.

I'd look closely at the shutdown code for cargo if I were you to see what's really going on.


2008/12/17 Wacław Borowiec <wyborowiec@...>
So if I execute container.start(), it is started within the same JVM? I looked into org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.doStart(Java) method and it seems that a new JVM is started each time. So why JBoss is dead after the process which executed container.start() finishes?

And one more thing I can't understand. If I finish the process abnormally (e.g. by CTRL+C) JBoss stays alive. It's killed only if the process finishes in a normal way.

Wacław Borowiec

2008/12/17 Alexander Brill <alex@...>

If they are both running in the same JVM, and you shut it down, you will end both processes as they will not have a JVM to work in.



On Mon, Dec 15, 2008 at 11:25 AM, Wacław Borowiec <wyborowiec@...> wrote:
Hi

Is it normal behavior that the container process is killed after finishing its parent process? I mean that if I start container (JBoss in my case) from within other java program, then after finishing this program the container is down though I don't stop it. There's the same situation when doing it with ant. Is it possible for a container to outlive its parent?

I'll be grateful for help
Waclaw Borowiec



--
Alexander Brill
http://brill.no




--
Alexander Brill
http://brill.no