-
1. Re: InVM connector not being used when sending messages
rnicholson10 Oct 13, 2009 8:02 AM (in response to rnicholson10)If both the acceptor and connector are disabled:
javax.naming.NameNotFoundException: ConnectionFactory not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) at org.jnp.server.NamingServer.getObject(NamingServer.java:785) at org.jnp.server.NamingServer.lookup(NamingServer.java:443) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686) at javax.naming.InitialContext.lookup(InitialContext.java:392)
If only the acceptor is disabled:javax.jms.JMSException: Unable to connect to server using configuration org-hornetq-integration-transports-netty-NettyConnectorFactory?hornetq-remoting-netty-port=5445&hornetq-remoting-netty-host=localhost at org.hornetq.core.client.impl.ConnectionManagerImpl.createSession(ConnectionManagerImpl.java:290) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:976) at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:721) at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:710) at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:729) at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:307) at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:302)
-
2. Re: InVM connector not being used when sending messages
timfox Oct 13, 2009 8:11 AM (in response to rnicholson10)It uses whatever connector/acceptor you configure it to use.
How are you creating connections? Are you looking up a connection factory from JNDI? If so, which one? -
3. Re: InVM connector not being used when sending messages
timfox Oct 13, 2009 8:27 AM (in response to rnicholson10)If you are using JNDI to lookup a connection factory on the client side, then, on the server side there will be a file called hornetq-jms.xml in which your connection factory is defined.
That connection factory will reference a connector via the connector-ref attribute. The connector with that name is defined in hornetq-configuration.xml.
In the connector definition for that connector, it will define which transport it uses. That can be invm, netty or whatever you choose. -
4. Re: InVM connector not being used when sending messages
rnicholson10 Oct 13, 2009 8:29 AM (in response to rnicholson10)Yes, I'm using JNDI, the same connection factory I've always used "/ConnectionFactory".
Should I be using something else? Out of the box, HornetQ tries to use the netty connector/acceptor for this connection factory. -
5. Re: InVM connector not being used when sending messages
rnicholson10 Oct 13, 2009 8:35 AM (in response to rnicholson10)Ah, yes.
Is there a reason the default is netty?
Are there performance gains to be had by using netty over InVm? If it's better to use netty I'll leave it as that.
The reason I'm bringing this up is I'm trying to find out why memory size never decreases on server when I send messages using a bridge. I thought that maybe this might interfere with acknowledgements being sent. -
6. Re: InVM connector not being used when sending messages
timfox Oct 13, 2009 9:09 AM (in response to rnicholson10)If you are looking up /ConnectionFactory that's in the global JNDI space - so it should us Netty - since the invm transport's not going to work when the client is in a different process.
If you are looking up java:/ConnectionFactory - that's the local invm JNDI namespace (that's what java: means), so it should use invm by default. That connection factory definition is currently missing from the config., but I've just added it in TRUNK (see my last commit).
You could add the same definition to your config file if you like.