Why not reuse the sbb environment for that purpose?
Somehow they are meant to be use for the general configuration of the sbb.
And clearly the container should provide a way to override the value of it ( the value is optional in the deployment descriptor )
<!--
The env-entry element declares a constant that should be bound into the SBB's
JNDI environment. It contains an optional description, the name and type of
the constant, and an optional value. If a value is not specified, one must be
supplied during deployment.
Used in: sbb
-->
However these environment properties
Best Regards,
Dominque Gallot
My opinion is that the sbb should not be the owner of this configuration.
When compared with the ra entity, the main difference is that the Sbb in not singleton!
And even more the Sbbs may be shared in different services.
Why not set the owner of this configuration to the service, and using the ServiceManagementMBean jmx interface to set these configurations parameters?
Why not do something like the following
- Add some service configurations entry in the service descriptor.
o Add also a Boolean stating if this service support re-configuration
- Allows to change it using the ServiceManagementMBean
- Provide the configuration data to the sbb using the jndi
o Why not java:comp/conf ?
-
Send
an event to verify the configuration. How can we get the result of the validation?
The event object would contain the configuration.
We may add a method in the ServiceActivity interface? Any other options?
- Send an event to the service activity when the configuration is changed.
By using a ServiceConfigued event, will allows the current Sbb entity to know that the service configuration changed. It is similar to the way than Sbb if informed when the service is started ( ServiceStartedEvent ).
What do you thing? If we come with a more or less standard solution, I will glad to add it to our implementation as well ( Alcatel-Lucent ).
Since we are talking about new feature in the jsr240, there is also no standard way for a resource adaptor to add a management bean to the container.
Of course you can write a mlet, but then you need two deliverables, and the MBean is somehow isolated, and cannot get a direct instance of the running ra.
What do you thinks? Should it be like now, each vendors implementing its own solution ?
Brs,
Dominique Gallot
>2. To avoid the situation above, we have to either
allow configs at a
>service level like Dominique said,or only at the root sbb level of a
>given service.
Having two services which are sharing the same
root sbb is also possible.
Some the moment such service have to load it configuration using the ServiceID
as key.
> The problem with having configs at the service level is,
that if there
>is a reusable sbb which is common to 2 services, and we need that sbb
>to read some configurations for correct behavior, then these configs
>will need to be duplicated for both services.
It makes sense, like for the ra. When you are create 2 ra entity, you also need to provide the configuration for both ra.
I also think that it is odd that only the root Sbb is able to access the configuration ( is it what mean configured in this case ? ).
The root sbb, is a sbb like any other one. The is nothing that prevent any sbb from being root of a service.
>This is
because the root sbb of service A can be a child sbb of
>Service B. This kind of parent child relations are allowed.
And nothing prevents the child sbb of service B to be root of service A.
>Hence, i propose that JMX based configuration should
be allowed only
>for root sbbs of a given service. This is a middle path, where neither
>are we allowing any conflicts across services, nor are we duplicating
>data.
I do not see where the conflict is. There is already service dependent information in any sbb ( root or child or neither )
- In the Sbb Context ( getServiceId )
- In the jndi view of the sbb ( ServiceFactory for instance )
Brs,
Dominique
>2. To avoid the situation above, we have to either allow configs at a
>service level like Dominique said,or only at the root sbb level of a
>given service.
Having two services which are sharing the same root sbb is also possible.
Some the moment such service have to load it configuration using the ServiceID as key.
> The problem with having configs at the service level is, that if there
>is a reusable sbb which is common to 2 services, and we need that sbb
>to read some configurations for correct behavior, then these configs
>will need to be duplicated for both services.
It makes sense, like for the ra. When you are create 2 ra entity, you also need to provide the configuration for both ra.
I also think that it is odd that only the root Sbb is able to access the configuration ( is it what mean configured in this case ? ).
The root sbb, is a sbb like any other one. The is nothing that prevent any sbb from being root of a service.
>This is possible theoretically. 2 services can reference a common root-sbb. Even >though this is not the best of designs. It can be used for those services that differ in >event delivery priority and wish to consume the same even in a particular sequence. >In this case, changes made to the configuration properties of this root sbb will be >applicable to both services.
Not only, may you also change the Address Profile Table. By using different “Address Profile Table” you may chose which service handles which call.
The spec clearly states that it is a possible design:
Two Services may reference the same root SBB, but the Services may provide different event dispatch priorities, reference different Address Profile Tables ( and Resource Info Profile Tables deprecated )..
The purpose of such design is clearly to allow the service to behave differently based for example of the MSISDN of the caller, don't you thing ?
>Some properties might be of no use to a given service Y as they may only be >applicable to Service-X.
I am not sure to understand this. If some configuration parameters are not needed for the service Y, we do not need to provide the configuration. It is up to the child Sbb to support non mandatory parameter are not there are not available.
>To avoid this duplication of SMSC properties in the IMS service, I will define IMS->specific properties in the root sbb of the IMSMessagingService while still retaining the >SMSC specific child sbb properties nicely separated from the IMS root-SBB
If only the root Sbb have a view on the configuration, how the child sbb will be able to get the configuration? How will be informed about a configuration changes?
Do not forget that a child Sbb can be connected to an ACI while a root sbb is not anymore, and so will not drive anything anymore.
Based on
you comments, may be configuration properties should allows
- configuration specific for the Sbb
- configuration specific for the Service
- And may be allows to override for a particular Sbb in a Service some configurations parameter
This will add the maximum level of flexibility, the sbb view on the configuration properties would be the merged view of these configurations.
Brs,
Dominique
Not only, may you also change the Address Profile Table. By using different “Address Profile Table” you may chose which service handles which call.
The spec clearly states that it is a possible design:
Two Services may reference the same root SBB, but the Services may provide different event dispatch priorities, reference different Address Profile Tables ( and Resource Info Profile Tables deprecated )..
The purpose of such design is clearly to allow the service to behave differently based for example of the MSISDN of the caller, don't you thing ?
>Some properties might be of no use to a given service Y as they may only be >applicable to Service-X.
I am not sure to understand this. If some configuration parameters are not needed for the service Y, we do not need to provide the configuration. It is up to the child Sbb to support non mandatory parameter are not there are not available.
>To avoid this duplication of SMSC properties in the IMS service, I will define IMS->specific properties in the root sbb of the IMSMessagingService while still retaining the >SMSC specific child sbb properties nicely separated from the IMS root-SBB
If only the root Sbb have a view on the configuration, how the child sbb will be able to get the configuration? How will be informed about a configuration changes?
Do not forget that a child Sbb can be connected to an ACI while a root sbb is not anymore, and so will not drive anything anymore.
Based on you comments, may be configuration properties should allows
- configuration specific for the Sbb
- configuration specific for the Service
- And may be allows to override for a particular Sbb in a Service some configurations parameter
This will add the maximum level of flexibility, the sbb view on the configuration properties would be the merged view of these configurations.
Anyway, an alternative which I prefer, would be to add configuration
related lifecycle callbacks on an extension of the Sbb interface,
similar to ResourceAdaptor, leaving the env entries with the sbb xml
values as the specs define.
Well, why not go beyond this and approach the SBB API with the simpler
to use (and understand) RA API, going completely around JNDI on the
spec, using instead the SbbContext the way ResourceAdaptorContext is
used to retrieve facilities or anything else... But still keeping JNDI
standard ways working...
Not sure about this event, cause events target Sbb entities and this
is more a Sbb object notification.