Re: [Dev] Get Super tenant admin email

2017-07-10 Thread Sudharma Subasinghe
We cannot obtain super tenant's email address via TenantManager as it is
not set.

On Tue, Jul 11, 2017 at 10:47 AM, Ayesha Dissanayaka 
wrote:

> Hi Godwin,
>
> You can admin username from carbon context when in super-tenant flow.
>
> PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().
> getRealmConfiguration()
> .getAdminUserName()
>
> Thanks!
> -Ayesha
>
>
> On Tue, Jul 11, 2017 at 7:35 AM, Godwin Shrimal  wrote:
>
>> Hi All,
>>
>> We cannot get super tenant information via TenantManager. Below code
>> returns null, So how can we get the super tenant admin's email address ?
>>
>> *tenantManager.getTenant(-1234)*
>>
>>
>> Thanks
>> Godwin
>>
>> --
>> *Godwin Amila Shrimal*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D *
>> twitter: https://twitter.com/godwinamila
>> 
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Ayesha Dissanayaka*
> Senior Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palm grove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Sudharma Subasinghe,
Software Engineer,
WSO2 Inc.
Email: sudhar...@wso2.com 
Mobile : +94 710 565 157 <%2B94%20718%20210%20200>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Get Super tenant admin email

2017-07-10 Thread Ayesha Dissanayaka
Hi Godwin,

You can admin username from carbon context when in super-tenant flow.

PrivilegedCarbonContext.getThreadLocalCarbonContext().getUserRealm().getRealmConfiguration()
.getAdminUserName()

Thanks!
-Ayesha


On Tue, Jul 11, 2017 at 7:35 AM, Godwin Shrimal  wrote:

> Hi All,
>
> We cannot get super tenant information via TenantManager. Below code
> returns null, So how can we get the super tenant admin's email address ?
>
> *tenantManager.getTenant(-1234)*
>
>
> Thanks
> Godwin
>
> --
> *Godwin Amila Shrimal*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
> 
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Ayesha Dissanayaka*
Senior Software Engineer,
WSO2, Inc : http://wso2.com

20, Palm grove Avenue, Colombo 3
E-Mail: aye...@wso2.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Authentication and Authorization

2017-07-10 Thread Lipsa Pradhan
Hello All,

How can I authorize and authenticate different users in WSO2 Enterprise
Integrator?

Actually I want to assign task to different users via a BPEL or a BPMN, but
those users must log in using their credentials and must obtain an access
token to access their tasks.

Is it possible to do so?

Thanks in Advance!

Regards
Lipsa Pradhan
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Should we refactor CarbonMessage

2017-07-10 Thread Shafreen Anfar
On Tue, Jul 11, 2017 at 8:47 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Shafreen,
>
> IMHO it would be much easier if that functionality os provided by the
> messaging layer. Otherwise, each and every MessageProcessors need to
> implement that logic. Therefore wouldn't it be nice to implement the
> getCopyOfFullMessageBody[1] method from carbon-messaging?
>

Understood :). I suppose it is sort of a common requirement for all the
messageProcessors. Hence, it is good to have it in CarbonMessage itself.
Let's see what other's opinion as well.


>
> [1] - https://github.com/wso2/carbon-messaging/blob/master/
> components/src/main/java/org/wso2/carbon/messaging/CarbonMessage.java#L223
>
> Thanks
> Thusitha
>
> On Mon, Jul 10, 2017 at 4:35 PM, Shafreen Anfar  wrote:
>
>> Hi Thusitha,
>>
>> On Mon, Jul 10, 2017 at 11:37 AM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi Shafreen,
>>>
>>> +1 for the proposed implementation. In MSF4J point of view, we are
>>> wrapping the carbon message with MSF4J Request/Response objects and use the
>>> underlying messaging methods provided to retrieve/write back data in/out/.
>>>
>>> Are we considering a getting a message body clone with the re
>>> architrecture?
>>>
>>
>> Isn't cloning of the message body should be done using some util method
>> at MessageProcessor level ?
>>
>>
>>>
>>> Thanks
>>> Thusitha
>>>
>>> On Fri, Jul 7, 2017 at 6:18 PM, Shafreen Anfar 
>>> wrote:
>>>
 Hi All,

 In addition to considering all the facts presented above, I also talked
 to each transport developer who actually came up with different types of
 carbon-messages. Based on those discussion I came up with below design.

 Originally, CarbonMessage is designed to carry data between two
 components and I believe it should stay the same. However, it should be
 able carry data relevant to each component. For instance, in JMS case, it
 should be able carry a map for map messages where as in websockets case it
 should be able carry a string.

 Therefore, I thought of creating a CarbonMessage with java generics.
 Then we can extend it accordingly.

 ​

 As you can see above, we can provide a DefaultCarbonMessage
 implementation. However, in HTTP case, we have done some specific
 implementation to optimize the transport. At the moment those logic also
 resides inside the abstract CarbonMessage. With the new design we can
 simply move them to something like ByteCarbonMessage.

 I believe with this design we can have proper abstraction while
 reducing number of redundant carbon messages.


 On Thu, Jul 6, 2017 at 12:16 AM, Chanaka Fernando 
 wrote:

> It seems there is room to improve the current CarbonMessage
> implementation. Following are few main areas where we can improve its
> functionality.
>
>- At the moment there are too many ways to get the message body
>from the CarbonMessage
>- getMessageBody()
>   - getInputStream() - This is a http specific impl.
>   - getMessageDateSource()
>
> The above 3 methods serve 3 different purposes. This design has been
> done mainly thinking about the HTTP messages. In a message passthrough
> scenario, content is kept in the content queue and accessed as a stream.
> When the message content is accessed within intermediate layer (like
> ballerina), it will be retrieved through messageDataSource.
>
>- There are too many types of CarbonMessages in carbon-messaging
>that are only used by a specific transport implementation
>   - BinaryCarbonMessage
>   - ControlCarbonMessage
>   - DefaultCarbonMessage
>   - MapCarbonMessage
>   - SerializableCarbonMessage
>   - StatusCarbonMessage
>   - StreamingCarbonMessage
>   - TextCarbonMessage
>
>
>- Most of above CarbonMessages do not adhere to the contract that
>is imposed by the CarbonMessage interface.
>
> I agree on the fact that we need to refactor these different types of
> CarbonMessage implementations. I think what Asitha suggested is a viable
> approach to handle different types of messages.
>
> Considering these facts, I believe we should refactor CarbonMessage
> before others starting using it in their implementations. Please let us
> know your thoughts as well :)
>
> +1 for refactoring the carbon message and relevant implementations to
> support non-HTTP use cases. In the meantime, we should support HTTP
> messaging in an efficient manner since that will be the mostly used
> scenario of ballerina.
>
> On Wed, Jul 5, 2017 at 4:55 PM, Irunika Weeraratne 
> wrote:
>
>> Hi Shafreen and Asitha,
>> In the first place, they were introduced after a long discussion in
>> WebSocket scenarios. This was b

Re: [Dev] Identity Server 5.3.0 MSSQL script doesn't execute successfully

2017-07-10 Thread Isura Karunaratne
On Mon, Jul 10, 2017 at 8:36 PM, Johann Nallathamby  wrote:

> Hi IAM Team,
>
> Please check on $subject and fix on IS 5.4.0. This is an L1.
>

We will fix this in IS 5.4.0

>
> [1] https://wso2.org/jira/browse/IDENTITY-6130
>
> Regards,
> Johann.
>
> --
> Thanks & Regards,
>
> *Johann Dilantha Nallathamby*
> Senior Technical Lead - WSO2 Identity Server
> Governance technologies Team
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - *+9476950*
> Blog - *http://nallaa.wordpress.com *
>



-- 

