This content has been marked as final.
Show 4 replies
-
1. Re: What is a meaning of :0.0.0 on classloader bean name?
alesj Dec 3, 2009 10:36 AM (in response to zman12345)"zman12345" wrote:
What is the meaning of 0.0.0 in bean="jmx-classloader:0.0.0"?
From the classloader element you posted<classloader name="jmx-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> <root>${jboss.lib.url}jboss-j2se.jar</root> ...
a ClassLoader bean is created.
And his default name (if you don't explicitly set it -- via context attribute) is name:version.
And since also no version is specified, the version defaults to 0.0.0.
OK? -
2. Re: What is a meaning of :0.0.0 on classloader bean name?
zman12345 Dec 3, 2009 11:00 AM (in response to zman12345)Hi Ales,
So are all bean elements in deployment follows this name:version rule or just for classloader's name specific? Would you be so kind to point me to doc that talks about this behavior?
I experiment couple variation of names and it doesn't follow your explanation.
1) If 0.0.0 is default, then I assume using it is optional, but remove it here fails to start server:<classloader><inject bean="jmx-classloader"/></classloader>
2) If 0.0.0 is the default, and I were to change it to something else, it doesn't work.<classloader><inject bean="jmx-classloader:0.0.99"/></classloader> <classloader name="jmx-classloader:0.0.99" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> ...
Also what is the benefit of using "name:version" format vs where a user explicitly creating two unique names? When should I use one and not the other?
Thanks,
-Z -
3. Re: What is a meaning of :0.0.0 on classloader bean name?
alesj Dec 3, 2009 11:14 AM (in response to zman12345)"zman12345" wrote:
So are all bean elements in deployment follows this name:version rule or just for classloader's name specific?
Just classloader bean from classloader element."zman12345" wrote:
Would you be so kind to point me to doc that talks about this behavior?
* http://anonsvn.jboss.org/repos/jbossas/projects/jboss-cl/trunk/classloading-vfs/src/main/java/org/jboss/classloading/spi/vfs/metadata/VFSClassLoaderFactory.java"zman12345" wrote:
I experiment couple variation of names and it doesn't follow your explanation.
It does. It's either
* you didn't understand me
* my explanation wasn't very good"zman12345" wrote:
1) If 0.0.0 is default, then I assume using it is optional, but remove it here fails to start server:<classloader><inject bean="jmx-classloader"/></classloader>
No, it's default in classloader element.
Plain inject element is completely generic, doesn't know or care about versioning."zman12345" wrote:
2) If 0.0.0 is the default, and I were to change it to something else, it doesn't work.<classloader><inject bean="jmx-classloader:0.0.99"/></classloader> <classloader name="jmx-classloader:0.0.99" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> ...
That's the same as before, you just added 0.0.99 at the end.
If you wanna use 0.0.99 in inject, you should change classloader element's version attribute (version="0.0.99")."zman12345" wrote:
Also what is the benefit of using "name:version" format vs where a user explicitly creating two unique names? When should I use one and not the other?
You need some defaults for such things.
e.g. you have versioning present, why not use it
But you can override it all.
When/why ... up to you.
I don't know what you're doing, hence cannot draw any conclusions. ;-) -
4. Re: What is a meaning of :0.0.0 on classloader bean name?
zman12345 Dec 3, 2009 1:34 PM (in response to zman12345)Thank you for the reply Ales.
The version attribute did the trick. So now this works.<classloader><inject bean="jmx-classloader:0.0.99"/></classloader> <classloader name="jmx-classloader" version="0.0.99" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> ... </classloader>
Also thanks for point to the source link. I was hoping for a more high level of explanation what the ":version" will do for me. Because I can certainly do it this way right?<classloader name="jmx-classloaderA" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> ... </classloader> <classloader name="jmx-classloaderB" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"> ... </classloader> <bean name="b1"> <classloader><inject bean="jmx-classloaderA:0.0.0"/></classloader> </bean> <bean name="b2"> <classloader><inject bean="jmx-classloaderB:0.0.0"/></classloader> </bean>
So now you see that the version string is not doing anything for me, but yet I am forced to use it. Hope you see why this is a bit confusing for a beginner to pickup.
-Z