[JBoss Messaging] - Re: Embedded server - how to create JMS Topic?
by Leos.Bitto
"jmesnil" wrote :
| Regarding jbm-jms.xml, it will be picked up if it is in the classpath. Could you place it in a separate directory and add it to the classpath of the other server instance instead?
|
Sure, I could do that. My setup was a bit messy, because I was just experimenting with the possibilities which JBoss Messaging provides. The real production deployment would be different for sure.
"jmesnil" wrote :
| For JNDI, you could pass a no-op Context implementation to JMServerManager.setContext() to "disable" JNDI.
|
Thanks for the hint.
"jmesnil" wrote :
| Do not hesitate to fill JIRA issues for this kind of improvements.
|
I will, as soon as I understand JBM a bit more. At this point I have only one small improvement to suggest: it the second argument of createQueue and createTopic of JMSServerManagerImpl would be null, simply do not register the object to JNDI instead of throwing a NullPointerException.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241104#4241104
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241104
16 years, 4 months
[JBoss Messaging] - Re: Embedded server - how to create JMS Topic?
by Leos.Bitto
Hi Tim,
"timfox" wrote :
| JMSServerManager is only really used for loading JMS queue, topic and connection factory descriptions from jbm-jms.xml into JNDI and also registering them with JMX. The JMX call to createTopic in JMSServerManager basically just does that. (Actually I think we should rename them to "deployTopic" or "bindTopic" or something similar).
|
As soon as I was pointed to JMSServerManager I read the source code, suspected that I could live without JMSServerManager and it seems that it is really true.
My application uses the ApplicationContext from Spring Framework, so I already have an XML configuration file, and it is easy to add few lines there to create the necessarry JMS queues and topics, using my simple class which calls your core API. The same is true for creating the JMS (XA)ConnectionFactory - no JNDI needed.
"timfox" wrote :
| If you're not using JNDI and don't need them in JMX then you shouldn't need to use it.
|
Yes, I do not use JNDI - I feel that for an embedded server JNDI is not necessary. I am not sure what do you mean by "in JMX" - the way I create the JMS queue and topic I can see them in JMX with all the cool stuff like message counts, etc.
"timfox" wrote :
| If you're using JMS you should just be able to instantiate the JMS queue and topic instances directly on the client side, e.g.
|
| Topic myTopic = new JBossTopic("myTopic");
|
| ... do stuff with the topic.
|
Sure, that is documented nicely and I do that.
"timfox" wrote :
| Can you tell me if that works?
|
No problem, I can send you my sample code if you let me know how - should I just paste in into this forum?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241099#4241099
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241099
16 years, 4 months
[JCA/JBoss] - Re: Changinh connection state in CMP EJB
by vickyk
Jesper,I am not sure which additional checks you are asking for,these checks are already there
1)
"jesper.pedersen" wrote : if the user has specified an incorrect class name, the driver hasn't been deployed to the lib/ directory,
|
BaseWrapperManagedConnectionFactory::loadReauthClass()
catch (Exception e)
| {
| throw new JBossResourceException("Failed to load the reauthentication class " + reauthenticateClassName, e);
| }
| }
2)
"jesper.pedersen" wrote :
| if the method doesn't exist on the class and so on.
It is tackled in the vendor implementation of the ReauthenticationMechansim e.g
MySqlReauthenticationMechansimImpl::reauthenticate
catch (Exception e)
| {
| Throwable t = e.getCause();
| if (t instanceof SQLException) {
| throw (SQLException)e;
| } else {
| log.error("Unexpected error in changeUser", e);
| }
| }
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241098#4241098
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241098
16 years, 4 months