You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Ron Gavlin (JIRA)" <ji...@apache.org> on 2008/04/07 20:14:33 UTC

[jira] Created: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
--------------------------------------------------------------------------------------------------------------------

                 Key: SM-1305
                 URL: https://issues.apache.org/activemq/browse/SM-1305
             Project: ServiceMix
          Issue Type: New Feature
          Components: servicemix-bean
    Affects Versions: 3.2.1
            Reporter: Ron Gavlin


The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 

I suggest the following class names for the proposed two base classes:

1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"

2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1305:
--------------------------------

    Affects Version/s: servicemix-bean-2008.01
                           (was: 3.2.1)

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: servicemix-bean-2008.01
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42090#action_42090 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

I have a SMX-Bean Pojo that requires a StoreFactory & Store. When the Pojo is initialized, I would like to include code similar to that listed below:

 if (store == null) {
            if (storeFactory == null) {
                storeFactory = new MemoryStoreFactory();
            }
            store = storeFactory.open(getServiceEndpoint().getKey());
        }
For this use case, it would be convenient if a ServiceEndpoint could be dependency-injected into my Pojo using @Resource in the same way the ComponentContext & DeliveryChannel are dependency-injected. This would require a few line change to org.apache.servicemix.bean.BeanEndpoint.injectBean(final Object target).

Also, are there other general SMX-Bean use cases where a StoreFactory and Store might be needed? If so, would it make sense to expose these in the SMX-Bean schema?

Let me know..

- Ron


> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42273#action_42273 ] 

rgavlin edited comment on SM-1305 at 4/14/08 4:51 AM:
---------------------------------------------------------

Thanks. So, without looking in detail at the currently provided patch, do you agree in principal with the approach/changes Andrea and I agreed to in https://issues.apache.org/activemq/browse/SM-1305?focusedCommentId=42210#action_42210 ?

- Ron

      was (Author: rgavlin):
    Thanks. So, without looking in detail at the currently provided patch, do you agree in principal with the approach/changes Andrea and I agreed to in https://issues.apache.org/activemq/browse/SM-1305?focusedCommentId=42210#action_42210?

- Ron
  
> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42280#action_42280 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

I totally agree with points 1 and 2.
On point 3, I'm not sure what these getters would be used for (getService / getEndpoint).  Are you thinking about the target endpoint or the endpoint using that bean ?  In both cases, I think this won't work well.
A few more comments on the patch:
  * I would also get rid of the isExchangeWithXxxOkay, because they won't be used at all.
  * for the transformer support, in case an InOnly exchange is received, the transformed response will be sent also as an InOnly, but currently, no target is specified.  I would use the exchange-target element of servicemix-eip or something along those lines to specify the target.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42306#action_42306 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

You're right about the classloader issues, however I'm not really keen on creating a jar just for these few classes.  Your issue is not really a common use case.  Why don't you package this jar into your SU instead, this does not mean you can not create a project for your classes that are shared amongst different SUs.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Zoppello updated SM-1305:
--------------------------------

    Attachment: lw2smbean.zip

Update the contributed file

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42290#action_42290 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

I see.  It looks a valid use case.  What about being able to inject a reference to the servicemix-bean endpoint class instead of relying on a not so clean cast to EndpointComponentContext ?  It would have the same effect, but I suppose it's a bit more generic.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42297#action_42297 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

Yeah, org.apache.servicemix.bean.support.BeanExchangeTarget looks good.  We could even go for  "org.apache.servicemix.bean.support.ExchangeTarget"  given that it would not conflict with the existing annotation as they are in different packages.    Keeping the same xbean annotation "exchange-target" is more important so that we are still consistent with servicemix-eip.  The actual name of the class does not matter so much.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Gavlin updated SM-1305:
---------------------------

    Comment: was deleted

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1305:
--------------------------------

    Affects Version/s:     (was: servicemix-bean-2008.01)
        Fix Version/s: servicemix-bean-2008.01
                           (was: 3.3)

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: servicemix-bean-2008.01
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42226#action_42226 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

Guillaume,

Please provide guidance here. Do you prefer helper classes which closely mirror the original lw-container classes or would you prefer we diverge from the original classes and focus on optimizing the SMX-Bean developer experience? You can probably answer this question without even taking a detailed look at the provided patch. Your timely answer is greatly appreciated.

