On Sat, Apr 26, 2008 at 3:24 PM, patchworker <[EMAIL PROTECTED]> wrote:
>
>  Hello,
>
>  I just want to have a container what doesn't stop after it just has started.
>  In the moment it stops after I started it without pressing a key or doing
>  something. What the heck is a ShutdownHook?


A shutdown hook is an unstarted thread that waits for an event to shut
down the JVM. See the Javadocs for it here:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread)

>  here the servicemix.xml and interesting parts of the log:
>
>  -----------
>  <beans xmlns="http://xbean.org/schemas/spring/1.0";
>         xmlns:sm="http://servicemix.apache.org/config/1.0";
>         xmlns:iq="http://lemonjuice.de/iq/servicemix/";>
>
>         <!-- the JBI container -->
>         <sm:container id="jbi" rootDir="./target/data/smx"
>                 useMBeanServer="true" createMBeanServer="true" flowName="seda"
>                 autoEnlistInTransaction="true">
>         </sm:container>
>
>  </beans>

Is the above configuration the only content of the servicemix.xml
file? Are there are other configuration files you're using? The
standalone ServiceMix has many more configuration files in the conf/
directory.

>  [INFO] Scanning for projects...
>  [INFO] Searching repository for plugin with prefix: 'jbi'.
>  (...)
>  [INFO] [jbi:embeddedServicemix]
>  (...)
>  [main           ] INFO  JBIContainer ServiceMix 3.2.1 JBI Container
>  (ServiceMix) is starting
>  [main           ] WARN  ClientFactory Cound not start ClientFactory:
>  javax.naming.NoInitialContextException: Need to specify class name in
>  environment or system property, or as an  applet parameter, or in an
>  application resource file:  java.naming.factory.initial
>  [INFO] BUILD SUCCESSFUL

The exception above is usually innocuous unless you need to use JNDI.
Do you have the jndi.properties file in the classpath?

>  [ix ShutdownHook] INFO  ileSystemXmlApplicationContext - Closing
>  [EMAIL PROTECTED]:
>  display name
>  [EMAIL PROTECTED]
>  8a0cd]; startup date [Sat Apr 26 22:56:59 CEST 2008]; root of context
>  hierarchy

There's not enough detail to determine why ServiceMix is shutting
down. Is there more logging available?

Bruce
-- 
perl -e 'print unpack("u30","D0G)[EMAIL 
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Reply via email to