*Isura Dilhara Karunaratne*
Senior Software Engineer | WSO2
Email: is...@wso2.com
Mob : +94 772 254 810
Blog : http://isurad.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Should we refactor CarbonMessage

2017-07-10 Thread Thusitha Thilina Dayaratne
Hi Shafreen,

IMHO it would be much easier if that functionality os provided by the
messaging layer. Otherwise, each and every MessageProcessors need to
implement that logic. Therefore wouldn't it be nice to implement the
getCopyOfFullMessageBody[1] method from carbon-messaging?

[1] -
https://github.com/wso2/carbon-messaging/blob/master/components/src/main/java/org/wso2/carbon/messaging/CarbonMessage.java#L223

Thanks
Thusitha

On Mon, Jul 10, 2017 at 4:35 PM, Shafreen Anfar  wrote:

> Hi Thusitha,
>
> On Mon, Jul 10, 2017 at 11:37 AM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi Shafreen,
>>
>> +1 for the proposed implementation. In MSF4J point of view, we are
>> wrapping the carbon message with MSF4J Request/Response objects and use the
>> underlying messaging methods provided to retrieve/write back data in/out/.
>>
>> Are we considering a getting a message body clone with the re
>> architrecture?
>>
>
> Isn't cloning of the message body should be done using some util method at
> MessageProcessor level ?
>
>
>>
>> Thanks
>> Thusitha
>>
>> On Fri, Jul 7, 2017 at 6:18 PM, Shafreen Anfar  wrote:
>>
>>> Hi All,
>>>
>>> In addition to considering all the facts presented above, I also talked
>>> to each transport developer who actually came up with different types of
>>> carbon-messages. Based on those discussion I came up with below design.
>>>
>>> Originally, CarbonMessage is designed to carry data between two
>>> components and I believe it should stay the same. However, it should be
>>> able carry data relevant to each component. For instance, in JMS case, it
>>> should be able carry a map for map messages where as in websockets case it
>>> should be able carry a string.
>>>
>>> Therefore, I thought of creating a CarbonMessage with java generics.
>>> Then we can extend it accordingly.
>>>
>>> ​
>>>
>>> As you can see above, we can provide a DefaultCarbonMessage
>>> implementation. However, in HTTP case, we have done some specific
>>> implementation to optimize the transport. At the moment those logic also
>>> resides inside the abstract CarbonMessage. With the new design we can
>>> simply move them to something like ByteCarbonMessage.
>>>
>>> I believe with this design we can have proper abstraction while reducing
>>> number of redundant carbon messages.
>>>
>>>
>>> On Thu, Jul 6, 2017 at 12:16 AM, Chanaka Fernando 
>>> wrote:
>>>
 It seems there is room to improve the current CarbonMessage
 implementation. Following are few main areas where we can improve its
 functionality.

- At the moment there are too many ways to get the message body
from the CarbonMessage
- getMessageBody()
   - getInputStream() - This is a http specific impl.
   - getMessageDateSource()

 The above 3 methods serve 3 different purposes. This design has been
 done mainly thinking about the HTTP messages. In a message passthrough
 scenario, content is kept in the content queue and accessed as a stream.
 When the message content is accessed within intermediate layer (like
 ballerina), it will be retrieved through messageDataSource.

- There are too many types of CarbonMessages in carbon-messaging
that are only used by a specific transport implementation
   - BinaryCarbonMessage
   - ControlCarbonMessage
   - DefaultCarbonMessage
   - MapCarbonMessage
   - SerializableCarbonMessage
   - StatusCarbonMessage
   - StreamingCarbonMessage
   - TextCarbonMessage


- Most of above CarbonMessages do not adhere to the contract that
is imposed by the CarbonMessage interface.

 I agree on the fact that we need to refactor these different types of
 CarbonMessage implementations. I think what Asitha suggested is a viable
 approach to handle different types of messages.

 Considering these facts, I believe we should refactor CarbonMessage
 before others starting using it in their implementations. Please let us
 know your thoughts as well :)

 +1 for refactoring the carbon message and relevant implementations to
 support non-HTTP use cases. In the meantime, we should support HTTP
 messaging in an efficient manner since that will be the mostly used
 scenario of ballerina.

 On Wed, Jul 5, 2017 at 4:55 PM, Irunika Weeraratne 
 wrote:

> Hi Shafreen and Asitha,
> In the first place, they were introduced after a long discussion in
> WebSocket scenarios. This was because when the WebSocket messages are
> arrived to transport level we already knew what kind of message it is.
> Eg: Text, Binary, Control, Status
>
> So I made sense to create the same type of carbon message in the
> transport. Then carbon message types were used to identify the scenarios 
> we
> had to address in the application layer.
> Eg: If the carbon message is an instance

[Dev] Get Super tenant admin email

2017-07-10 Thread Godwin Shrimal
Hi All,

We cannot get super tenant information via TenantManager. Below code
returns null, So how can we get the super tenant admin's email address ?

*tenantManager.getTenant(-1234)*


Thanks
Godwin

-- 
*Godwin Amila Shrimal*
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D *
twitter: https://twitter.com/godwinamila

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 IoT Server 3.1.0-Beta2 Released!

2017-07-10 Thread Madhawa Perera
WSO2 IoT Server 3.1.0-Beta2

We are pleased to announce WSO2 IoT Server 3.1.0-Beta2 release. It can be
downloaded from
wso2iot-3.1.0-beta2.zip


WSO2 IoT Server 3.1.0-Beta2 is the successor of WSO2 IoT Server 3.1.0-Beta.
This release consists bug fixes, UI improvements, stability and performance
enhancements.

Learn more of the prominent features and enhancements of the WSO2 IoT
Server 3.1.0-Beta2 release here
.
Known Issues

The known issues and frequently asked questions about the beta version can
be found here

Additional resources

Documentation: WSO2 IoT Server Documentation

Engaging with CommunityMailing Lists

Join our mailing list and correspondance with the developers directly.

Developer list: dev@wso2.org | Subscribe
 | Mail Archive

Reporting Issues

We encourage you to report issues, documentation faults and feature
requests regarding WSO2 IoT Server through WSO2 IoT GIT Issues
.
Discussion Forums

We encourage you to use stackoverflow

to
engage with developers as well as other users.

For more information about WSO2 IoT Server, please see
http://wso2.com/products/iot-server or visit the WSO2 Oxygen Tank
 developer portal for additional resources.

Thank you for your interest in WSO2 IoT Server.

*The WSO2 IoT Server Team*

-- 
Madhawa Perera
*Software Engineer*
Mobile : +94 (0) 773655496
<%2B94%20%280%29%20773%20451194>
madha...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSoC][Siddhi][CEP]: Siddhi Pattern for Absence of Events

2017-07-10 Thread Gobinath
Hi Suho,

I have added the test cases to all the cases you have mentioned except the
four listed below because having more than two pattern operands is not
supported by Siddhi. I hope it is okay to skip those test cases. WDYT?


   - every ( (not C and D) and B ) -> A
   - every ((not C and D) or B ) -> A
   - every (B and (not C and D) ) -> A
   - every (B or (not C and D) ) -> A


If there are no more cases to test, may I start with the SEQUENCE?


Thanks & Regards,
Gobinath

On Mon, Jul 3, 2017 at 2:32 PM, Gobinath  wrote:

> Hi,
> Sure. I will add test cases for each of these cases.
>
>
> Thanks & Regards,
> Gobinath
>
> On Mon, Jul 3, 2017 at 2:23 PM, Sriskandarajah Suhothayan 
> wrote:
>
>>
>>
>> On Mon, Jul 3, 2017 at 5:18 PM, Gobinath  wrote:
>>
>>> Hi,
>>>
>>> The following absent event cases are implemented and tested so far and
>>> now I am focusing on testing these patterns in the form of *Sequence*.
>>> If you find any cases that I missed or any improvements, please share them.
>>>
>>>
>>>
>>> A not B for 1sec
>>>
>>> After the arrival of A, wait for 1 sec & B not arrived
>>>
>>> A → not B and C
>>>
>>> When C arrive if B is not available
>>>
>>> A → (not B and C) within 1sec
>>>
>>> If B not arrived but C arrived within 1 sec from A
>>>
>>> A → (not B for 1sec  and C) within 2sec
>>>
>>> Wait for 1 sec from the arrival of A; if B not arrived and C arrived and
>>> both happened within 2 sec from A
>>>
>>> not A for 1sec → B
>>>
>>> Wait for 1 sec; if A not arrived but B arrived after 1sec
>>>
>>> not A and B → C
>>>
>>> When B arrive if A is not available followed by C
>>>
>>> every ( not B and  A)  → C
>>>
>>> Every combination of the previous case
>>>
>>> every ( not B for 1sec) → C
>>>
>>> Check and emit C every second, if B not arrive
>>>
>>> A → not B  for 1 sec and not C for 1 sec
>>>
>>> After A, both B and C are not received within 1 sec
>>>
>>> not A  for 1 sec and not B for 1 sec → C
>>>
>>> A and B are not received for 1 sec and then C
>>>
>>> A → not B   for 1 sec or not C for 1 sec
>>>
>>> After A, wait for 1 sec B or C not received
>>>
>>> not A  for 1 sec or not B for 1 sec → C
>>>
>>> Wait for 1 sec; A or B not received followed by C
>>>
>>> A → not B for 1 sec or C
>>>
>>> After A, if C arrives, emit it otherwise emit after 1 sec if B not
>>> arrived
>>>
>>> not A for 1 sec or B → C
>>>
>>> Same as previous but the other way around
>>>
>>> I think these will also work but better if you can check them too via
>> testcase.
>>
>> A → C or not B for 1 sec
>>
>> B or not A for 1 sec → C
>>
>> every (not B  for 1 sec and not C for 1 sec ) -> A
>>
>> every (not B  for 1 sec or not C for 1 sec ) -> A
>>
>> every (B *and* not C for 1 sec ) -> A
>>
>> every (not C for 1 sec *and* B ) -> A
>>
>> every (B *or* not C for 1 sec ) -> A
>>
>> every (not C for 1 sec *or* B ) -> A
>>
>> every (B *and* (not C and D) ) -> A
>>
>> every ( (not C and D) *and* B ) -> A
>>
>> every (B *or* (not C and D) ) -> A
>>
>> every ((not C and D) *or* B ) -> A
>>
>>
>>>
>>> Thanks & Regards,
>>> Gobinath
>>>
>>> On Sun, Jul 2, 2017 at 6:34 AM, Gobinath  wrote:
>>>
 Thanks, Suho.

 Sure I will.


 Thanks & Regards,
 Gobinath

 On Sun, Jul 2, 2017 at 6:32 AM, Sriskandarajah Suhothayan <
 s...@wso2.com> wrote:

> Thanks merged the PR.
>
> Can you inform in SOF that you have fixed this issue, and this is the
> PR.
>
> Thanks
> Suho
>
> On Sun, Jul 2, 2017 at 6:21 AM, Gobinath  wrote:
>
>> Hi,
>>
>> Please find the PR [1] fixing the following issues in Siddhi.
>>
>> 1. Logical pattern not obeying the '*within*' keyword
>>
>> 2. Sequence not obeying the '*every*' keyword
>>
>> 3. Logical pattern '*from* *A or B select...*' not producing the
>> output
>>
>> With this fix, the problems asked in Stack Overflow [2] are resolved.
>>
>>
>> [1] https://github.com/wso2/siddhi/pull/436
>>
>> [2] https://stackoverflow.com/questions/41557227/siddhi-logi
>> cal-and-with-within-executes-callback-unexpectedly
>>
>>
>> Thanks & Regards,
>> Gobinath
>>
>>
>> On Sat, May 13, 2017 at 8:02 AM, Gobinath 
>> wrote:
>>
>>> Hi,
>>>
>>> I've fixed the duplicate output with 'OR' in the PR #354 [1].
>>> According to this fix, the *addState* method of
>>> *LogicalPreStateProcessor* treats both PATTERN and SEQUENCE in the
>>> same way [2]. It does not break any existing tests but please check 
>>> whether
>>> it makes sense or not.
>>>
>>>
>>> [1] https://github.com/wso2/siddhi/pull/354
>>>
>>> [2] https://github.com/wso2/siddhi/pull/354/commits/803e4d0f
>>> 486d7268af117bcfe42f4c704f98b3b5#diff-32293ae88907e099f28593
>>> e5496e1e67R62
>>>
>>>
>>> Thanks & Regards,
>>> Gobinath
>>>
>>> On Mon, May 8, 2017 at 1:24 AM, Sriskandarajah Suhothayan <
>>> s...@wso2.com> wrote

[Dev] Recommended init.ora parameters for WSO2 product

2017-07-10 Thread Chamara Silva
Do we have recommended parameters for Oracle init.ora? Becuase some
customers are concerning these parameters when they install WSO2 products
with Oracle GB.

ex :
db_cache_size = 176000M

db_2k_cache_size = 2048M

db_16k_cache_size = 99000M

db_keep_cache_size = 60M

db_recycle_cache_size = 64000M

shared_pool_size = 14000M

Thanks,
Chamara Silva

-- 
Suminda Chamara Silva
Technical Lead
WSO2 Inc.
Mobile: +94718302858
blog: http://chamaras.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Identity Server 5.3.0 MSSQL script doesn't execute successfully

2017-07-10 Thread Johann Nallathamby
Hi IAM Team,

Please check on $subject and fix on IS 5.4.0. This is an L1.

[1] https://wso2.org/jira/browse/IDENTITY-6130

Regards,
Johann.

-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Senior Technical Lead - WSO2 Identity Server
Governance technologies Team
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+9476950*
Blog - *http://nallaa.wordpress.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSoC 2017][IS] SCIM 2.0 Compliance Test Suite

2017-07-10 Thread Omindu Rathnaweera
Hi VIndula,

You can use https://github.com/wso2-incubator/scim2-compliance-test-suite
for your development. Please send a PR with the current code.

Regards,
Omindu.

On Mon, Jun 26, 2017 at 11:52 PM, Omindu Rathnaweera 
wrote:

> Scheduled the meeting on 28th Wednesday at 3.00 pm. Hope you've got the
> request.
>
>
> On Mon, Jun 26, 2017 at 11:17 PM, Vindula Jayawardana <
> vindula...@cse.mrt.ac.lk> wrote:
>
>> Hi,
>>
>> Yes I can do a demo on the current implementation. How about the June
>> 28th Wednesday at 3.00 pm ?
>>
>> Please find the following details to test the /ServiceProviderConfig
>> endpoint.
>>
>> 1. Start the IS instance locally.
>> 2. Deploy the scimproxycompliance.war
>> 3. On the UI, select Compliance Test 2.0 tab
>> 4. Enter the IS SCIM base url as : https://localhost:9443
>>
>> I have tested with mocked IS 5.3.0 instance with SCIM 2.0 support.
>>
>> Thank you.
>>
>> *Vindula Jayawardana*
>> Computer Science and Engineering Dept.
>> University of Moratuwa
>> mobile : +713462554
>> Email : vindul...@gmail.com
>>
>> 
>> 
>> 
>> 
>>
>> *“Respect is how to treat everyone, not just those you want to impress. "*
>>
>>
>> *-Richard Branson-*
>>
>>
>>
>> On 26 June 2017 at 10:42, Omindu Rathnaweera  wrote:
>>
>>> Hi Vindula,
>>>
>>> Would it possible for you to arrange the demo within the evaluation time
>>> period (26th - 30th)? Also please share the instructions to try out the '
>>> ServiceProviderConfig' test.
>>>
>>> Thanks,
>>> Omindu.
>>>
>>> On Tue, Jun 20, 2017 at 5:12 PM, Vindula Jayawardana <
>>> vindula...@cse.mrt.ac.lk> wrote:
>>>
 Hi,

 I was able to implement /ServiceProviderConfig endpoint compliance test
 as an end to end test [1].

 As discussed I used feign JAX-RS client. I did not directly use Charon
 core objects [1][2] in REST client due to json encoding and decoding
 problem as mentioned by Gayan in the previous mail. Hence I implemented
 separate object object models for this purpose.

 I am hoping to arrange a demo of the currently implemented test and
 also it will be better if I can get your opinions on verifying the
 architecture of the current implementation. Shall we have a quick demo
 session on Thursday (22nd) ?

 [1] https://github.com/Vindulamj/SCIM-2.0-Complience-Test-Suite
 [2] https://github.com/wso2/charon/blob/master/modules/charo
 n-core/src/main/java/org/wso2/charon3/core/objects/User.java
 [3] https://github.com/wso2/charon/blob/master/modules/charo
 n-core/src/main/java/org/wso2/charon3/core/objects/Group.java

 Thank you.

 *Vindula Jayawardana*
 Computer Science and Engineering Dept.
 University of Moratuwa
 mobile : +713462554
 Email : vindul...@gmail.com

 
 
 
 

 *“Respect is how to treat everyone, not just those you want to impress.
 "*


 *-Richard Branson-*



 On 11 June 2017 at 19:02, Gayan Gunawardana  wrote:

> Hi Vindula,
>
> On Mon, Jun 5, 2017 at 4:14 PM, Vindula Jayawardana <
> vindula...@cse.mrt.ac.lk> wrote:
>
>> Hi,
>>
>> Kindly find the weekly update below.
>>
>> Within the week time span, I have been working on the webapp
>> component proposed in the system architecture. In parallel, I also looked
>> in to implementing scimcore component as well. In implementing the 
>> scimcore
>> component, as we discussed in the previous mails, I used the Charon code
>> (which relates to scheme specifications only) as a base code.
>>
> You suppose to use feign JAX-RS client right ? Can you directly use
> charon core objects [1][2] in REST client or did you implement your own
> object model ? I guess you may find json encoding and decoding problem 
> with
> charon core standard objects.
>
> [1] https://github.com/wso2/charon/blob/master/modules/charon-co
> re/src/main/java/org/wso2/charon3/core/objects/User.java
> [2] https://github.com/wso2/charon/blob/master/modules/charon-co
> re/src/main/java/org/wso2/charon3/core/objects/Group.java
>
>>
>> In this week, I am planning on look into the scimcore component more
>> with adhering to schema specification. Also I did not mock the SCIM 1.1
>> /Schemas endpoint in IS yet since it is not that urgent at the moment (it
>> is helpful in understanding the protocol specification). Hence I will 
>> look
>> into mock that as well since now I can work with protocol specification 
>> as
>> well.
>>
> Could you 

Re: [Dev] How do I execute a piece of code when a connector is deployed/initialized?

2017-07-10 Thread Rajkumar Rajaratnam
Thanks Rajjaz.

Firstly, I don't want to use a script mediator, because it has performance
issues with high concurrency. Secondly, I want to execute a piece of code
when the connector is deployed and enabled. I've implemented
ManagedLifecycle and have put my code inside init() and everything works
fine for my usecase. Any issue with this approach?

Thanks,
Raj.

On Sun, Jul 9, 2017 at 2:26 AM, Rajjaz Mohammed  wrote:

