Hi,
My goal of stimulating someone to find a better solution worked great!
Thanks, Toby.
I also added around line 139
// Check if it's a JAR or zip or ear or war
if (!(fileUrl.getFile().endsWith(".jar") ||
fileUrl.getFile().endsWith(".ear") ||
fileUrl.getFile().endsWith(".war") ||
fileUrl.getFile().endsWith(".rar") ||
fileUrl.getFile().endsWith(".zip")))
continue; // Was not a JAR or zip - skip it...
to make .rar files auto-recognizable
and my jboss.jcml has
<!--Autodeployer JCA resources--must be before regular AutoDeployer -->
<mbean code="org.jboss.ejb.AutoDeployer" name="JCA:service=AutoDeployer">
<attribute name="Deployer">JCA:service=RARDeployer</attribute>
<attribute name="URLs">../deploy/resource/</attribute>
</mbean>
<!--Autodeployer needs to be after JCA datasources are set up!!! -->
<mbean code="org.jboss.ejb.AutoDeployer" name="EJB:service=AutoDeployer">
<attribute name="Deployer">J2EE:service=J2eeDeployer</attribute>
<attribute name="URLs">../deploy</attribute>
</mbean>
<!-- JMX adaptors -->
so that JCA resources are autodeployed BEFORE any apps that might use them.
Would you consider putting these small changes into CVS?
Thanks!
David Jencks
On 2001.04.11 04:36:29 -0400 Toby Allsopp wrote:
> Toby Allsopp wrote:
>
> > Or or!!! Why not just start another AutoDeployer pointing at, say,
> > deploy/resource, that talks to RARDeployer instead of J2EEDeployer?
> >
> > I'll try that last one and let you know.
>
> Ok, after modifying AutoDeployer slightly, this works (although it
> reveals a bug in RARDeployer that means that you can't redeploy resource
> adapters).
>
> I just addded this after the RARDeployer entry in jboss.jcml:
>
> <mbean code="org.jboss.ejb.AutoDeployer"
> name="JCA:service=AutoDeployer">
> <attribute name="Deployer">JCA:service=RARDeployer</attribute>
> <attribute name="URLs">../deploy/resource/minerva-jdbc-1.0b3.rar</attribute>
> </mbean>
>
> It won't work for watching directories unless AutoDeployer is modified
> even further to recognise .rar files as deployable. That patch is left
> as an exercise for the reader :-).
>
> Here's the AutoDeployer patch that makes watching single files work:
>
> @@ -292,13 +293,6 @@
> }
> } else if (urlFile.exists()) // It's a file
> {
> - // Check if it's a JAR or zip
> - if (!(url.endsWith(".jar") ||
> - url.endsWith(".ear") ||
> - url.endsWith(".war") ||
> - url.endsWith(".zip")))
> - continue; // Was not a JAR or zip - skip it...
> -
> try
> {
> watchedURLs.add(new
> Deployment(urlFile.getCanonicalFile().toURL()));
> @@ -309,13 +303,6 @@
> }
> } else // It's a real URL (probably http:)
> {
> - // Check if it's a JAR or zip
> - if (!(url.endsWith(".jar") ||
> - url.endsWith(".ear") ||
> - url.endsWith(".war") ||
> - url.endsWith(".zip")))
> - continue; // Was not a JAR or zip - skip it...
> -
> try
> {
> watchedURLs.add(new Deployment(new URL(url)));
> @@ -402,7 +389,9 @@
> this.url = url;
> if (url.getFile().endsWith(".jar") ||
> url.getFile().endsWith(".ear") ||
> - url.getFile().endsWith(".war"))
> + url.getFile().endsWith(".war") ||
> + (url.getProtocol().startsWith("file") &&
> + !new File(url.getFile()).isDirectory()))
> watch = url;
> else
> watch = new URL(url, "META-INF/ejb-jar.xml");
>
> Toby.
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development