You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2008/03/08 12:02:33 UTC

Support for binding config in definitions.xml

I'd like to add support for the request/response Connection attributes of
the JMS binding (see lines 119 and 123 of the JMS binding spec) and wondered
if the existing code in the policy framework would be able to support this
today or if I'd need to extend it with some new SPI or something?

These attributes enable defining jms binding configurations in a
definitions.xml file and referring to those from the binding in a composite,
eg:

<composite>
        <service>
            <binding.jms requestConnection="StockQuoteService" />
        </service>
    . . .
</composite>

and

<definitions>
   <binding.jms name="StockQuoteService"
                       initialContextFactory="
org.apache.activemq.jndi.ActiveMQInitialContextFactory"
                       jndiURL="tcp://localhost:61616">
      <destination name="StockQuoteServiceQueue" create="never"/>
      <connectionFactory name="StockQuoteServiceQCF" create="never"/>
   </binding.jms>
</definitions>

Does anyone who know the policy code have any comments, suggestions or
hints?

   ...ant

Re: Support for binding config in definitions.xml

Posted by Venkata Krishnan <fo...@gmail.com>.
Yes that makes clear simple sense.  Really lost it, I must say.  Thanks :)

- Venkat

On Fri, Mar 14, 2008 at 1:19 AM, Jean-Sebastien Delfino <
jsdelfino@apache.org> wrote:

> Venkata Krishnan wrote:
> > Hmm... seems like I am missing something then... alright let me ask you
> this
> > way...
> >
> > if SCADefintions is going to contain a list of JMSBinding definitions..
> > won't in end up something like this...
> >
> > public interface SCADefinitions {
> >  List<Intent> getPolicyIntents();
> >  List<JMSBinding> getJmsBindingDefs();
> > ...
> >
> > }
> >
> > Now to get the class 'JMSBinding' mustn't the definitions module include
> the
> > binding-jms module as dependency ?
> >
>
> No :) like Service lists Bindings (including JMSBindings) without a
> dependency on the JMS binding module.
>
> You just need to define SCADefinitions as follows:
> public interface SCADefinitions {
>  List<Intent> getPolicyIntents();
>   List<Binding> getBindings();
> }
>
> Does this helps?
> --
> Jean-Sebastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Support for binding config in definitions.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Venkata Krishnan wrote:
> Hmm... seems like I am missing something then... alright let me ask you this
> way...
> 
> if SCADefintions is going to contain a list of JMSBinding definitions..
> won't in end up something like this...
> 
> public interface SCADefinitions {
>  List<Intent> getPolicyIntents();
>  List<JMSBinding> getJmsBindingDefs();
> ...
> 
> }
> 
> Now to get the class 'JMSBinding' mustn't the definitions module include the
> binding-jms module as dependency ?
> 

No :) like Service lists Bindings (including JMSBindings) without a 
dependency on the JMS binding module.

You just need to define SCADefinitions as follows:
public interface SCADefinitions {
  List<Intent> getPolicyIntents();
  List<Binding> getBindings();
}

Does this helps?
-- 
Jean-Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Support for binding config in definitions.xml

Posted by Venkata Krishnan <fo...@gmail.com>.
Hmm... seems like I am missing something then... alright let me ask you this
way...

if SCADefintions is going to contain a list of JMSBinding definitions..
won't in end up something like this...

public interface SCADefinitions {
 List<Intent> getPolicyIntents();
 List<JMSBinding> getJmsBindingDefs();
...

}

Now to get the class 'JMSBinding' mustn't the definitions module include the
binding-jms module as dependency ?

- Venkat

On Tue, Mar 11, 2008 at 9:23 PM, Jean-Sebastien Delfino <
jsdelfino@apache.org> wrote:

> Venkata Krishnan wrote:
> > Hi Sebastien,
> >
> > If the SCADefinitions model must hold jms binding definitions, I guess
> it
> > must add the jms binding as a dependency.
>
> Good news, it doesn't need to :)
>
> This is similar to the assembly model holding JMS binding definitions
> for example, without having a dependency on the JMS binding.
>
> Or am I missing something?
> --
> Jean-Sebastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Support for binding config in definitions.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Venkata Krishnan wrote:
> Hi Sebastien,
> 
> If the SCADefinitions model must hold jms binding definitions, I guess it
> must add the jms binding as a dependency. 

Good news, it doesn't need to :)

This is similar to the assembly model holding JMS binding definitions 
for example, without having a dependency on the JMS binding.

Or am I missing something?
-- 
Jean-Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Support for binding config in definitions.xml

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Sebastien,

If the SCADefinitions model must hold jms binding definitions, I guess it
must add the jms binding as a dependency.  On the other hand the jms binding
already brings in the 'definitions' module as a downsteam dependency.

I guess that some cleaning up of the Contribution might ease a bit of
things.  I am wondering if the 'contribution' module should be devoid of any
dependency on definitions, policy and assembly.  I am going to give this a
stab now.

Thanks.

- Venkat

On Tue, Mar 11, 2008 at 5:47 AM, Jean-Sebastien Delfino <
jsdelfino@apache.org> wrote:

> Venkata Krishnan wrote:
> > Hi Ant,
> >
> > I suppose this is going to simply use the StAX processor that we
> currently
> > have for jms binding.  That being the case I see there is going to be
> > circular dependency issues
>
> I may be able to help with the circular dependencies issues, could you
> help me understand what circular dependencies you are seeing?
>
> --
> Jean-Sebastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Support for binding config in definitions.xml

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Venkata Krishnan wrote:
> Hi Ant,
> 
> I suppose this is going to simply use the StAX processor that we currently
> have for jms binding.  That being the case I see there is going to be
> circular dependency issues

I may be able to help with the circular dependencies issues, could you 
help me understand what circular dependencies you are seeing?

-- 
Jean-Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Support for binding config in definitions.xml

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi Ant,

I suppose this is going to simply use the StAX processor that we currently
have for jms binding.  That being the case I see there is going to be
circular dependency issues

If this is sorted out, I guess then the definitions processor will just
about be able to read this instance of binding.jms and add it to the model
resolver.  Then the binding instance that is referring to this in the
composite should resolve this with the model resolver.

Thanks

- Venkat


On Sat, Mar 8, 2008 at 4:32 PM, ant elder <an...@gmail.com> wrote:

> I'd like to add support for the request/response Connection attributes of
> the JMS binding (see lines 119 and 123 of the JMS binding spec) and
> wondered
> if the existing code in the policy framework would be able to support this
> today or if I'd need to extend it with some new SPI or something?
>
> These attributes enable defining jms binding configurations in a
> definitions.xml file and referring to those from the binding in a
> composite,
> eg:
>
> <composite>
>        <service>
>            <binding.jms requestConnection="StockQuoteService" />
>        </service>
>    . . .
> </composite>
>
> and
>
> <definitions>
>   <binding.jms name="StockQuoteService"
>                       initialContextFactory="
> org.apache.activemq.jndi.ActiveMQInitialContextFactory"
>                       jndiURL="tcp://localhost:61616">
>      <destination name="StockQuoteServiceQueue" create="never"/>
>      <connectionFactory name="StockQuoteServiceQCF" create="never"/>
>   </binding.jms>
> </definitions>
>
> Does anyone who know the policy code have any comments, suggestions or
> hints?
>
>   ...ant
>