-
1. Re: repackaging client/server/core classes
borges Oct 15, 2012 9:59 AM (in response to ataylor)Hi Andy,
I just went through all of your changes, it looks like a much needed and welcome improvement to the current status.
+1
[...]
Regarding the ConnectionListener. I can see that placing the Acceptor there will pull loads of classes. One much narrower solution than
ConnectionLifeCycleListener<T>
void connectionCreated(T acceptor, Connection connection, ProtocolType protocol);
would be to use
void connectionCreated(HornetQComponent acceptor, Connection connection, ProtocolType protocol);
BTW, it seems that ConnectionLifeCycleListener is used in both projects (server and client) but the specific method only on hq-server. Can't we just add a new interface ServerConnectionLifeCycleListener that extends the original interface and contains connectionCreated(Acceptor, ProtocolType)?
-
2. Re: repackaging client/server/core classes
clebert.suconic Oct 15, 2012 2:31 PM (in response to ataylor)+1 I looked at the chnages.... very nice work Andy!
-
3. Re: repackaging client/server/core classes
ataylor Oct 15, 2012 2:50 PM (in response to ataylor)i will take a look at Francisco's suggestions tomorrow and do a PR
-
4. Re: repackaging client/server/core classes
mgiannini Dec 20, 2012 11:05 AM (in response to ataylor)Just need a little clarification on this change. I am embedding HornetQ server 2.3.0.BETA3 and using the file based configuration to configure the server. I expected I would only need to depend on hornetq-server, but it looks like I must now depend on hornetq-core-client as well. If I don't add this dependency I get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/hornetq/api/config/HornetQDefaultConfiguration
at org.hornetq.core.config.impl.ConfigurationImpl.<init>(ConfigurationImpl.java:181)
at org.hornetq.core.config.impl.FileConfiguration.<init>(FileConfiguration.java:31)
at org.hornetq.core.server.embedded.EmbeddedHornetQ.initStart(EmbeddedHornetQ.java:84)
at org.hornetq.core.server.embedded.EmbeddedHornetQ.start(EmbeddedHornetQ.java:74)
Caused by: java.lang.ClassNotFoundException: org.hornetq.api.config.HornetQDefaultConfiguration
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
It was unexpected to have to add a dependency on the client jar in order to embed the server. Could you clarify if this is the expected behavior?
Thanks.
-
5. Re: repackaging client/server/core classes
ataylor Dec 20, 2012 11:15 AM (in response to mgiannini)yes, the server also acts as a client in some cases so needs the client jar.