marc fleury wrote:

> |Hot-deploying the Jetty service works fine.

Hhhhmmm.....

The stuff checked in at the moment works - but I want to go further....

try this:

rm deploy/jetty-service.xml
rm lib/ext/jetty-plugin

put this in plugins/jetty/build.xml:

-8<----------------------------8<-------------------------8<--
  <target name="sar" depends="jars" description="Build the Service Archive">
    <!-- Build jetty.sar -->
    <copy
  file="../.././server/output/etc/conf/default/jetty-service.xml"
  tofile="${build.classes}/META-INF/jboss-service.xml"
    />

<!--
    <delete dir="${build.classes}/META-INF/lib"/>
    <mkdir dir="${build.classes}/META-INF/lib"/>
    <copy todir="${build.classes}/META-INF/lib" flatten="yes">
      <fileset dir="../.././thirdparty/mortbay/">
        <include name="**/*.jar"/>
      </fileset>
    </copy>
 -->

    <jar jarfile="${build.lib}/jetty.sar">
      <fileset dir="${build.classes}">
        <include name="**"/>
      </fileset>
    </jar>
  </target>
-8<----------------------------8<-------------------------8<--

./build.sh sar

cp output/lib/jetty.sar ../../build......../deploy/lib

sometimes it works fine but sometimes I get this :

[ServiceDeployer] Problem deploying url
file:/mnt/megalodon/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0alpha/deploy/lib/jetty.sar,
no valid service.xml file found.
java.net.MalformedURLException: no protocol: META-INF/jboss-service.xml
 at java.net.URL.<init>(URL.java:473)
 at java.net.URL.<init>(URL.java:376)
 at java.net.URL.<init>(URL.java:330)
 at org.jboss.deployment.ServiceDeployer.getDocument(Unknown Source)
 at org.jboss.deployment.ServiceDeployer.deploy(Unknown Source)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.deployment.AutoDeployer.deploy(Unknown Source)
 at org.jboss.deployment.AutoDeployer.run(Unknown Source)
 at java.lang.Thread.run(Thread.java:484)
[AutoDeployer] Deployment
failed:file:/mnt/megalodon/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0.0alpha/deploy/lib/jetty.sar

org.jboss.deployment.DeploymentException: No valid service.xml file foundno
protocol: META-INF/jboss-service.xml
 at org.jboss.deployment.ServiceDeployer.deploy(Unknown Source)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.deployment.AutoDeployer.deploy(Unknown Source)
 at org.jboss.deployment.AutoDeployer.run(Unknown Source)
 at java.lang.Thread.run(Thread.java:484)

Sticking to just deploying the XML descriptor works fine - but seems to load
the jetty service classes into a global classloader, which is not thrown away
when the service in undeployed - i.e. on a redeploy, the old versions of the
classes are started up even if I have recompiled.

If I deploy a sar, it looks like a new ClassLoader is forked for the
deployment. When I redeploy I see all the old classes being thrown away, and
the new ones, from the sar, are loaded. This makes my development cycle much
faster, because I don't have to restart a jvm and half of JBoss when I want
to make a change to my code.

Unfortunately the ServiceDeployer ClassLoader stuff is not quite stable. I am
talking to David Jenkins about it. As soon as it is sorted I'll check in
stuff to build a sar instead. This will be better to develop with and provide
better support for distribution/clustering.


>
>
> What happened to the idea of creating your own directory layout space upon
> deployment from the JSR I thought that was very useful...

We'll see.

Initially, I'll do a cut that doesn't need this. Then if it seems useful, we
can put it in - but I don't want it to slow down delivering a full Jetty
implementation for 3.0 (i.e. WARs)


>
>
> do you still require this? it would be very useful for me to work with a
> specific case

I'll see how I go. - but you'll be the first to know.

Catch you later,


Jules


>

>
>
> marcf
>
> |
> |Hot-undeploying generates the following exception :
> |
> |
> |[AutoDeployer] Auto undeploy of
> |file:/mnt/megalodon/home/jules/cvs/JBoss/3.0/build/output/jboss-3.0
> |.0alpha/deploy/jetty-service.xml
> |
> |[JettyService] Stopping
> |[Jetty] Stopped SocketListener on 0.0.0.0:8080
> |[JettyService] Stopped
> |[JettyService] Destroying
> |[Jetty] Destroy SocketListener on 0.0.0.0:8080
> |[Jetty] Deregister Jetty:Jetty=0,SocketListener=0
> |[JettyService] Destroyed
> |[ServiceDeployer] Mbean exception while executing undeploy on
> |[Ljava.lang.Object;@333a0e
> |javax.management.InstanceNotFoundException: :service=Jetty
> | at
> |com.sun.management.jmx.MBeanServerImpl.unregisterMBean(MBeanServerI
> |mpl.java:945)
> |
> | at
> |org.jboss.system.ServiceController.undeploy(ServiceController.java:248)
> | at java.lang.reflect.Method.invoke(Native Method)
> | at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> |
> | at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> |
> | at
> |org.jboss.deployment.ServiceDeployer.invoke(ServiceDeployer.java:949)
> | at
> |org.jboss.deployment.ServiceDeployer.undeploy(ServiceDeployer.java:681)
> | at java.lang.reflect.Method.invoke(Native Method)
> | at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
> |
> | at
> |com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
> |
> | at org.jboss.deployment.AutoDeployer.undeploy(AutoDeployer.java:664)
> | at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:270)
> | at java.lang.Thread.run(Thread.java:484)
> |
> |It looks like the service was located and successfully shut down and
> |destroyed. Then something went wrong.
> |
> |Is this a known problem in undeployment, or something peculiar to the
> |Jetty service.
> |
> |Perhaps Jetty's own MBeans are confusing the issue - I'll run some
> |tests...
> |
> |
> |I would like to get it fixed, as it will speed my development cycle
> |substantially if I can bounce just the Jetty service, and not the whole
> |server, each time I recompile my stuff.
> |
> |
> |Thanks, Guys,
> |
> |
> |
> |Jules
> |
> |
> |
> |
> |_________________________________________________________
> |Do You Yahoo!?
> |Get your free @yahoo.com address at http://mail.yahoo.com
> |
> |
> |_______________________________________________
> |Jboss-development mailing list
> |[EMAIL PROTECTED]
> |https://lists.sourceforge.net/lists/listinfo/jboss-development
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to