> Hi Raj,
>
> You can do this by read the system variables and store it in the
> registry[1][2]. If the resource is updated then it will not read again and
> again for every request. Normally we follow this approach to store the
> access token and refresh token variables from the first call.
>
> [1] https://github.com/wso2-extensions/esb-connector-
> googlespreadsheet/blob/master/src/main/resources/config/
> getAccessTokenFromRefreshToken.xml#L54
> [2] https://github.com/wso2-extensions/esb-connector-
> googlespreadsheet/blob/master/src/main/resources/config/init.xml#L69
>
> On Sun, Jul 9, 2017 at 9:12 AM, Rajkumar Rajaratnam 
> wrote:
>
>> Would implementing ManagedLifecycle be the option for this?
>>
>> On Sat, Jul 8, 2017 at 11:20 PM, Rajkumar Rajaratnam 
>> wrote:
>>
>>> Hi,
>>>
>>> I need to execute a piece of code to read some system variables and
>>> initialize my connector. I need to do this only once and IMO it's better to
>>> do this during connector deployment time. I don't want to execute this code
>>> again and again for every requests.
>>>
>>> How do I do this?
>>>
>>> Thanks.
>>>
>>
>>
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Senior Software Engineer, WSO2
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thank you
> Best Regards
>
> *Rajjaz HM*
> Software Engineer
> Platform Extension Team
> WSO2 Inc. 
> lean | enterprise | middleware
> Mobile | +94752833834 <+94%2075%20283%203834>|+94777226874
> <+94%2077%20722%206874>
> Email   | raj...@wso2.com
> LinkedIn  | Blogger
>  | WSO2 Profile
> 
> [image: https://wso2.com/signature] 
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Senior Software Engineer, WSO2
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to set Database Properties in Carbon Datasources

2017-07-10 Thread Niranjan Karunanandham
Hi Isuru,

In carbon-datasources, there is a sample [1] in how to use it. I have
created a Git issue [2] to update the docs.

[1] -
https://github.com/wso2/carbon-datasources/blob/master/tests/osgi-tests/src/test/resources/conf/deployment.yaml#L83
[2] - https://github.com/wso2/carbon-datasources/issues/36

Regards,
Nira

On Mon, Jul 10, 2017 at 4:58 PM, Isuru Perera  wrote:

> Hi,
>
> How do I set database properties in latest carbon-datasources?
> https://github.com/wso2/carbon-datasources
>
> As mentioned below, Metrics component needs database properties to work
> with Oracle database.
>
>
> On Mon, Oct 12, 2015 at 11:54 AM, Kalpa Welivitigoda 
> wrote:
>
>> Hi all,
>>
>> This is merged to release-4.4.2.
>>
>> Madhawa is working on the PR for master branch.
>>
>> On Mon, Oct 12, 2015 at 10:08 AM, Isuru Perera  wrote:
>>
>>> Hi Carbon Team,
>>>
>>> I really appreciate if you can review and merge the PR before Carbon
>>> 4.4.2 release. I also don't see any breaking changes and we should be able
>>> to include this in a patch release.
>>>
>>> The MB issue is blocked by this Carbon issue [2]
>>>
>>> [1] https://wso2.org/jira/browse/MB-1271
>>> [2] https://wso2.org/jira/browse/CARBON-15497
>>>
>>> On Fri, Oct 9, 2015 at 6:57 PM, Anjana Fernando  wrote:
>>>
 It is not actually adding a new config, it is just adding a new config
 section to an already existing configuration file. So I hope that's not a
 problem.

 Cheers,
 Anjana.

 On Fri, Oct 9, 2015 at 5:07 PM, Madhawa Gunasekara 
 wrote:

> Hi Kalpa,
>
> I didn't do any API additions in the fix. just added a config only. I
> think we can configs in patch releases?
>
> Thanks,
> Madhawa
>
> On Fri, Oct 9, 2015 at 4:57 PM, Kalpa Welivitigoda 
> wrote:
>
>> Hi Madhawa,
>>
>> I made some comments in [1], please have a look.
>>
>> On Fri, Oct 9, 2015 at 3:21 PM, Madhawa Gunasekara > > wrote:
>>
>>> Hi Kalpa,
>>>
>>> Can we have this improvement in 4.4.2 carbon release. I have sent a
>>> pull request with tests.
>>>
>>> [1] https://github.com/wso2/carbon-kernel/pull/528/files
>>> 
>>>
>>> Thanks,
>>> Madhawa
>>>
>>> On Thu, Oct 8, 2015 at 8:14 PM, Isuru Perera 
>>> wrote:
>>>
 Created a JIRA: https://wso2.org/jira/browse/CARBON-15497

 On Thu, Oct 8, 2015 at 6:13 PM, Madhawa Gunasekara <
 madha...@wso2.com> wrote:

> Hi Anjana,
>
> Sure will do it.
>
> Thanks,
> Madhawa
>
> On Thu, Oct 8, 2015 at 6:05 PM, Anjana Fernando 
> wrote:
>
>> Hi,
>>
>> I think this functionality is not exposed from our ndatasource
>> RDBMSDataSourceReader implementation. We would have to put a new 
>> property
>> to set these "DB properties". I think, these must be the properties 
>> passed
>> into when creating a new connection with this [1]. @Madhawa, shall we
>> implement this for a future Kernel release, by adding a new section 
>> to put
>> these properties in the configuration.
>>
>> [1] http://docs.oracle.com/javase/7/docs/api/java/sql/DriverMana
>> ger.html#getConnection(java.lang.String,%20java.util.Properties)
>>
>> Cheers,
>> Anjana.
>>
>> On Thu, Oct 8, 2015 at 3:33 PM, Isuru Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> With Carbon Metrics, I need to save some "double" values in the
>>> database. Sometimes the Oracle JDBC Driver throws "Underflow" 
>>> exceptions
>>> [1] when trying to set a double to a prepared statement.
>>>
>>> To solve that issue, I changed the database columns to "
>>> BINARY_DOUBLE
>>> "
>>> [2] and I want to set the property "SetFloatAndDoubleUseBinary" to 
>>> true.
>>>
>>> I tested this with a standalone app with Tomcat JDBC and it
>>> works.
>>>
>>> import org.apache.tomcat.jdbc.pool.DataSource;
>>> import org.apache.tomcat.jdbc.pool.PoolProperties;
>>> ...
>>>
>>> PoolProperties p = new PoolProperties();
>>> p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
>>> p.setDriverClassName("oracle.jdbc.OracleDriver");
>>> p.setUsername("USER");
>>> p.setPassword("PASSWD");
>>> 
>>> DataSource datasource = new DataSource();
>>> datasource.setPoolProperties(p);
>>>
>>>
>>> *Properties properties = new
>>> Properties();properties.setPro

Re: [Dev] How to set Database Properties in Carbon Datasources

2017-07-10 Thread Isuru Perera
Hi,

How do I set database properties in latest carbon-datasources?
https://github.com/wso2/carbon-datasources

As mentioned below, Metrics component needs database properties to work
with Oracle database.


On Mon, Oct 12, 2015 at 11:54 AM, Kalpa Welivitigoda 
wrote:

> Hi all,
>
> This is merged to release-4.4.2.
>
> Madhawa is working on the PR for master branch.
>
> On Mon, Oct 12, 2015 at 10:08 AM, Isuru Perera  wrote:
>
>> Hi Carbon Team,
>>
>> I really appreciate if you can review and merge the PR before Carbon
>> 4.4.2 release. I also don't see any breaking changes and we should be able
>> to include this in a patch release.
>>
>> The MB issue is blocked by this Carbon issue [2]
>>
>> [1] https://wso2.org/jira/browse/MB-1271
>> [2] https://wso2.org/jira/browse/CARBON-15497
>>
>> On Fri, Oct 9, 2015 at 6:57 PM, Anjana Fernando  wrote:
>>
>>> It is not actually adding a new config, it is just adding a new config
>>> section to an already existing configuration file. So I hope that's not a
>>> problem.
>>>
>>> Cheers,
>>> Anjana.
>>>
>>> On Fri, Oct 9, 2015 at 5:07 PM, Madhawa Gunasekara 
>>> wrote:
>>>
 Hi Kalpa,

 I didn't do any API additions in the fix. just added a config only. I
 think we can configs in patch releases?

 Thanks,
 Madhawa

 On Fri, Oct 9, 2015 at 4:57 PM, Kalpa Welivitigoda 
 wrote:

> Hi Madhawa,
>
> I made some comments in [1], please have a look.
>
> On Fri, Oct 9, 2015 at 3:21 PM, Madhawa Gunasekara 
> wrote:
>
>> Hi Kalpa,
>>
>> Can we have this improvement in 4.4.2 carbon release. I have sent a
>> pull request with tests.
>>
>> [1] https://github.com/wso2/carbon-kernel/pull/528/files
>> 
>>
>> Thanks,
>> Madhawa
>>
>> On Thu, Oct 8, 2015 at 8:14 PM, Isuru Perera  wrote:
>>
>>> Created a JIRA: https://wso2.org/jira/browse/CARBON-15497
>>>
>>> On Thu, Oct 8, 2015 at 6:13 PM, Madhawa Gunasekara <
>>> madha...@wso2.com> wrote:
>>>
 Hi Anjana,

 Sure will do it.

 Thanks,
 Madhawa

 On Thu, Oct 8, 2015 at 6:05 PM, Anjana Fernando 
 wrote:

> Hi,
>
> I think this functionality is not exposed from our ndatasource
> RDBMSDataSourceReader implementation. We would have to put a new 
> property
> to set these "DB properties". I think, these must be the properties 
> passed
> into when creating a new connection with this [1]. @Madhawa, shall we
> implement this for a future Kernel release, by adding a new section 
> to put
> these properties in the configuration.
>
> [1] http://docs.oracle.com/javase/7/docs/api/java/sql/DriverMana
> ger.html#getConnection(java.lang.String,%20java.util.Properties)
>
> Cheers,
> Anjana.
>
> On Thu, Oct 8, 2015 at 3:33 PM, Isuru Perera 
> wrote:
>
>> Hi,
>>
>> With Carbon Metrics, I need to save some "double" values in the
>> database. Sometimes the Oracle JDBC Driver throws "Underflow" 
>> exceptions
>> [1] when trying to set a double to a prepared statement.
>>
>> To solve that issue, I changed the database columns to "
>> BINARY_DOUBLE
>> "
>> [2] and I want to set the property "SetFloatAndDoubleUseBinary" to 
>> true.
>>
>> I tested this with a standalone app with Tomcat JDBC and it works.
>>
>> import org.apache.tomcat.jdbc.pool.DataSource;
>> import org.apache.tomcat.jdbc.pool.PoolProperties;
>> ...
>>
>> PoolProperties p = new PoolProperties();
>> p.setUrl("jdbc:oracle:thin:@localhost:1521/metrics");
>> p.setDriverClassName("oracle.jdbc.OracleDriver");
>> p.setUsername("USER");
>> p.setPassword("PASSWD");
>> 
>> DataSource datasource = new DataSource();
>> datasource.setPoolProperties(p);
>>
>>
>> *Properties properties = new
>> Properties();properties.setProperty("SetFloatAndDoubleUseBinary",
>> "true");p.setDbProperties(properties);*
>>
>> I thought there is a way to set these kinds of properties in
>> *-datasources.xml file. However I don't see a way to do that in
>> configuration [3].
>>
>> I don't want to change the double values and I want to save it
>> directly in the database. How do we fix this?
>>
>> Thanks!
>>
>> Best Regards,
>>
>> [1] https://wso2.org/jira/browse/MB-1271

Re: [Dev] Override default log4.properties in MSF4J

2017-07-10 Thread Thusitha Thilina Dayaratne
Hi Jochen,

Can you try using dependencies without using the msf4j-parent?

Thanks
Thusitha

On Mon, Jul 10, 2017 at 4:09 PM, Jochen Traunecker <
jochen.traunec...@googlemail.com> wrote:

> Hi Thusitha,
>
> I'm pointing to this as parent
>
>  4.0.0
> org.wso2.msf4j
> msf4j-service
> pom
>   2.1.2-SNAPSHOT
>
> Thanks,
> Jochen
> ...
>
> 2017-07-05 18:13 GMT+02:00 Thusitha Thilina Dayaratne 
> :
>
>> Hi Jochen,
>>
>> When you put your custom log4j.properties file, it should be correctly
>> picked up. Are you using the msf4j-core dependency or the msf4j-parent?
>> You can also refer dev mail thread [1]
>>
>> [1] - "[Dev] Too much noise during MSF4J startup (master branch)"
>>
>> Thanks
>> Thusitha
>>
>> On Wed, Jul 5, 2017 at 8:31 PM, Jochen Traunecker <
>> jochen.traunec...@googlemail.com> wrote:
>>
>>> Hi Godwin,
>>>
>>> thanks for pointing me to the this solution.
>>>
>>> Cheers
>>> Jochen
>>>
>>> 2017-06-28 20:27 GMT+02:00 Godwin Shrimal :
>>>
 Hi Jochen,

 You can pass log4j commandline paramater when running the fat jar as
 follows to apply the og4j.properties.

 -Dlog4j.configuration=file:"$CARBON_HOME"/conf/log4j.properties


 Thanks
 Godwin


 On Tue, Jun 27, 2017 at 2:17 AM, Jochen Traunecker <
 jochen.traunec...@googlemail.com> wrote:

> Hi,
>
> thanks for the hints and it works adding a log4j.xml into /resources
> but log4j.properties seems to get ignored. Maybe I have some typo 
> somewhere.
>
> Regards,
> Jochen
>
> 2017-06-27 9:09 GMT+02:00 Gottfried Szing :
>
>> Hi Jochen
>>
>> Did you try the possibilities that come out-of-the-box with log4j?
>>
>> https://logging.apache.org/log4j/2.x/manual/configuration.ht
>> ml#Automatic_Configuration
>>
>> br
>>
>> On 27/06/2017 09:02, Thomas LEGRAND wrote:
>>
>>> Hello,
>>>
>>> Have you tried to put a log4j.xml configuration file in your
>>> src/main/resources directory? For example, here is mine to trigger the
>>> DEBUG mode:
>>>
>>> 
>>> >> xmlns:log4j='http://jakarta.apache.org/log4j/'>
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>> 
>>> 
>>> 
>>>
>>> 
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>> 2017-06-26 21:54 GMT+02:00 Jochen Traunecker <
>>> jochen.traunec...@googlemail.com >> lemail.com>>:
>>>
>>> Hi,
>>>
>>> I'm wondering if there is a way to introduce a custom
>>> log4j.properties file instead of default one [1] for
>>> MSF4J in combination with fatjar?
>>>
>>> Thanks,
>>> Jochen
>>>
>>> [1] https://github.com/wso2/msf4j/tree/master/core/src/main/reso
>>> urces
>>> >> ources>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org 
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev <
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev>
>>>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>
>
> --
> Gruss / regards
>
> Jochen Traunecker
> mailto: jochen.traunec...@gmail.com
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Godwin Amila Shrimal*
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: *+94772264165*
 linkedin: *http://lnkd.in/KUum6D *
 twitter: https://twitter.com/godwinamila
 

>>>
>>>
>>>
>>> --
>>> Gruss / regards
>>>
>>> Jochen Traunecker
>>> mailto: jochen.traunec...@gmail.com
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Thusitha Dayaratne
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809 <+94%2071%20275%206809>
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>> 
>>
>>
>
>
> --
> Gruss / regards
>
> Jochen Traunecker
> mailto: jochen.traunec...@gmail.com
>



-- 
Thusitha Dayaratne
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Fixing the cache mediator

2017-07-10 Thread Riyafa Abdul Hameed
Dear all,

I came up with the following configurations for the cache mediator rewrite:

>  [scope=(per-host | per-mediator)] collector=(true | false)
> [maxMessageSize="in-bytes"] HTTPMethodToCache = (GET | POST)]>
>
>   
>
> (mediator)+
>
>   ?
>
>   
>
> 
>

