yes it should. Anyway all will be available in function_stack

On Mon, Nov 9, 2015 at 3:36 PM, Rajjaz Mohammed <raj...@wso2.com> wrote:

> Hi Malaka,
> in case [1] / [2] we can create the parameters Dynamically but Class
> mediator only allow the values inside the class which are already set as
> parameters for that class mediator. class mediator is it support for
> dynamic parameters?
>
> On Wed, Nov 4, 2015 at 10:57 AM, Rajjaz Mohammed <raj...@wso2.com> wrote:
>
>> Hi Malaka,
>> method [2] and [3] are seems to be good and understandable by user so i
>> will try on that method.
>>
>> On Tue, Nov 3, 2015 at 4:29 PM, Kathees Rajendram <kath...@wso2.com>
>> wrote:
>>
>>> Hi Malaka,
>>>
>>> +1 For your approach.
>>>
>>> Thanks,
>>> Kathees
>>>
>>> On Tue, Nov 3, 2015 at 4:16 PM, Malaka Silva <mal...@wso2.com> wrote:
>>>
>>>> Kathees but with this approach the config will be lengthy and will
>>>> become hard to read.
>>>>
>>>> IMO we should have something like [1] or [2]. We can easily iterate
>>>> properties using [3] WDYT?
>>>>
>>>> [1]
>>>> <connector.init>
>>>>     <ejbJNDIKey>jboss</ejbJNDIKey>
>>>>     <ejbJNDIKey.jboss.java.naming.factory.initial>org.jnp.interfaces.
>>>> NamingContextFactory</ejbJNDIKey.jboss.java.naming.factory.initial>
>>>>     <ejbJNDIKey.jboss.java.naming.factory.url.pkgs>org.
>>>> jboss.naming:org.jnp.interfaces</ejbJNDIKey.jboss.java.
>>>> naming.factory.url.pkgs>
>>>>     <ejbJNDIKey.jboss.java.naming.provider.url>jnp://localhost:1099</
>>>> ejbJNDIKey.jboss.java.naming.provider.url>
>>>> </connector.init>
>>>> [2]
>>>> <connector.init>
>>>>     <ejbJNDIKey.java.naming.factory.initial>org.jnp.interfaces.
>>>> NamingContextFactory</ejbJNDIKey.jboss.java.naming.factory.initial>
>>>>     <ejbJNDIKey.java.naming.factory.url.pkgs>org.jboss.naming:org.jnp.
>>>> interfaces</ejbJNDIKey.jboss.java.naming.factory.url.pkgs>
>>>>     <ejbJNDIKey.java.naming.provider.url>jnp://localhost:1099</
>>>> ejbJNDIKey.jboss.java.naming.provider.url>
>>>> </connector.init>
>>>>
>>>> [3]
>>>>     public static Object lookupTemplateParamater(MessageContext ctxt,
>>>> int index) {
>>>>         Stack<TemplateContext> funcStack = (Stack)
>>>> ctxt.getProperty(SynapseConstants.SYNAPSE__FUNCTION__STACK);
>>>>         TemplateContext currentFuncHolder = funcStack.peek();
>>>>         Collection paramList = currentFuncHolder.getParameters();
>>>>         Iterator it = paramList.iterator();
>>>>         int i = 0;
>>>>         while (it.hasNext()) {
>>>>             String param = (String) it.next();
>>>>             if (i == index) {
>>>>                 return param;
>>>>             }
>>>>             i++;
>>>>         }
>>>>         return null;
>>>>     }
>>>>
>>>> On Mon, Nov 2, 2015 at 10:50 PM, Kathees Rajendram <kath...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> In the template,We can use a parameter[1] for the JNDI dynamic
>>>>> properties and input the values with the pattern[2]. The each ejb JNDI
>>>>> properties can be gotten from the parameter and set to the properties[3]
>>>>> using a class mediator.
>>>>>
>>>>> [1]
>>>>> <connector.init>
>>>>>     <ejbJNDIProperties>{$ctx:ejbJNDIProperties}</ejbJNDIProperties>
>>>>> </connector.init>
>>>>>
>>>>> [2]
>>>>> <ejbJNDIProperties>A:B,C:D,E:F</ejbJNDIProperties>
>>>>>
>>>>> [3]
>>>>> Properties props = new Properties();
>>>>> props.put("A" ,"B");
>>>>> props.setProperty("C","D");
>>>>> props.setProperty("E", "F");
>>>>>
>>>>> Thanks,
>>>>> Kathees
>>>>>
>>>>> On Mon, Nov 2, 2015 at 7:23 PM, Malaka Silva <mal...@wso2.com> wrote:
>>>>>
>>>>>> Challenge here is parameters depends on the container rather than the
>>>>>> inbound connector.
>>>>>>
>>>>>> IMO we should follow the same concept followed in ejb mediator.
>>>>>> (Except we need to make it dynamic)
>>>>>>
>>>>>> eg:
>>>>>>
>>>>>> Will have one JNDIID and user can add multiple entries against it.
>>>>>>
>>>>>> inbound.ejb.JNDIID=jboss
>>>>>>
>>>>>> inbound.ejb.JNDIID.jboss.java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
>>>>>>
>>>>>> inbound.ejb.JNDIID.jboss.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
>>>>>> inbound.ejb.JNDIID.jboss.java.naming.provider.url=jnp://localhost:1099
>>>>>>
>>>>>> [1] https://docs.wso2.com/display/ESB490/EJB+Mediator
>>>>>>
>>>>>> On Mon, Nov 2, 2015 at 5:34 PM, Rajjaz Mohammed <raj...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I'm implementing Connector for EJB 2.x. so in order to create JNDI
>>>>>>> properties i need pair of parameters [1]. and the number of parameters 
>>>>>>> also
>>>>>>> depend on EJB server and Version. How can i write the operation fro
>>>>>>> that?(normally our Init methods will be like [2])
>>>>>>>
>>>>>>>
>>>>>>> [1]
>>>>>>> Properties props = new Properties();
>>>>>>> props.put("A" ,"B");
>>>>>>> props.setProperty("C","D");
>>>>>>> props.setProperty("E", "F");
>>>>>>>
>>>>>>>
>>>>>>> [2]
>>>>>>> <connector.init>
>>>>>>>     <A>{$ctx:a}</A>
>>>>>>>     <B>{$ctx:b}</B>
>>>>>>>     <C>{$ctx:c}</C>
>>>>>>>     <D>{$ctx:d}</D>
>>>>>>> </connector.init>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Thank you
>>>>>>> Best Regards
>>>>>>>
>>>>>>> *Rajjaz HM*
>>>>>>> Associate Software Engineer
>>>>>>> WSO2 Inc. <http://wso2.com/>
>>>>>>> lean | enterprise | middleware
>>>>>>> Mobile | +94752833834
>>>>>>> Email   | raj...@wso2.com
>>>>>>> LinkedIn | Blogger | WSO2 Profile
>>>>>>> <http://wso2.com/about/team/mohammer_rajjaz/>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Best Regards,
>>>>>>
>>>>>> Malaka Silva
>>>>>> Senior Tech Lead
>>>>>> M: +94 777 219 791
>>>>>> Tel : 94 11 214 5345
>>>>>> Fax :94 11 2145300
>>>>>> Skype : malaka.sampath.silva
>>>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>>>
>>>>>> WSO2, Inc.
>>>>>> lean . enterprise . middleware
>>>>>> http://www.wso2.com/
>>>>>> http://www.wso2.com/about/team/malaka-silva/
>>>>>> <http://wso2.com/about/team/malaka-silva/>
>>>>>> https://store.wso2.com/store/
>>>>>>
>>>>>> Save a tree -Conserve nature & Save the world for your future. Print
>>>>>> this email only if it is absolutely necessary.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Kathees
>>>>> Software Engineer,
>>>>> email: kath...@wso2.com
>>>>> mobile: +94772596173
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Best Regards,
>>>>
>>>> Malaka Silva
>>>> Senior Tech Lead
>>>> M: +94 777 219 791
>>>> Tel : 94 11 214 5345
>>>> Fax :94 11 2145300
>>>> Skype : malaka.sampath.silva
>>>> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
>>>> Blog : http://mrmalakasilva.blogspot.com/
>>>>
>>>> WSO2, Inc.
>>>> lean . enterprise . middleware
>>>> http://www.wso2.com/
>>>> http://www.wso2.com/about/team/malaka-silva/
>>>> <http://wso2.com/about/team/malaka-silva/>
>>>> https://store.wso2.com/store/
>>>>
>>>> Save a tree -Conserve nature & Save the world for your future. Print
>>>> this email only if it is absolutely necessary.
>>>>
>>>
>>>
>>>
>>> --
>>> Kathees
>>> Software Engineer,
>>> email: kath...@wso2.com
>>> mobile: +94772596173
>>>
>>
>>
>>
>> --
>> Thank you
>> Best Regards
>>
>> *Rajjaz HM*
>> Associate Software Engineer
>> WSO2 Inc. <http://wso2.com/>
>> lean | enterprise | middleware
>> Mobile | +94752833834
>> Email   | raj...@wso2.com
>> LinkedIn | Blogger | WSO2 Profile
>> <http://wso2.com/about/team/mohammer_rajjaz/>
>>
>
>
>
> --
> Thank you
> Best Regards
>
> *Rajjaz HM*
> Associate Software Engineer
> WSO2 Inc. <http://wso2.com/>
> lean | enterprise | middleware
> Mobile | +94752833834
> Email   | raj...@wso2.com
> LinkedIn | Blogger | WSO2 Profile
> <http://wso2.com/about/team/mohammer_rajjaz/>
>



-- 

Best Regards,

Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>
https://store.wso2.com/store/

Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to