-
1. Re: How to put InteractionSpec in JNDI
davidjencks Jul 10, 2002 5:26 PM (in response to neil)The spec doesn't indicate a standard way for the InteractionSpecs to get bound... so you get to write one yourself. I would use an mbean.
Eventually in jboss 3.1 I think this will be possible by writing an xmbean descriptor for the i.s. and including an additional mbean interceptor that binds it in jndi on "start". However for more immediate use you should probably just write an mbean that has the i.s. class and attribute values as attributes and creates, configures, and binds it into jndi in the startService lifecycle method (and unbinds it in stopService). -
2. Is there a new standard way of doing this?
trajano Dec 27, 2003 5:30 PM (in response to neil)I was wondering if there is a proper way of doing this now? I was hoping for something like a jboss-ra.xml file that would contain the mapping, which can also be overridden by the *-ds.xml file.
The concept of doingpublic static void main(String[] args) throws NamingException { Properties properties = new Properties(); properties.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY); InitialContext context = new InitialContext(properties); HelloWorldInteractionSpecImpl ispec = new HelloWorldInteractionSpecImpl(); ispec.setFunctionName (HelloWorldInteractionSpec.SAY_HELLO_FUNCTION); context.bind("jca/HelloWorldISpec", ispec); }
does not look really appealing.