As I have mentioned in the requirements doc[1], the only reason we are
allowing responses to POST messages to be cached is because POST is the
only method used in SOAP implementations. Now having looked at the
implementation details further I understand that it is possible to identify
whether a request is soap or not without having it externally configured.
So my question is whether the configuration "HTTPMethodToCache" is actually
required because it can be internally processed whether request is SOAP or
REST and then cache accordingly.


[1]
https://docs.google.com/document/d/1iPtArrW6C-VgzAzjjSsLmG9aqAFEubmFgNkQhoDvqz8/edit


Thank you.

Yours sincerely,

Riyafa


On Thu, Jul 6, 2017 at 9:50 AM, Riyafa Abdul Hameed  wrote:

> Thank you for the suggestions Rajkumar.
>
>
> On Thu, Jul 6, 2017 at 6:57 AM, Rajkumar Rajaratnam 
> wrote:
>
>> Also the existing cache mediator doesn't honor the cache ID as per my
>> testing sometimes back (not sure it's fixed though). It means caching works
>> globally, not at cache mediator instance level.
>>
>> If we can't correlate a finder with a collector (using cache mediator
>> ID), then we are going to hit memory issues.
>>
>> Here is the reason.
>>
>> Let's say we have two APIs - location and exchange.
>>
>>1. /location API response size is 10 MB and we have 100 different
>>responses
>>2. /exchange API response size is 1MB and we have 1000 different
>>responses
>>
>> If we want to enable response caching for these two APIs, if we can
>> correlate a finder with a collector (i.e if we support caching at cache
>> mediator instance level), then I can allocate 100*10 + 1000*1 = 2000 MB
>> memory to the JVM in addition to our recommended memory settings, so that
>> it will never go OOM.
>>
>> If we can't correlate a finder with a collector (i.e, if we support
>> global caching), then I have to allocate 1100 * 10 = 11000 MB memory. See I
>> have to use additional 9000 MB if we don't honor cache ID. It's not
>> practical and efficient because memory is expensive - so it doesn't scale.
>>
>> Can we fix this issue and honor cache ID please in the next EI release?
>>
>
> Yes we need to honor this as you suggest and I shall include it in the
> requirements document.
>
>>
>> On Wed, Jul 5, 2017 at 9:18 PM, Rajkumar Rajaratnam 
>> wrote:
>>
>>> Is this going to be a rewrite or improvement to existing cache mediator?
>>> If this is a rewrite, will it be included in next EI release?
>>>
>> Yes it's going to be a rewrite. We hope to include it in the EI 6.2.x
> release.
>
>>
>>> Also can we also implement cache eviction as part of this effort?
>>>
>>> Ideally, we should be able to configure how many maximum responses we
>>> can cache (not sure whether it's there already, it was not working
>>> sometimes back) and what's the maximum message size (it's already there) we
>>> can cache to avoid OOM. Then we need to have cache eviction in place to
>>> evict some cached items when cache is full, in-order to give space for most
>>> recent responses.
>>>
>>> I guess configuring the maximum responses is currently available and we
> shall consider your suggestions in the rewrite.
>
>> Thanks.
>>>
>>> On Wed, Jul 5, 2017 at 6:02 AM, Riyafa Abdul Hameed 
>>> wrote:
>>>
 Hi,
 Please find the requirements doc below:
 https://docs.google.com/document/d/1iPtArrW6C-VgzAzjjSsLmG9a
 qAFEubmFgNkQhoDvqz8/edit?usp=sharing
 Any suggestions would be highly appreciated.
 Thank you.
 Riyafa

 On Tue, Jul 4, 2017 at 5:37 PM, Riyafa Abdul Hameed 
 wrote:

