2 Replies Latest reply on Oct 29, 2008 4:16 PM by Andrew Rubinger

    [JBMETA-119] LocalBindingMetaData

    Andrew Rubinger Master

       

      "emuckenhuber" wrote:
      Do you need a LocalBindingMetaData similar to the Remote one or is something like this also ok ?

      String localBinding;


      Let's add the LocalBindingMetaData for 2 reasons:

      1) If we decide to add @LocalBinding(someNewAttribute="Whatever") in the future
      2) Keeps the API uniform, easy-to-read (ie. matches RemoteBindingMetaData)

      "emuckenhuber" wrote:
      or would you prefer a List<String> localBindings


      At the moment we allow for explicit declaration of only one local binding; my opinion is that this should be changed to support many.

      If you make it look the same as RemoteBindingsMetaData does, that paves the way for @LocalBindings({}) looking forward.

      I suppose either approach is valid for the time being. One might argue that it's silly to put in support for unimplemented features.

      "emuckenhuber" wrote:
      then a postprocessing - setLocalJndiName


      I'm no longer sure this is the right approach. Again we're mixing managed properties of the object model with logic that belongs elsewhere (ie a JNDI Binding Policy or Decorator).

      S,
      ALR

        • 1. Re: [JBMETA-119] LocalBindingMetaData
          Emanuel Muckenhuber Master

          I guess it also should be possible to define a local-binding over the xml too?

          "ALRubinger" wrote:

          I'm no longer sure this is the right approach. Again we're mixing managed properties of the object model with logic that belongs elsewhere (ie a JNDI Binding Policy or Decorator).


          Agreed, i'll leave it up to you then to do something with the metadata :)

          • 2. Re: [JBMETA-119] LocalBindingMetaData
            Andrew Rubinger Master

             

            "emuckenhuber" wrote:
            I guess it also should be possible to define a local-binding over the xml too?


            Yep, something in the XSD under session-beanType like:

            <xsd:element name="local-binding" type="jboss:local-bindingType" minOccurs="0" maxOccurs="1"/>


            ...of course that "maxOccurs" depends on what you want to do re: handling more than one binding. :)

            S,
            ALR