-
1. Re: jboss-web.xml and res-url
ehenne Feb 20, 2003 8:25 AM (in response to spiritualmechanic)This is a documentation bug about jboss-web.xml. It is in "The jboss-web.xml ENC Elements" as well as in the appendix "The JBoss server jboss-web.xml descriptor DTD":
The <resource-ref> element has the same form as in jboss.xml, especially when using an URL (type is "java.net.URL") you have to use <res-url> instead of <jndi-name>. I had to look up this in the jboss source.
I have not found an updated DTD.
Elmar -
2. Re: jboss-web.xml and res-url
spiritualmechanic Feb 20, 2003 10:32 AM (in response to spiritualmechanic)So is this the correct format for jboss-web.xml? I grabbed this from the DTD for jboss.xml. I just want to make sure, but I'll test it anyways.
<resource-manager>
<res-name />
<res-url />
</resource-manager> -
3. Re: jboss-web.xml and res-url
spiritualmechanic Feb 20, 2003 10:38 AM (in response to spiritualmechanic)I'm getting this weird error when I try to deploy my war with the URL resource:
10:43:16,210 INFO [MainDeployer] Starting deployment of package: file:/C:/www/j
boss/jboss-3.0.4/server/default/deploy/skeleton.war/
10:43:16,421 WARN [NestedThrowable] Duplicate throwable nesting of same base ty
pe: class org.jboss.deployment.DeploymentException is assignable from: class org
.jboss.deployment.DeploymentException
My jboss-web.xml has the following:
<resource-ref>
<res-name>url/Zope</res-name>
<res-url>http://dev-zope-knox01:8080/</res-url>
</resource-ref> -
4. Re: jboss-web.xml and res-url
spiritualmechanic Feb 20, 2003 10:41 AM (in response to spiritualmechanic)Which package is this in? Looking at the source now.
-
5. Re: jboss-web.xml and res-url
ehenne Feb 21, 2003 8:49 AM (in response to spiritualmechanic)Hi,
here is an example form my jboss-web.xml, I think the res-type entry is required because they look for res-url if the type is java.net.URL:
[pre] <resource-ref>
<res-ref-name>url/CatalogDAOSQLURL</res-ref-name>
<res-type>java.net.URL</res-type>
<res-url>http://localhost:8080/petstore/CatalogDAOSQL.xml</res-url>
</resource-ref>
[/pre]The relevant source is in org.jboss.metadata.ResourceRefMetaData.importEjbJarXml()
This method is used for ejb-jar, jboss and jboss-web.
I hope this helps,
Elmar -
6. Re: jboss-web.xml and res-url
spiritualmechanic Feb 21, 2003 2:55 PM (in response to spiritualmechanic)> [/pre]The relevant source is in
> org.jboss.metadata.ResourceRefMetaData.importEjbJar
> ml()
Okay, that's being executed, but that's for web.xml. The corresponding method call for jboss-web.xml is:
importJbossXml()
I added some debug logs to this class and this method isn't being called at all.
Steve -
7. Re: jboss-web.xml and res-url
ehenne Feb 24, 2003 9:00 AM (in response to spiritualmechanic)Hi Steve,
yes you are right, I looked at the wrong header, importJbossXml has the relevant code for parsing res-url.
"jboss-web.xml" is loaded via importJBossWebXml which in turn calls importJbossXml for the resource-ref entries. I just looked at the sources, so I am not totally sure if it is actually called, but using res-url inside jboss-web.xml worked for me.
Elmar