-
1. Re: RAR deployment classloader?
galderz Dec 19, 2005 5:46 PM (in response to andycooper)what type of file is it? is it a resource bundle? from what you say, it seems like the best place for that file to be should be inside the RAR file. You should not make any assumptions about the file structure inside the application server
-
2. Re: RAR deployment classloader?
andycooper Dec 20, 2005 9:39 AM (in response to andycooper)"galderz" wrote:
what type of file is it? is it a resource bundle? from what you say, it seems like the best place for that file to be should be inside the RAR file. You should not make any assumptions about the file structure inside the application server
No, it is an XML configuration file for a JMS implementation. The kicker is that you really want to be able to configure it outside of the RAR file, but it doesn't seem like it is possible given the way that it appears that the RAR classloader doesn't delegate to its parent classloader. -
3. Re: RAR deployment classloader?
galderz Dec 20, 2005 11:09 AM (in response to andycooper)Where r u trying to load the configuration file? Is it from an MDB? Remember that according to the spec, an enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
We had a very similar problem where one of our components needed external XML configuration. We fixed the problem using an MBean that would load the configuration file.
The MBean's method would take the full path to the file and in order to load it we used twiddle to call the MBean method with the file's full path as parameter.
Does this help you? -
4. Re: RAR deployment classloader?
andycooper Dec 20, 2005 1:43 PM (in response to andycooper)"galderz" wrote:
Where r u trying to load the configuration file? Is it from an MDB? Remember that according to the spec, an enterprise bean must not use the java.io package to attempt to access files and directories in the file system.
We had a very similar problem where one of our components needed external XML configuration. We fixed the problem using an MBean that would load the configuration file.
The MBean's method would take the full path to the file and in order to load it we used twiddle to call the MBean method with the file's full path as parameter.
Does this help you?
Unfortunately not - I'm trying to use an external JMS provider that is packaged as a RAR file (in other words, not my code otherwise I would have solved the problem :-) ). It contains an XML configuration file that is referenced in ra.xml via "xbean:foo.xml" - in other words it is using the spring framework and apparently the "xbean:" prefix roughly translates to "find this on the classpath".