Thanks,

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Roger Joelsson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42777#action_42777 ] 

Roger Joelsson commented on SM-1305:
------------------------------------

Hi,
I'm trying out these classes for serious production use. So far it seems to work, or do you know of any issues that might make production use not a good idea?
Regards,
Roger


> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Zoppello updated SM-1305:
--------------------------------

    Attachment: lw2smbean.zip

First attempt to port the lw container utilities classes to be usable in sm bean.

I've removed from the original code the part that were using component context and lifecycle method, beacuse i think this is managed by SM Bean ( Is this OK ??? )

The only doubt about this implementation  is that in the old one
lw-container i was usually using the destinationService attribute when configuring endpoints on "servicemix.xml" file.

What about sm-bean, which is the best solution here???

All comments are welcome.

Andrea

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42295#action_42295 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

I agree this could be a bit confusing .   However, adding the same interface with a different name (wrt to servicemix-eip) may be even more confusing, so I'd rather have a @ExchangeTarget along with an <bean:exchange-target/>.  We can just copy the ExchangeTarget class from servicemix-eip into servicemix-bean (we need to find another name), as we can not share the same class (xbean needs the source code for its annotation processing and thus can not be used in different projects).

Using a set of properties (endpoint/operation/service/uri) is not the best solution imho, because if someone want to implement a router, it will have to define several targets, and a single set of properties would not work.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42291#action_42291 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

Are you suggesting adding a method getBeanEndpoint() to BeanSupport.java and including @Resource private BeanEndpoint beanEndpoint; to populate it? In addition, BeanEndpoint.java's injectBean() method would be modified as follows:

protected void injectBean(final Object target) {
...
                if (f.getAnnotation(Resource.class) != null) {
...
                    } else if (BeanEndpoint.class.isAssignableFrom(f.getType())) {
                        ReflectionUtils.setField(f, target, BeanEndpoint.this);
                    }
                }
...
    }

Is this correct? 

Thanks,

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42292#action_42292 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

Yes, that's what I was thinking about.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42272#action_42272 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

This is a good question.  As we won't be able to have a 100% compatibility (the activationSpec does not exist in servicemix-bean), I don't think we need to have a direct portability.  However, we should make it easy enough if possible.
But i would definitely go for servicemix-bean developer experience improvement .

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42304#action_42304 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

I have some SMX-Bean classes that I plan to deploy in a jar in SMX_HOME/lib. I would like these classes to extend the new base classes being defined here. I presumed these base classes would be included in servicemix-bean-3.3.1-installer.zip!/lib/servicemix-bean-3.2.x.jar. 

Am I correct that I will run into classloader issues with my classes appearing in a SMX_HOME/lib jar extending base classes that appear in the servicemix-bean-installer.zip jar? If so, should these SMX-Bean base classes be included in a different project/jar?

Let me know.

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Gianfranco Boccalon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42346#action_42346 ] 

Gianfranco Boccalon commented on SM-1305:
-----------------------------------------

I attach an implementation of the BeanSupport and BeanEndPoint classes provided by Ron Gavlin.
Based on these classes we provide also a SynchronizerBean class (always provided by Ron Gavlin) derived from another my class that was implemented as lightweight bean.
This class is a possible solution to the issue SM-454, so I will attach to that issue.


> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Gianfranco Boccalon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianfranco Boccalon updated SM-1305:
------------------------------------

    Attachment: BeanSupport.zip

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43554#action_43554 ] 

Guillaume Nodet commented on SM-1305:
-------------------------------------

What about adding a getter / setter on the TransformBeanComponent for the target field ?

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: 3.3
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42294#action_42294 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

I am wondering how best to associate an eip-like exchange-target with SMX-Bean, given the presence of the existing interface, org.apache.servicemix.bean.ExchangeTarget. 

Is it appropriate to introduce a new xbean-based org.apache.servicemix.bean.support.ExchangeTarget class or would this introduce too much confusion between this new class and the existing interface of the same name but in a different package? 

Or should individual targetEndpoint, targetInterface, targetOperation, targetService, targetUri properties be added to BeanEndpoint.java and these used to define the exchange target?