> Hi all,
>
> Thank you for the suggestions. Yes the mediator should also work with
> the call mediator.
>
> Further on a discussion with the APIM team I have identified the
> following issues which points to requiring a rewrite of the cache 
> mediator:
>
>1.
>
>Current cache mediator[1] caches responses for all the HTTP
>Request Methods which include GET, POST, PUT and DELETE. Ideally a 
> cache
>mediator should cache only the response for GET method and caching for 
> POST
>method should be configurable (because POST is the only method used in 
> SOAP
>implementations). The caching for PUT and DELETE methods should be
>completely omitted. The reason for caching responses only for GET is
>because in the REST world other methods (POST, PUT and DELETE) are 
> used for
>creating, modifying or deleting existing records and hence the response
>would only mention the success or failure of the request. Caching these
>responses is meaningless and error prone.
>2.
>
>Current cache mediator

Re: [Dev] Should we refactor CarbonMessage

2017-07-10 Thread Shafreen Anfar
Hi Thusitha,

On Mon, Jul 10, 2017 at 11:37 AM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi Shafreen,
>
> +1 for the proposed implementation. In MSF4J point of view, we are
> wrapping the carbon message with MSF4J Request/Response objects and use the
> underlying messaging methods provided to retrieve/write back data in/out/.
>
> Are we considering a getting a message body clone with the re
> architrecture?
>

Isn't cloning of the message body should be done using some util method at
MessageProcessor level ?


>
> Thanks
> Thusitha
>
> On Fri, Jul 7, 2017 at 6:18 PM, Shafreen Anfar  wrote:
>
>> Hi All,
>>
>> In addition to considering all the facts presented above, I also talked
>> to each transport developer who actually came up with different types of
>> carbon-messages. Based on those discussion I came up with below design.
>>
>> Originally, CarbonMessage is designed to carry data between two
>> components and I believe it should stay the same. However, it should be
>> able carry data relevant to each component. For instance, in JMS case, it
>> should be able carry a map for map messages where as in websockets case it
>> should be able carry a string.
>>
>> Therefore, I thought of creating a CarbonMessage with java generics. Then
>> we can extend it accordingly.
>>
>> ​
>>
>> As you can see above, we can provide a DefaultCarbonMessage
>> implementation. However, in HTTP case, we have done some specific
>> implementation to optimize the transport. At the moment those logic also
>> resides inside the abstract CarbonMessage. With the new design we can
>> simply move them to something like ByteCarbonMessage.
>>
>> I believe with this design we can have proper abstraction while reducing
>> number of redundant carbon messages.
>>
>>
>> On Thu, Jul 6, 2017 at 12:16 AM, Chanaka Fernando 
>> wrote:
>>
>>> It seems there is room to improve the current CarbonMessage
>>> implementation. Following are few main areas where we can improve its
>>> functionality.
>>>
>>>- At the moment there are too many ways to get the message body from
>>>the CarbonMessage
>>>- getMessageBody()
>>>   - getInputStream() - This is a http specific impl.
>>>   - getMessageDateSource()
>>>
>>> The above 3 methods serve 3 different purposes. This design has been
>>> done mainly thinking about the HTTP messages. In a message passthrough
>>> scenario, content is kept in the content queue and accessed as a stream.
>>> When the message content is accessed within intermediate layer (like
>>> ballerina), it will be retrieved through messageDataSource.
>>>
>>>- There are too many types of CarbonMessages in carbon-messaging
>>>that are only used by a specific transport implementation
>>>   - BinaryCarbonMessage
>>>   - ControlCarbonMessage
>>>   - DefaultCarbonMessage
>>>   - MapCarbonMessage
>>>   - SerializableCarbonMessage
>>>   - StatusCarbonMessage
>>>   - StreamingCarbonMessage
>>>   - TextCarbonMessage
>>>
>>>
>>>- Most of above CarbonMessages do not adhere to the contract that is
>>>imposed by the CarbonMessage interface.
>>>
>>> I agree on the fact that we need to refactor these different types of
>>> CarbonMessage implementations. I think what Asitha suggested is a viable
>>> approach to handle different types of messages.
>>>
>>> Considering these facts, I believe we should refactor CarbonMessage
>>> before others starting using it in their implementations. Please let us
>>> know your thoughts as well :)
>>>
>>> +1 for refactoring the carbon message and relevant implementations to
>>> support non-HTTP use cases. In the meantime, we should support HTTP
>>> messaging in an efficient manner since that will be the mostly used
>>> scenario of ballerina.
>>>
>>> On Wed, Jul 5, 2017 at 4:55 PM, Irunika Weeraratne 
>>> wrote:
>>>
 Hi Shafreen and Asitha,
 In the first place, they were introduced after a long discussion in
 WebSocket scenarios. This was because when the WebSocket messages are
 arrived to transport level we already knew what kind of message it is.
 Eg: Text, Binary, Control, Status

 So I made sense to create the same type of carbon message in the
 transport. Then carbon message types were used to identify the scenarios we
 had to address in the application layer.
 Eg: If the carbon message is an instance of TextCarbonMessage we know
 what to do in the first place. Also converting text into byte buffer in the
 transport and then converting it again into text in the application layer
 doesn't make sense.

 Because of that, those message types were introduced. IMO while we
 reduce the no. of carbon message types we might need to keep some of the
 types because it will affect the performance.
 Also, we can always override the methods in default carbon message if
 in order to work with default scenarios.

 WDYT?

 Thanks,
 Irunika

 *Irunika Weerar

Re: [Dev] Override default log4.properties in MSF4J

2017-07-10 Thread Jochen Traunecker
Hi Thusitha,

I'm pointing to this as parent

 4.0.0
org.wso2.msf4j
msf4j-service
pom
  2.1.2-SNAPSHOT

Thanks,
Jochen
...

2017-07-05 18:13 GMT+02:00 Thusitha Thilina Dayaratne :

> Hi Jochen,
>
> When you put your custom log4j.properties file, it should be correctly
> picked up. Are you using the msf4j-core dependency or the msf4j-parent?
> You can also refer dev mail thread [1]
>
> [1] - "[Dev] Too much noise during MSF4J startup (master branch)"
>
> Thanks
> Thusitha
>
> On Wed, Jul 5, 2017 at 8:31 PM, Jochen Traunecker <
> jochen.traunec...@googlemail.com> wrote:
>
>> Hi Godwin,
>>
>> thanks for pointing me to the this solution.
>>
>> Cheers
>> Jochen
>>
>> 2017-06-28 20:27 GMT+02:00 Godwin Shrimal :
>>
>>> Hi Jochen,
>>>
>>> You can pass log4j commandline paramater when running the fat jar as
>>> follows to apply the og4j.properties.
>>>
>>> -Dlog4j.configuration=file:"$CARBON_HOME"/conf/log4j.properties
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>>
>>> On Tue, Jun 27, 2017 at 2:17 AM, Jochen Traunecker <
>>> jochen.traunec...@googlemail.com> wrote:
>>>
 Hi,

 thanks for the hints and it works adding a log4j.xml into /resources
 but log4j.properties seems to get ignored. Maybe I have some typo 
 somewhere.

 Regards,
 Jochen

 2017-06-27 9:09 GMT+02:00 Gottfried Szing :

