users@ejb-spec.java.net

[ejb-spec users] Re: [jsr345-experts] Re: Proposals for MDB and RA standardisation (JMS_SPEC-30,55,54,25,73)

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Tue, 10 Jul 2012 11:59:46 +0100

David,

On 06/07/2012 19:20, David Blevins wrote:
> I might also recommend the JMS EG create an interface which extends ActivationSpec to define these properties and
> their types. It will still be loosely-typed from the user's perspective, but can make things easier at the
> Container/Connector level.

Interesting. Do you mean that we mandate that a "standard" JMS resource adapter be required to provide an ActivationSpec
which implements this interface?

See also below...


> Something like this:
>
> package javax.jms;
>
> import javax.jms.Destination;
> import javax.resource.spi.ActivationSpec;
>
> public interface JmsActivationSpec extends ActivationSpec {
>
> // could be an enum
> public String getAcknowledgeMode();
> public void setAcknowledgeMode(String acknowledgeMode) ;
>
> public String getMessageSelector() ;
> public void setMessageSelector(String messageSelector) ;
>
> public Class<? extends Destination> getDestinationType() ;
> public void setDestinationType(Class<? extends Destination> destinationType) ;

This property is defined in EJB 3.1, which says "The value for this property must be either javax.jms.Queue or
javax.jms.Topic for a JMS message-driven bean". So this would need to be a String.


> // could be an enum
> public String getSubscriptionDurability() ;
> public void setSubscriptionDurability(String subscriptionDurability) ;

Again, EJB 3.1 says that "The value for this property must be either Durable or NonDurable". So doesn't this need to be
a String (rather than an enum)?

>
> public String getDestinationLookup() ;
> public void setDestinationLookup(String destinationLookup) ;
>
> public String getConnectionFactoryLookup() ;
> public void setConnectionFactoryLookup(String connectionFactoryLookup) ;
>
> public String getClientId() ;
> public void setClientId(String clientId) ;
>
> public String getSubscriptionName() ;
> public void setSubscriptionName(String subscriptionName) ;
>
> public String getShareSubscriptions() ;
> public void setShareSubscriptions(String shareSubscriptions) ;
> }
>
> The properties could be javadoc'ed and people could referred to that for help using the activation config.
>

Nigel