Your feedback is appreciated.

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1305:
--------------------------------

    Fix Version/s: 3.3

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: 3.3, servicemix-bean-2008.01
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Zoppello updated SM-1305:
--------------------------------

    Attachment:     (was: lw2smbean.zip)

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1305:
--------------------------------

    Patch Info: [Patch Available]

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43494#action_43494 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

The committed TransformBeanSupport class currently includes the following member variable declaration: 

@Resource 
private ExchangeTarget target;

Also, its onMessageExchange() method includes the following code:

if (isInAndOut(exchange)) {
                out = exchange.createMessage();
            } else {
            	if (target == null) {
                    throw new IllegalStateException("An IN-ONLY TransformBean has no Target specified");
            	}
...
}

Given that the modified version of BeanEndpoint was not committed, what is the preferred way to inject the "target" into TransformBeans that support IN-ONLY MEPs?

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: 3.3
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42304#action_42304 ] 

rgavlin edited comment on SM-1305 at 4/15/08 9:56 AM:
---------------------------------------------------------

I have some SMX-Bean classes that I plan to deploy in a jar in SMX_HOME/lib. I would like these classes to extend the new base classes being defined here. I presumed these base classes would be included in servicemix-bean-3.3.1-installer.zip!/lib/servicemix-bean-3.2.x.jar. 

Am I correct that I will run into classloader issues with my classes appearing in a SMX_HOME/lib jar extending base classes that appear in the servicemix-bean-installer.zip jar? If so, should these SMX-Bean base classes be included/packaged in a different project/jar?

Let me know.

- Ron

      was (Author: rgavlin):
    I have some SMX-Bean classes that I plan to deploy in a jar in SMX_HOME/lib. I would like these classes to extend the new base classes being defined here. I presumed these base classes would be included in servicemix-bean-3.3.1-installer.zip!/lib/servicemix-bean-3.2.x.jar. 

Am I correct that I will run into classloader issues with my classes appearing in a SMX_HOME/lib jar extending base classes that appear in the servicemix-bean-installer.zip jar? If so, should these SMX-Bean base classes be included in a different project/jar?

Let me know.

- Ron
  
> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42273#action_42273 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

Thanks. So, without looking in detail at the currently provided patch, do you agree in principal with the approach/changes Andrea and I agreed to in https://issues.apache.org/activemq/browse/SM-1305?focusedCommentId=42210#action_42210?

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated SM-1305:
--------------------------------

    Fix Version/s: 3.2.4

Adding         src/main/java/org/apache/servicemix/bean/support/BeanSupport.java
Adding         src/main/java/org/apache/servicemix/bean/support/ExchangeTarget.java
Adding         src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Transmitting file data ...
Committed revision 711672.

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: servicemix-bean-2008.01, 3.3, 3.2.4
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42208#action_42208 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

1. Your patch is true to the original lw-container code which makes SMX maintenance a bit easier. However, I think these helper classes should primarily focus on making it easier for developers to write servicemix-beans. I can't think of a use case in which someone would use BeanPojoSupport directly. So, separating BeanPojoSupport from BeanComponentSupport, from my perspective, just adds needless complication. I would suggest these be consolidated into one class. 

2. The presence of "Component" in the name seems like a legacy lw-container holdover so I would recommend removing it from the names of both classes. 

3. It would also be useful to include "public QName getService()"  and "public String getEndpoint()" helper methods in helper class Bean(Component)Support.java. 

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved SM-1305.
---------------------------------

         Assignee: Guillaume Nodet
    Fix Version/s: 3.3
       Resolution: Fixed

Adding         servicemix-bean/src/main/java/org/apache/servicemix/bean/support/BeanSupport.java
Adding         servicemix-bean/src/main/java/org/apache/servicemix/bean/support/ExchangeTarget.java
Adding         servicemix-bean/src/main/java/org/apache/servicemix/bean/support/TransformBeanSupport.java
Transmitting file data ...
Committed revision 663580.

I've not included the modified version of BeanEndpoint because I don't think the endpoint can have a single ExchangeTarget, so I'd rather have it configured on the pojo (or use the @ExchangeTarget annotation).

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>            Assignee: Guillaume Nodet
>             Fix For: 3.3
>
>         Attachments: BeanSupport.zip, lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42296#action_42296 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

