[jboss-user] [JNDI and Naming] New message: "Resources injection in JBoss 5"

Luca Morettoni do-not-reply at jboss.com
Wed Mar 10 09:15:52 EST 2010


User development,

A new message was posted in the thread "Resources injection in JBoss 5":

http://community.jboss.org/message/531100#531100

Author  : Luca Morettoni
Profile : http://community.jboss.org/people/morettoni

Message:
--------------------------------------------------------------
Hi list, I'm new to Jboss, I'm moving one app from Glassfish to JBoss,  but I got a little issue. Into a stateless session bean I have this:
 
> 
> 
>    ...
> @Resource(name = "theConfig")
> private Properties configProperties;
> ...
 
and the AS injects the properties defined by the admin-console into the app.
Now, this is possible with JBoss?
I found one solution using  *properties-service.xml*, but the properties are visible by the  *System.getProperties* and I need to modify the app.
Another solution talks about creating a file with this:
> <?xml version="1.0" encoding="UTF-8"?>
> <jndi:binding name="theConfig">
>   <java:properties xmlns:java="urn:jboss:java-properties" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="urn:jboss:java-properties resource:java-properties_1_0.xsd">
>     <java:property>
>       <java:key>remote.address</java:key>
>       <java:value>192.168.0.7</java:value>
>     </java:property>
>     <java:property>
>       <java:key>dumpinfo</java:key>
>       <java:value>1</java:value>
>     </java:property>
>   </java:properties>
> </jndi:binding>
There are any solutions to this? Thanks!!
 
--
Luca

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/531100#531100




More information about the jboss-user mailing list