One option is to store your file URLs, etc., in JNDI. You could write a
custom MBean to read the localised properties from a file at system
startup and load them into JNDI. Your app then just looks up the values
from JNDI at runtime. 

The service.xml for your MBean might look something like: 

<server>
  <classpath codebase="lib" archives="mystartup.jar"/>
  <mbean code="MyMBeanClass" name="mystuff:service=MyConfig"> 
    <attribute name="ConfigFile">/somedir/myconfig.xml</attribute> 
    <depends>jboss:service=Naming</depends> 
  </mbean>   
</server>

Where "MyMBeanClass.class" is packaged in mystartup.jar. There's a
'depends' on the JBoss JDNI service, to ensure JNDI is available before
your MBean tries to load anything. 

Regards, 
Al.


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Phil Cornelius
> Sent: 04 April 2003 11:03
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] res-url and external resources.
> 
> 
> I have externalized my resources by using jndi lookups, I 
> have defined resource references in the jboss-web.xml and jboss.xml 
> 
> <resource-ref>
>       <res-ref-name>my_resource</res-ref-name>
>       <res-url>file:///c:/myconfigfilesdir/</res-url>
> </resource-ref>
> 
> and it works fine.. however these deployment descriptors are 
> burried in the ear file and i'd like to edit them at install 
> time.. and i'd rather keep my app compressed and archived.
> 
> Is there a service file or config file at the app server 
> level that I can edit to acheieve the same thing.. is there a 
> URL MBean?
> 
> I have read the Jboss manual and there is only one reference 
> to URL Connectors with no example.. the only way I found out 
> about res-url was from an old google cached page of the old 
> free jboss online manual!!
> 
> Many thanks
> Phil
> 
> 
> 


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to