users@connector-spec.java.net

[connector-spec-users] [jsr322-experts] Re: Re: MessageEndpointFactory.getActivationName in CONNECTOR_SPEC-1

From: Jun, Byung-Woo <byung-woo.jun_at_ericsson.com>
Date: Fri, 11 Jan 2013 16:17:19 +0000

Agreed with Jesper.

Byung-Woo Jun
Solutions Architect III

Business Unit Support Solutions
Technology and System Management CoE Fulfillment
Ericsson, Inc.
1 Ericsson Drive, 6P341
Piscataway, NJ 08854, USA
Phone +1 732-699-4663
byung-woo.jun_at_ericsson.com
www.ericsson.com




-----Original Message-----
From: Jesper Pedersen [mailto:jesper.pedersen_at_redhat.com]
Sent: Friday, January 11, 2013 9:05 AM
To: jsr322-experts_at_connector-spec.java.net
Cc: Nigel Deakin
Subject: [jsr322-experts] Re: [connector-spec-users] Re: MessageEndpointFactory.getActivationName in CONNECTOR_SPEC-1

Hi,

On 01/11/2013 05:29 AM, Sivakumar Thyagarajan wrote:
>>> Could you please provide more information on the exact usecase that
>>> would need this capability? I had tried to summarize the usecase as
>>> I understood it at [2], but I am sure you would be able to help us
>>> understand the requirements better and see if we can come up with an
>>> alternative.
>>
>> This is an ease of use feature. Currently when a user configures a
>> MDB to consume messages from a durable topic subscription they have
>> to set the subscriptionName to a name which is unique to the deployed
>> MDB they are using. This could be any name, so long as it is the same
>> on each instance in the app server cluster (which is why it can't be
>> generated by the RA or JMS provider itself). A common convention it
>> to base the name on the MDB name to make the name user-readable in
>> tools.
>>
>> The reason for this new feature is to allow users to leave
>> subscriptionName unset rather than set it manually to a value that
>> the container already knows. Some vendors (e.g. WebLogic) already
>> allow this as a non-standard feature.
>
> Jesper/Fred, could you share your inputs on this?
>
>> I don't mind whether the MDB name is passed to the RA by the JCA
>> runtime or by the MDB container. Several months ago the Java EE and
>> EJB spec leads agreed that the EJB spec would specify that this
>> information would be made available as a JNDI entity at
>> java:comp/UniqueMDBName, and it was added to the draft EJB 3.2 spec.
>> However Siva commented more recently that it was not possible to
>> lookup such entities during endpoint activation, which is why it was
>> suggested passing in this information via the MessageEndpointFactory.
>> This feature was therefore removed from the draft EJB 3.2 spec on the
>> basis that it would be added to the JCA spec.
>
> Yes, it was removed earlier from the EJB 3.2 spec because the
> connector spec so far didn't require the availability of a naming
> context during endpointActivation. Now that this would be fixed
> through
> CONNECTOR-SPEC_4 in Connectors 1.7, this approach (of the MDB
> container setting a java:comp/UniqueMDBName that the RA can then
> lookup and use) could work.

I think based on this we can remove the
MessageEndpointFactory::getActivationName() method.

The use-case should be covered by allowing JNDI lookup during
endpointActivation() and endpointDeactivation() based on the callers context. And a possible required config-property for the ActivationSpec.

Best regards,
  Jesper