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