-
1. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 12:55 AM (in response to kconner)Forgot to add the activation configuration element on those methods, so assume they would all take an additional parameter.
-
2. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 12:59 AM (in response to kconner)Perhaps this is a more appropriate interface
public interface ActivationAdapter { public void setDestination(final Map<String, String> activationConfig, final String name) throws ConfigurationException ; public void setProviderAdapterJNDI(final Map<String, String> activationConfig, final String providerAdapterJNDI) throws ConfigurationException ; // true for queue, false for topic public void setDestinationType(final Map<String, String> activationConfig, final boolean queue) throws ConfigurationException ; public void setMessageSelector(final Map<String, String> activationConfig, final String messageSelector) throws ConfigurationException ; public void setMaxThreads(final Map<String, String> activationConfig, final String maxThreads) throws ConfigurationException ; }
-
3. Re: JMS Listener Mapper and JCA activation
beve Apr 24, 2009 1:01 AM (in response to kconner)Looks good to me. Just really have question about where this is going to be used in the code.
If I understood you correctly one will be able to specify a concrete impl of an ActivationAdapter in the listener configuration element as a property.
Will this class be used in the JmsListenerMapper? Could you provide an example just so I can visualize it?
Thanks,
/Daniel -
4. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 1:05 AM (in response to kconner)Also, change the maxThreads to an Integer rather than a String.
Sorry for rambling :) -
5. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 1:08 AM (in response to kconner)"beve" wrote:
If I understood you correctly one will be able to specify a concrete impl of an ActivationAdapter in the listener configuration element as a property.
Will this class be used in the JmsListenerMapper? Could you provide an example just so I can visualize it?
Yes, this is intended to be used in the mapper and replace our explicit configuration.
At the moment we make invocations such as the followingaddPropertyElement(activationConfigElement, "destination", messageFilter.getDestName()) ;
So the intention would be to replace these with calls to the adapter, allowing us to map these attributes for different providers. -
6. Re: JMS Listener Mapper and JCA activation
tfennelly Apr 24, 2009 1:50 AM (in response to kconner)Hey guys... how about globally configuring the adapter classes based on the adapter name e.g. in the jbossesb-properties.xml? Would keep the .esb configs a bit cleaner perhaps.
The JmsListenerMapper might then look up the adapter something like:String adapterClassName = ModulePropertyManager.getPropertyManager("jca.activation.adapters").getProperty(jmsJcaProvider.getAdapter());
With the config file something like:<properties name="jca.activation.adapters"> <property name="jms-ra.rar" value="org.jboss....JBossJmsJcaAdapter"/> <property name="wmq.jmsra.rar" value="org.jboss....WMQJmsJcaAdapter"/> </properties>
-
7. Re: JMS Listener Mapper and JCA activation
tfennelly Apr 24, 2009 1:52 AM (in response to kconner)Is the use of "Adapter" here not potentially confusing, since th .rar is an "Adapter" too? To me, this thing is performing a mapping operation, so how about "ActivationMapper"?
-
8. Re: JMS Listener Mapper and JCA activation
tfennelly Apr 24, 2009 1:59 AM (in response to kconner)Sorry for drip feeding, but I just had another thought :)....
I wonder would it be possible to generalize the interface more? I'm thinking of a situation where the mapping for a particular adapter may need to perform other mappings outside the set layed down here.
If we could also extract the provider/listener config into a Map ala the activation config being mapped too, we could then do something like....public interface ActivationAdapter { public void map(final Map<String, String> listenerConfig, final Map<String, String> activationConfig) throws ConfigurationException ; }
Just a thought! -
9. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 2:07 AM (in response to kconner)"tfennelly" wrote:
Hey guys... how about globally configuring the adapter classes based on the adapter name e.g. in the jbossesb-properties.xml? Would keep the .esb configs a bit cleaner perhaps.
Yeah, I was thinking about doing that as well and allowing a property to override it if necessary. The comment about the property was more to highlight the fact that we cannot change the schema for this. -
10. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 2:10 AM (in response to kconner)"tfennelly" wrote:
Is the use of "Adapter" here not potentially confusing, since th .rar is an "Adapter" too? To me, this thing is performing a mapping operation, so how about "ActivationMapper"?
I'm easy, either is good to me. Not sure it would be confusing though :) -
11. Re: JMS Listener Mapper and JCA activation
tfennelly Apr 24, 2009 2:10 AM (in response to kconner)"Kevin.Conner@jboss.com" wrote:
"tfennelly" wrote:
Hey guys... how about globally configuring the adapter classes based on the adapter name e.g. in the jbossesb-properties.xml? Would keep the .esb configs a bit cleaner perhaps.
Yeah, I was thinking about doing that as well and allowing a property to override it if necessary.
Right... better again!! -
12. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 2:14 AM (in response to kconner)"tfennelly" wrote:
I wonder would it be possible to generalize the interface more? I'm thinking of a situation where the mapping for a particular adapter may need to perform other mappings outside the set layed down here.
If we could also extract the provider/listener config into a Map ala the activation config being mapped too, we could then do something like.
I thought of that but we already have another mechanism for the 4.4/trunk to specify other activation properties. The purpose of this is just to map our overrides so I would be happier limiting the mapping to this.
Handling the 4.4/trunk extension within 4.2 is another issue, which I think is what you may be trying to address.
Kev -
13. Re: JMS Listener Mapper and JCA activation
kconner Apr 24, 2009 2:18 AM (in response to kconner)"tfennelly" wrote:
Right... better again!!
Well the property has to be included because the name of the rar means nothing. We can't rely on jbossesb-properties.xml for anything other than a few defaults as anyone can deploy any rar at any time.
Kev -
14. Re: JMS Listener Mapper and JCA activation
tfennelly Apr 24, 2009 2:18 AM (in response to kconner)"Kevin.Conner@jboss.com" wrote:
"tfennelly" wrote:
I wonder would it be possible to generalize the interface more? I'm thinking of a situation where the mapping for a particular adapter may need to perform other mappings outside the set layed down here.
If we could also extract the provider/listener config into a Map ala the activation config being mapped too, we could then do something like.
I thought of that but we already have another mechanism for the 4.4/trunk to specify other activation properties. The purpose of this is just to map our overrides so I would be happier limiting the mapping to this.
That's true... forgot that... okidoki :)