-
1. Re: Question on using JNDIBindingServiceMgr
starksm64 Dec 13, 2006 7:11 PM (in response to todd.nash)As shown this is not a valid mbean specification, but its probably due to not using the code tags. It can go into either the conf/jboss-service.xml, or another *-service.xml in the deploy directory. See the jmx chapter of the server does for info on mbean deployments.
-
2. Re: Question on using JNDIBindingServiceMgr
andrea.leoncini May 12, 2010 5:08 AM (in response to starksm64)hi
I'm using jb 5, I have created a file named hostinfo-service.xml, it contains following xml:
<?xml version="1.0" encoding="UTF-8"?>
<mbean code="org.jboss.naming.JNDIBindingServiceMgr" name="jboss.apps:name=keygen">
<attribute name="BindingsConfig" serialDataType="jbxb">
<jndi:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jndi="urn:jboss:jndi-binding-service:1.0"
xs:schemaLocation="urn:jboss:jndi-binding-service
resource:jndi-binding-service_1_0.xsd">
<jndi:binding name="bindproperty/address">
<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>host.address</java:key>
<java:value>127.0.0.1</java:value>
</java:property>
</java:properties>
</jndi:binding>
</jndi:bindings>
</attribute>
</mbean>but I can't use it: first of all when I put it in the deploy dir I don't see any kind of log as well as I touch (for example) mail-service.xml
second I get an exception (javax.naming.NameNotFoundException: address not bound) using:
InitialContext ctx;
Properties props = new Properties();
try {
ctx = new InitialContext();
props =(Properties) ctx.lookup("bindproperty/address");
} catch (NamingException e) {
e.printStackTrace();
}is there something wrong?
any comment or suggestion?
TIA
andrea
-
3. Re: Question on using JNDIBindingServiceMgr
rossog Aug 5, 2010 4:16 AM (in response to andrea.leoncini)You can find a solution in a similar thread.
I was looking a solution to lookup properties defined as Properties in properties-service.xml. I know one can use system.getProperties(), but is there a way to use annotations?
Thanks.