This content has been marked as final.
Show 2 replies
-
1. Re: Hashtable Bean in microcontainer XML configuration
alesj Apr 24, 2009 7:19 AM (in response to jmesnil)"jmesnil" wrote:
Is it possible to do that?
Sure it is.
Hashtable is just the name of the class for what MC knows.
OK, the trick is still to get those entries in. ;-)<bean name="JNDI" class="java.util.Hashtable"> <install method="put"> <parameter>java.naming.provider.url</parameter> <parameter>jnp://localhost:1099</parameter> </install> </bean>
or<bean name="JNDI" class="java.util.Hashtable"> <constructor class="java.util.Map"> <map class="java.util.Hashtable" keyClass="java.lang.String" valueClass="java.lang.String"> <entry> <key>java.naming.factory.initial</key> <value>org.jnp.interfaces.NamingContextFactory</value> </entry> <entry> <key>java.naming.provider.url</key> <value>jnp://localhost:1099</value> </entry> <entry> <key>java.naming.factory.url.pkgs</key> <value>org.jboss.naming:org.jnp.interfaces"</value> </entry> </map> </constructor> </bean>
"jmesnil" wrote:
Where can I find an example/doc about that?
There is no such (exact) example.
Unless you expect us to cover every bean possible. :-) -
2. Re: Hashtable Bean in microcontainer XML configuration
jmesnil Apr 27, 2009 12:46 AM (in response to jmesnil)"alesj" wrote:
There is no such (exact) example.
Unless you expect us to cover every bean possible. :-)
Isn't that too much too ask? ;)
Thansk for the answer Ales, I did not know about the install element but I should have thought about using the Hashtable's constructor to populate my properties.