<div dir="ltr">Hi Jeff,<div><br></div><div>Big thanks for your answer. Alternative with JNDI binding sounds good - think that might just do the trick for me here.</div><div><br></div><div>Dejan</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jun 17, 2014 at 2:16 PM, Jeff Mesnil <span dir="ltr"><<a href="mailto:jmesnil@redhat.com" target="_blank">jmesnil@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
On 17 Jun 2014, at 13:27, Dejan Kitic <<a href="mailto:kdejan@gmail.com">kdejan@gmail.com</a>> wrote:<br>
<br>
> Hi guys,<br>
><br>
> I am trying to figure out if it's possible to make HornetQ RemoteConnectionFactory available within subsystem using something like:<br>
><br>
> final CastingInjector<ConnectionFactory> connFactInjector = new CastingInjector<ConnectionFactory>(connFactInjector,<br>
> ConnectionFactory.class);<br>
> and then doing something like:<br>
><br>
> ...<br>
> .addDependency(ConnectionFactoryService.SERVICE_NAME, connFactInjector)<br>
><br>
><br>
> within SubsystemAdd performRuntime.<br>
><br>
> 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.<br>
<br>
</div>Unfortunately, that will not work.<br>
<br>
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).<br>
An alternative would be to depend on the JNDI binding of the remote connection factory instead.<br>
<span class="HOEnZb"><font color="#888888"><br>
jeff<br>
<br>
<br>
--<br>
Jeff Mesnil<br>
JBoss, a division of Red Hat<br>
<a href="http://jmesnil.net/" target="_blank">http://jmesnil.net/</a><br>
<br>
</font></span></blockquote></div><br></div>