> Hi Jochen
>
> Did you try the possibilities that come out-of-the-box with log4j?
>
> https://logging.apache.org/log4j/2.x/manual/configuration.ht
> ml#Automatic_Configuration
>
> br
>
> On 27/06/2017 09:02, Thomas LEGRAND wrote:
>
>> Hello,
>>
>> Have you tried to put a log4j.xml configuration file in your
>> src/main/resources directory? For example, here is mine to trigger the
>> DEBUG mode:
>>
>> 
>> > xmlns:log4j='http://jakarta.apache.org/log4j/'>
>>
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>> 
>>
>> Regards,
>>
>> Thomas
>>
>> 2017-06-26 21:54 GMT+02:00 Jochen Traunecker <
>> jochen.traunec...@googlemail.com > lemail.com>>:
>>
>> Hi,
>>
>> I'm wondering if there is a way to introduce a custom
>> log4j.properties file instead of default one [1] for
>> MSF4J in combination with fatjar?
>>
>> Thanks,
>> Jochen
>>
>> [1] https://github.com/wso2/msf4j/tree/master/core/src/main/reso
>> urces
>> > ources>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org 
>> http://wso2.org/cgi-bin/mailman/listinfo/dev <
>> http://wso2.org/cgi-bin/mailman/listinfo/dev>
>>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>


 --
 Gruss / regards

 Jochen Traunecker
 mailto: jochen.traunec...@gmail.com

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D *
>>> twitter: https://twitter.com/godwinamila
>>> 
>>>
>>
>>
>>
>> --
>> Gruss / regards
>>
>> Jochen Traunecker
>> mailto: jochen.traunec...@gmail.com
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Thusitha Dayaratne
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809 <+94%2071%20275%206809>
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
> 
>
>


-- 
Gruss / regards

Jochen Traunecker
mailto: jochen.traunec...@gmail.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to correlate message?

2017-07-10 Thread Melodias
Hi,

I was try it and that doesn't work. InSequence and outSequence has different
ID: 
IN = urn:uuid:9472d761-0148-4b4d-9fd1-80d426ed9f15
OUT = urn:uuid:d7fc77ec-2bb8-4508-9dfc-358f2de625cc



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/How-to-correlate-message-in-ESB-tp150139p150143.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Get started with WSO2 Enterprise Integrator

2017-07-10 Thread Ushani Balasooriya
Hi Adel,

Please see my answers in Blue for your errors. Please note we recommend you
to send your issues via dev  mail list.


** failure installing the EI :

Can you please confirm whether you have picked the correct EI to install?
You can download it from here [1]

[1] http://wso2.com/integration/?src=sidebar#download

Once you download it, please extract the zip file and go to
wso2ei-6.1.1\bin and run the integrator.bat file. When you double click it
should run if the privileges are set to run it as administrator. Otherwise
you can run as Administrator when you right click on it.

**I have then  downloaded the developer studio from the site
https://docs.wso2.com/display/DVS380/Installation#
Installation-Quickinstallation

and extracted the zip file , but I received the attached list of failure

This is a known limitation in Windows due to the max path limit. Please
configure as it is recommended by microsoft.

***Start Eclipse by double-clicking the Eclipse icon in .*

*You can now access the Developer Studio features
.""*

*however ,The Eclipse does not start *

*Do you recommend any action?*

This seems to be an issue in dev studio 3.8.0. I will report an issue on
this. But you can start it when you right click on exe and "Run As
Administrator".

**message when I double clicked the eclipse icon
Can't start Eclipse - Java was started but returned exit code=13

Can you confirm whether you have downloaded the correct eclipse zip? If
your machine is 64 bits, you have to download the 64 bits zip. If the
machine is 32 bits, you have to download the 32 bit zip. You can download
the correct pack from here [2]

[2] http://wso2.com/more-downloads/developer-studio/

Thanks,
Ushani

On Mon, Jul 10, 2017 at 4:20 AM, Mohamed Adel Mohamed Ghanam <
mgha...@msa.eun.eg> wrote:

> I also received the message when I double clicked the eclipse icon
> Can't start Eclipse - Java was started but returned exit code=13
> 
>
>
>
> On Mon, Jul 10, 2017 at 12:23 AM, Mohamed Adel Mohamed Ghanam <
> mgha...@msa.eun.eg> wrote:
>
>> sorry, I missed the list
>>
>> On Mon, Jul 10, 2017 at 12:21 AM, Mohamed Adel Mohamed Ghanam <
>> mgha...@msa.eun.eg> wrote:
>>
>>> Dear Ushani
>>>
>>> because of failure installing the EI , I downloaded successfully the ESB
>>> 4.9.
>>>
>>> I have then  downloaded the developer studio from the site
>>> https://docs.wso2.com/display/DVS380/Installation#Installati
>>> on-Quickinstallation
>>>
>>>
>>> and extracted the zip file , but I received the attached list of
>>> failure. Nevertheless , I have  continued the extract and followed the
>>> following step
>>> "
>>> *"Complete installation*
>>>
>>> *This section describes how to install Developer Studio using the
>>> complete installation distribution.*
>>>
>>>1. *Download  the
>>>Eclipse + Developer Studio 32-bit or 64-bit complete installation
>>>distribution file.*
>>>2. *Start Eclipse by double-clicking the Eclipse icon
>>>in .*
>>>
>>> *You can now access the Developer Studio features
>>> .""*
>>>
>>> *however ,The Eclipse does not start *
>>>
>>> *Do you recommend any action?*
>>>
>>> On Mon, Jul 3, 2017 at 7:05 AM, Ushani Balasooriya 
>>> wrote:
>>>
 Hi Adel,

 Thank you for trying out WSO2 EI product.

 Can you please let me know in which step you encountered an issue?

 Do you get any errors printed on the background?

 Meantime please double check whether you have downloaded the product
 successfully.

 Please make sure you have downloaded the product from this link [1] by
 clicking on the Download Server button.

 [1] http://wso2.com/integration/#download

 Thanks,
 Ushani





> -- Forwarded message --
> From: Mohamed Adel Mohamed Ghanam 
> Date: Mon, Jul 3, 2017 at 3:47 AM
> Subject: Re: Get started with WSO2 Enterprise Integrator
> To: respo...@wso2.com
>
>
> Thank you for your care
>
> I am running windows 10 and Java 1.8
>
> I did download the product  wso2ei-6.1.1
>
> my installation steps follow the following sites
>
> https://docs.wso2.com/display/EI611/Installation+Guide
>
> followed by
>
> https://docs.wso2.com/display/EI611/Installation+Prerequisites
>
> followed
>
> https://docs.wso2.com/display/EI611/Installing+on+Windows
>
>
>
> The installation was not successful .
>
> Kindly advise any more information needed to get your help
>
> On Sat, Jul 1, 2017 at 1:52 PM, WSO2 Enterprise Integrator Team <

Re: [Dev] How to correlate message?

2017-07-10 Thread Sudharma Subasinghe
Hi,

Can you try

org.apache.axis2.context.MessageContext a2mc = ((Axis2MessageContext)
synCtx).getAxis2MessageContext();
a2mc.getMessageID();

inside your custom mediator class to obtain the ID?


On Mon, Jul 10, 2017 at 1:26 PM, Melodias  wrote:

> Hi devs,
>
> How I can correlate message?
> To correlate IN and OUT message i can set properties with uniq string, but
> when i get fault message from the endpoint, then properties is null.
> Is there some special ID in message context which I can get by using class
> mediator?
>
>
>
> --
> View this message in context: http://wso2-oxygen-tank.10903.
> n7.nabble.com/How-to-correlate-message-tp150139.html
> Sent from the WSO2 Development mailing list archive at Nabble.com.
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Sudharma Subasinghe,
Software Engineer,
WSO2 Inc.
Email: sudhar...@wso2.com 
Mobile : +94 710 565 157 <%2B94%20718%20210%20200>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to correlate message?

2017-07-10 Thread Melodias
Hi devs,

How I can correlate message?
To correlate IN and OUT message i can set properties with uniq string, but
when i get fault message from the endpoint, then properties is null.
Is there some special ID in message context which I can get by using class
mediator?



--
View this message in context: 
http://wso2-oxygen-tank.10903.n7.nabble.com/How-to-correlate-message-tp150139.html
Sent from the WSO2 Development mailing list archive at Nabble.com.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev