RE: What is the best way to shutdown a Liferay 7.0 JBoss Bundle in Linux?

Juan Vaca, modified 7 Years ago. New Member Posts: 10 Join Date: 8/23/10 Recent Posts
Hi, it's me again.  This time I want to know what is the best way to shut down a Liferay 7.0 JBoss Bundle instance in Linux?.
My development Liferay Bundle does not shut down after a  ctrl + c combination.  After a long wait, I end up killing the Liferay's process with kill -9.

I also programmed a shutdown event in Liferay's administration, but the instance does not shut down.

After a 10 minutes wait, the instance is still running.

In the browser a get the message that I set up in the shutdown event.
thumbnail
Arun Das, modified 7 Years ago. Regular Member Posts: 166 Join Date: 7/23/12 Recent Posts
Hi,
Attached is a sample startup/shutdown script. Please modify according to needs.


Regards,
​​​​​​​Arun

Attachments:

thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Juan VacaHi, it's me again.  This time I want to know what is the best way to shut down a Liferay 7.0 JBoss Bundle instance in Linux?.
My development Liferay Bundle does not shut down after a  ctrl + c combination.  After a long wait, I end up killing the Liferay's process with kill -9.

You typically shut down Liferay by shutting down the application server - exactly as you'd do it for any JBoss installation that is not running Liferay.

If it doesn't stop, most likely you (or someone) started a non-daemon thread. This effectively prevents the JVM from shutting down. Get a thread dump, identify the thread and - especially if it's been started by your own code - implement proper shutdown notification and shut down the thread gracefully (or make it a daemon thread)
Juan Vaca, modified 7 Years ago. New Member Posts: 10 Join Date: 8/23/10 Recent Posts

I finally figured out what is happening.

 

I am using a JNDI Datasource defined in dbc.default.jndi.name property.  When JBoss shuts down one of the first things that go down is the data source.  So when Liferay tries to do its normal shutdown process there is no database connection and the server never shuts down.

I change my configuration and now I'm using  this properties : jdbc.default.driverClassName, jdbc.default.password, jdbc.default.url and jdbc.default.username.  Now JBoss shuts down normally.

Is that a Liferay's problem or is a JBoss' one?