[jboss-user] [Microcontainer] - Re: How to convert -service.xml into -jboss-beans.xml ?

alesj do-not-reply at jboss.com
Sun Feb 1 03:41:34 EST 2009


Ah, it looks like we transform the ObjectName to its canonical value somewhere.

I guess you will need an intermediate bean,
that will transform the name back to ObjectName.

e.g.

  | <bean name="String2ObjectName" class="org.acme.transformers.String2ObjectName"/>
  | 
  | <property name="serverPeer">
  | <value-factory bean="String2ObjectName" method="transform">
  |    <parameter>
  |       <inject bean="jboss.messaging:service=ServerPeer" fromContext="name"/>
  |    </parameter>
  | </value-factory>
  | </property>
  | 
Where String2ObjectName looks like this:

  | public ObjectName transform(String s)
  | {
  |    return new ObjectName(s);
  | }
  | 

Or try to re-use our ObjectName property editor.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206098#4206098

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206098



More information about the jboss-user mailing list