Hi Godwin,

For now we only have the option I suggested above and yes supporting
expressions as class mediator parameters is a good improvement we can do in
a future release.

Thanks.

On Thu, Jun 2, 2016 at 7:31 PM, Godwin Shrimal <[email protected]> wrote:

> Hi Kathees/Isuru,
>
> I think we can solve the issue using property straightforward. But still
> there are good use cases which need to pass dynamic values to class
> mediator may be we can improve in future release. Passing parameter to a
> class mediator is more readable for developers/users from API perception
> other than reading a property inside it.
>
>
> Thanks
> Godwin
>
>
> On Thu, Jun 2, 2016 at 12:54 AM, Kathees Rajendram <[email protected]>
> wrote:
>
>> Hi Godwin/Isuru,
>>
>> This may not be a good approach. You can define a static property. In
>> static property you can dynamically assign dynamic properties and values as
>> key value pairs with the patterns (dynamicProperty1: value1,
>> dynamicProperty2: value2, etc.).
>>
>> <staticProperty>dynamicProperty1: value1, dynamicProperty2:
>> value2</staticProperty>
>>
>> In the class mediator, you can read the static property and you need to
>> write a login to get each values of the dynamic properties.
>> Thanks,
>> Kathees
>>
>> On Thu, Jun 2, 2016 at 10:46 AM, Isuru Udana <[email protected]> wrote:
>>
>>> Hi Rajjaz,
>>>
>>> Godwin is asking about class mediators not connectors.
>>>
>>>
>>>
>>> On Thu, Jun 2, 2016 at 10:38 AM, Rajjaz Mohammed <[email protected]>
>>> wrote:
>>>
>>>> Hi Godwin,
>>>> You can receive dynamic values in class level without set in the
>>>> property configuration.
>>>>
>>>> for example:
>>>> <ejbconnector.init>
>>>>     <key>raj</key>
>>>>     <raj.java.naming.factory.initial
>>>> >com.sun.enterprise.naming.SerialInitContextFactory</
>>>> raj.java.naming.factory.initial>
>>>>     <raj.org.omg.CORBA.ORBInitialHost>localhost</
>>>> raj.org.omg.CORBA.ORBInitialHost>
>>>>     <raj.org.omg.CORBA.ORBInitialPort>3700</
>>>> raj.org.omg.CORBA.ORBInitialPort>
>>>> </ejbconnector.init>
>>>>
>>>> these values are dynamic values so we can receive these values in code
>>>> level without set property[1].
>>>>
>>>> [1]
>>>> https://github.com/wso2-extensions/esb-connector-ejb2.0/blob/master/src/main/java/org/wso2/carbon/custom/connector/EJBUtil.java#L131
>>>>
>>>>
>>>>
>>>> On Thu, Jun 2, 2016 at 9:09 AM, Godwin Shrimal <[email protected]> wrote:
>>>>
>>>>> Hi Isuru,
>>>>>
>>>>> Thanks for quick response, I'll proceed with by setting property.
>>>>>
>>>>>
>>>>> Thanks
>>>>> Godwin
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Jun 1, 2016 at 10:32 PM, Isuru Udana <[email protected]> wrote:
>>>>>
>>>>>> Hi Godwin,
>>>>>>
>>>>>> It is not possible to pass dynamic values using the property
>>>>>> configuration element. It only support static values.
>>>>>>
>>>>>> The only option is to set some property using the property mediator
>>>>>> and within the class mediator code read that property using
>>>>>> synCtx.getProperty('prop_name_here')
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> On Thu, Jun 2, 2016 at 8:54 AM, Godwin Shrimal <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> How can we pass dynamic values to class mediator ?, if we try to do
>>>>>>> as below it give a error *A Class mediator property must specify
>>>>>>> name and value attributes, or a name and a child XML fragment*
>>>>>>>
>>>>>>> <class name="com.wso2.TestClass">
>>>>>>>             <property name="test" expression="get-property('test')"/>
>>>>>>> </class>
>>>>>>>
>>>>>>> How can we achieve this ?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Godwin
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Godwin Amila Shrimal*
>>>>>>> Senior Software Engineer
>>>>>>> WSO2 Inc.; http://wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>>
>>>>>>> mobile: *+94772264165*
>>>>>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>>>>>> twitter: https://twitter.com/godwinamila
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Isuru Udana*
>>>>>> Technical Lead
>>>>>> WSO2 Inc.; http://wso2.com
>>>>>> email: [email protected] cell: +94 77 3791887
>>>>>> blog: http://mytecheye.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Godwin Amila Shrimal*
>>>>> Senior Software Engineer
>>>>> WSO2 Inc.; http://wso2.com
>>>>> lean.enterprise.middleware
>>>>>
>>>>> mobile: *+94772264165*
>>>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>>>> twitter: https://twitter.com/godwinamila
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thank you
>>>> Best Regards
>>>>
>>>> *Rajjaz HM*
>>>> Associate Software Engineer
>>>> Platform Extension Team
>>>> WSO2 Inc. <http://wso2.com/>
>>>> lean | enterprise | middleware
>>>> Mobile | +94752833834|+94777226874
>>>> Email   | [email protected]
>>>> LinkedIn <https://lk.linkedin.com/in/hmohammedrajjaz> | Blogger
>>>> <http://wso2experience.blogspot.com/> | WSO2 Profile
>>>> <http://wso2.com/about/team/mohammer-rajjaz/>
>>>>
>>>
>>>
>>>
>>> --
>>> *Isuru Udana*
>>> Technical Lead
>>> WSO2 Inc.; http://wso2.com
>>> email: [email protected] cell: +94 77 3791887
>>> blog: http://mytecheye.blogspot.com/
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Kathees
>> Software Engineer,
>> email: [email protected]
>> mobile: +94772596173
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Godwin Amila Shrimal*
> Senior Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
> twitter: https://twitter.com/godwinamila
>



-- 
*Isuru Udana*
Technical Lead
WSO2 Inc.; http://wso2.com
email: [email protected] cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to