What do you think about naming the SMX-Bean exchange-target class "org.apache.servicemix.bean.support.BeanExchangeTarget"? The package naming scheme is similar to "org.apache.servicemix.eip.support.ExchangeTarget" and the class has a different name from "org.apache.servicemix.bean.ExchangeTarget". What do you think? Any alternatives? 

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42298#action_42298 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

org.apache.servicemix.bean.support.ExchangeTarget sounds good to me.

Thanks,

- Ron

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42218#action_42218 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

Great, it sounds like we are in agreement. 

If you would prefer to wait for Guillaume's feedback before performing this modification, that is ok with me. OTOH, Guillaume might appreciate the opportunity to review our agreed-upon version. It is up to you.

Thanks,

- Ron



> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Andrea Zoppello (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42210#action_42210 ] 

Andrea Zoppello commented on SM-1305:
-------------------------------------

1) I agree to unify BeanPojoSupport and BeanComponentSupport

2) Agree

3) Agree

Definitely we could have:

- BeanSupport.java  ( Unification of the previous BeanPojoSupport and BeanComponentSupport )
- Here we could add the two method of your point 3

- TransformBeanSupport ( Rename of the old one BeanTransformComponentSupport )

BTW It seem we agree, but i still prefer to wait Guillaume opinion before doing this modification.

Andrea

> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SM-1305) Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)

Posted by "Ron Gavlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42282#action_42282 ] 

Ron Gavlin commented on SM-1305:
--------------------------------

Thanks.

As far as getService() / getEndpoint() are concerned, here are my proposed implementations that would appear in BeanSupport.java:

protected QName getService() {
		QName service = null;
		ComponentContext context = getComponentContext();
		if (context != null && context instanceof EndpointComponentContext) {
			EndpointComponentContext endpointContext = (EndpointComponentContext) context;
			service = endpointContext.getEndpoint().getService();
		}
		return service;
	}

protected String getEndpoint() {
		String endpoint = null;
		ComponentContext context = getComponentContext();
		if (context != null && context instanceof EndpointComponentContext) {
			EndpointComponentContext endpointContext = (EndpointComponentContext) context;
			endpoint = endpointContext.getEndpoint().getEndpoint();
		}
		return endpoint;
	}

As far as a use case for getService() and getEndpoint() are concerned, take one of my SMX-Beans that includes the method below. This SMX-Bean requires standard SMX StoreFactory/Store implementations. The method uses getService() and getEndpoint() for its implementation. Does this make sense? 

@PostConstruct
	public void init() throws IOException {
		if (messageExchangeStore == null) {
			if (storeFactory == null) {
				storeFactory = new MemoryStoreFactory();
			}
			messageExchangeStore = storeFactory.open(getService().toString()
					+ getEndpoint());
		}
	}

Also, within the TransformBeanSupport, supporting a standard eip-like exchange-target element makes sense.

Thanks,

- Ron



> Provide convenient base classes to simplify servicemix-bean component development (including IN-only MEP Transforms)
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-1305
>                 URL: https://issues.apache.org/activemq/browse/SM-1305
>             Project: ServiceMix
>          Issue Type: New Feature
>          Components: servicemix-bean
>    Affects Versions: 3.2.1
>            Reporter: Ron Gavlin
>         Attachments: lw2smbean.zip
>
>
> The deprecated, LightWeight container provided a convenient base class, TransformComponentSupport, that made it easy for non-JBI experts to write simple transforms in Java. In order to accomplish the same task with servicemix-bean, a developer must have have in-depth, JBI knowledge. A helper class or base class should be created to make it easier for developers to write transforms using servicemix-bean. A base class would also be useful to ease the implementation of non-Transform servicemix-beans. 
> I suggest the following class names for the proposed two base classes:
> 1. org.apache.servicemix.bean.support.BeanSupport.java - this class provides servicemix-bean specific functionality currently offered by the combination of "org.apache.servicemix.components.util.PojoSupport.java" and "org.apache.servicemix.components.util.ComponentSupport.java"
> 2. org.apache.servicemix.bean.support.TransformBeanSupport.java - this class extends "org.apache.servicemix.bean.support.BeanSupport.java" (above), implements MessageExchangeListener, and provides servicemix-bean specific functionality currently offered by "org.apache.servicemix.components.util.TransformComponentSupport.java"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.