tomazJeff,Code inside services cannot access JNDI at all, so injecting service as dependency is only solution.
this is not about mgmt api exposure if I understood question correctly.
It is question on level of msc services.
--On Tue, Jun 17, 2014 at 3:16 PM, Jeff Mesnil <jmesnil@redhat.com> wrote:
Unfortunately, that will not work.
On 17 Jun 2014, at 13:27, Dejan Kitic <kdejan@gmail.com> wrote:
> Hi guys,
>
> I am trying to figure out if it's possible to make HornetQ RemoteConnectionFactory available within subsystem using something like:
>
> final CastingInjector<ConnectionFactory> connFactInjector = new CastingInjector<ConnectionFactory>(connFactInjector,
> ConnectionFactory.class);
> and then doing something like:
>
> ...
> .addDependency(ConnectionFactoryService.SERVICE_NAME, connFactInjector)
>
>
> within SubsystemAdd performRuntime.
>
> Above is just thinking on the subject, the actual problem would be what to put in the addDependency call for service name, and even how to specify that I need to wait for the RemoteConnectionFactory to become available.
You could create a dependency on the connection factory name but the service does not return the JMS ConnectionFactory as its value (long story short, HornetQ creates the object internally and does not expose it from its management API).
An alternative would be to depend on the JNDI binding of the remote connection factory instead.
_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev