Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-18 Thread Afkham Azeez
Hasini,
Please fix the Embedded LDAP starting code so that I can commit the port
offset fix.


On Tue, May 17, 2011 at 2:06 AM, Hasini Gunasinghe has...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 This was changed to return port as int type, in CarbonUtils.java.

 Due to that change following classes needed to be chaged:
 1. LDAPConnectionContext.java, LDAPUserStoreManager.java - verified.
 2. HttpTransport.java - Here I only commented out the string to int
 conversions made earlier. Please remove the unnecessary code as of now.
 3. JMXServerManager.java

 I built the core and tested the changed bundles by deploying in a
 near-latest build. Didn't find any issues. Hence committed.

 Please let me know if you find any regression issues due to changes.

 Will do the other fix too that is mentioned earlier in this thread.

 Thanks,
 Hasini.



 When introducing above method, the purpose was to override only the part
 what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


 Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will do
 that change. But then we have to convert to a string again to combine it 
 and
 construct the url.
 Please let me know if I need to proceed changing the return type to int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe 
 has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it
 to read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.comwrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error 
 obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml
 file, but connecting to that is done using the
 CarbonUtils.getPortFromServerConfig method. Because of this, I cannot 
 get
 the port Offset to work. Please fix this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*





 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 

Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-18 Thread Hasini Gunasinghe
On Wed, May 18, 2011 at 12:28 PM, Afkham Azeez az...@wso2.com wrote:

 Hasini,
 Please fix the Embedded LDAP starting code so that I can commit the port
 offset fix.


Sure, I am currently working on it.
Thanks,
Hasini.



 On Tue, May 17, 2011 at 2:06 AM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 This was changed to return port as int type, in CarbonUtils.java.

 Due to that change following classes needed to be chaged:
 1. LDAPConnectionContext.java, LDAPUserStoreManager.java - verified.
 2. HttpTransport.java - Here I only commented out the string to int
 conversions made earlier. Please remove the unnecessary code as of now.
 3. JMXServerManager.java

 I built the core and tested the changed bundles by deploying in a
 near-latest build. Didn't find any issues. Hence committed.

 Please let me know if you find any regression issues due to changes.

 Will do the other fix too that is mentioned earlier in this thread.

 Thanks,
 Hasini.



 When introducing above method, the purpose was to override only the
 part what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


 Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will
 do that change. But then we have to convert to a string again to combine 
 it
 and construct the url.
 Please let me know if I need to proceed changing the return type to
 int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe 
 has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server
 component which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it
 to read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.comwrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error 
 obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml
 file, but connecting to that is done using the
 CarbonUtils.getPortFromServerConfig method. Because of this, I cannot 
 get
 the port Offset to work. Please fix this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*





 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 

Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-18 Thread Hasini Gunasinghe
On Wed, May 18, 2011 at 12:33 PM, Hasini Gunasinghe has...@wso2.com wrote:



 On Wed, May 18, 2011 at 12:28 PM, Afkham Azeez az...@wso2.com wrote:

 Hasini,
 Please fix the Embedded LDAP starting code so that I can commit the port
 offset fix.


 Sure, I am currently working on it.


I fixed it, tested and committed. Please let me know if you find any issues.
And sorry that you had to wait till this is done to commit your work.

Thanks,
Hasini.


 Thanks,
 Hasini.



 On Tue, May 17, 2011 at 2:06 AM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe 
 has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.comwrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 This was changed to return port as int type, in CarbonUtils.java.

 Due to that change following classes needed to be chaged:
 1. LDAPConnectionContext.java, LDAPUserStoreManager.java - verified.
 2. HttpTransport.java - Here I only commented out the string to int
 conversions made earlier. Please remove the unnecessary code as of now.
 3. JMXServerManager.java

 I built the core and tested the changed bundles by deploying in a
 near-latest build. Didn't find any issues. Hence committed.

 Please let me know if you find any regression issues due to changes.

 Will do the other fix too that is mentioned earlier in this thread.

 Thanks,
 Hasini.



 When introducing above method, the purpose was to override only the
 part what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


 Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will
 do that change. But then we have to convert to a string again to combine 
 it
 and construct the url.
 Please let me know if I need to proceed changing the return type to
 int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.com
  wrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server
 component which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it
 to read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.comwrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error 
 obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml
 file, but connecting to that is done using the
 CarbonUtils.getPortFromServerConfig method. Because of this, I cannot 
 get
 the port Offset to work. Please fix this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . 

Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-18 Thread Afkham Azeez
Thanks  no problem
On May 18, 2011 1:49 PM, Hasini Gunasinghe has...@wso2.com wrote:
 On Wed, May 18, 2011 at 12:33 PM, Hasini Gunasinghe has...@wso2.com
wrote:



 On Wed, May 18, 2011 at 12:28 PM, Afkham Azeez az...@wso2.com wrote:

 Hasini,
 Please fix the Embedded LDAP starting code so that I can commit the port
 offset fix.


 Sure, I am currently working on it.


 I fixed it, tested and committed. Please let me know if you find any
issues.
 And sorry that you had to wait till this is done to commit your work.

 Thanks,
 Hasini.


 Thanks,
 Hasini.



 On Tue, May 17, 2011 at 2:06 AM, Hasini Gunasinghe has...@wso2.com
wrote:



 On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe has...@wso2.com
wrote:



 On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.com
wrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com
wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 This was changed to return port as int type, in CarbonUtils.java.

 Due to that change following classes needed to be chaged:
 1. LDAPConnectionContext.java, LDAPUserStoreManager.java - verified.
 2. HttpTransport.java - Here I only commented out the string to int
 conversions made earlier. Please remove the unnecessary code as of now.
 3. JMXServerManager.java

 I built the core and tested the changed bundles by deploying in a
 near-latest build. Didn't find any issues. Hence committed.

 Please let me know if you find any regression issues due to changes.

 Will do the other fix too that is mentioned earlier in this thread.

 Thanks,
 Hasini.



 When introducing above method, the purpose was to override only the
 part what represents the port in LDAP connection url mentioned in
the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


 Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above
method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I
will
 do that change. But then we have to convert to a string again to
combine it
 and construct the url.
 Please let me know if I need to proceed changing the return type to
 int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe 
has...@wso2.com
  wrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP
port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server
 component which starts before user-core.
 Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it
 to read it from carbon.xml

 2. When user manager connects to the user store - this is done in
 user-core.
 Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where
I
 should fix this?
 Do I need to make both places read directly from carbon.xml or
both
 places read port through CarbonUtils.getPortFromServerConfig
method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com
wrote:

 [2011-05-16 22:33:15,402] INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} - Starting
directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} - Error
obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml
 file, but connecting to that is done using the
 CarbonUtils.getPortFromServerConfig method. Because of this, I
cannot get
 the port Offset to work. Please fix this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*
http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*
http://twitter.com/afkham_azeez

[Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Afkham Azeez
[2011-05-16 22:33:15,402]  INFO
{org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
service on port 10399
[2011-05-16 22:33:18,567] ERROR
{org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
connection. localhost:10401

The port creation is done by directly reading form the carbon.xml file, but
connecting to that is done using the CarbonUtils.getPortFromServerConfig
method. Because of this, I cannot get the port Offset to work. Please fix
this ASAP.

-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/**
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Hasini Gunasinghe
Hi Azeez,

I didn't clearly get the problem here. Let me explain the LDAP port usage.
There are two places where LDAP port is used in code.

1. When starting embedded-ldap - this is done in ldap-server component which
starts before user-core.
   Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to read
it from carbon.xml

2. When user manager connects to the user store -  this is done in
user-core.
   Earlier port was in user-mgt.xml and I made it overridden from
carbon.xml.

I understand it is done in two ways. Can you please explain where I should
fix this?
Do I need to make both places read directly from carbon.xml or both places
read port through CarbonUtils.getPortFromServerConfig method?

Thanks,
Hasini.

On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file, but
 connecting to that is done using the CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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


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


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Afkham Azeez
On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.com wrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port usage.
 There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml


Starting code does not use the  CarbonUtils.getPortFromServerConfig method,
but the connection part mentioned below uses that method. So, when you do
the same thing in two different ways, there will be inconsistencies, as I
discovered by introducing the port offset.


 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I should
 fix this?
 Do I need to make both places read directly from carbon.xml or both places
 read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/**
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Afkham Azeez
In addition;
public static String getPortFromServerConfig(String property) {

ports are always integers. Is it possible for you to change that?


On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.com wrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port usage.
 There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I should
 fix this?
 Do I need to make both places read directly from carbon.xml or both places
 read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/**
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Hasini Gunasinghe
On Mon, May 16, 2011 at 11:09 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port usage.
 There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml


 Starting code does not use the  CarbonUtils.getPortFromServerConfig method,
 but the connection part mentioned below uses that method. So, when you do
 the same thing in two different ways, there will be inconsistencies, as I
 discovered by introducing the port offset.


IIRC, CarbonUtils.getPortFromServerConfig method has not been introduced
when above fix was done.
So I will change it to read port from CarbonUtils.getPortFromServerConfig
 method.


 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I should
 fix this?
 Do I need to make both places read directly from carbon.xml or both places
 read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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


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


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Hasini Gunasinghe
On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


When introducing above method, the purpose was to override only the part
what represents the port in LDAP connection url mentioned in the
user-mgt.xml.
So after reading the port from above method, I combined it again to
construct the LDAP url which is a string and that it why above method
returns the string itself read from carbon.xml.

If the correct way is to return it after converting to an int, I will do
that change. But then we have to convert to a string again to combine it and
construct the url.
Please let me know if I need to proceed changing the return type to int.

Thanks,
Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port usage.
 There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I should
 fix this?
 Do I need to make both places read directly from carbon.xml or both places
 read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Afkham Azeez
On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 When introducing above method, the purpose was to override only the part
 what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


Ports are not always used to construct URLs as in your case.


 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will do
 that change. But then we have to convert to a string again to combine it and
 construct the url.
 Please let me know if I need to proceed changing the return type to int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the 
 CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*





-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
* http://www.apache.org/**
email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
blog: **http://blog.afkham.org* http://blog.afkham.org*
twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
___
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Hasini Gunasinghe
On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


 When introducing above method, the purpose was to override only the part
 what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will do
 that change. But then we have to convert to a string again to combine it and
 construct the url.
 Please let me know if I need to proceed changing the return type to int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml file,
 but connecting to that is done using the 
 CarbonUtils.getPortFromServerConfig
 method. Because of this, I cannot get the port Offset to work. Please fix
 this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*





 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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


Re: [Carbon-dev] LDAP ports reading from carbon.xml is inconsistent!

2011-05-16 Thread Hasini Gunasinghe
On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe has...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez az...@wso2.com wrote:



 On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe has...@wso2.comwrote:



 On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez az...@wso2.com wrote:

 In addition;
 public static String getPortFromServerConfig(String property) {

 ports are always integers. Is it possible for you to change that?


This was changed to return port as int type, in CarbonUtils.java.

Due to that change following classes needed to be chaged:
1. LDAPConnectionContext.java, LDAPUserStoreManager.java - verified.
2. HttpTransport.java - Here I only commented out the string to int
conversions made earlier. Please remove the unnecessary code as of now.
3. JMXServerManager.java

I built the core and tested the changed bundles by deploying in a
near-latest build. Didn't find any issues. Hence committed.

Please let me know if you find any regression issues due to changes.

Will do the other fix too that is mentioned earlier in this thread.

Thanks,
Hasini.



 When introducing above method, the purpose was to override only the part
 what represents the port in LDAP connection url mentioned in the
 user-mgt.xml.


 Ports are not always used to construct URLs as in your case.


 Agree. Will change it accordingly.



 So after reading the port from above method, I combined it again to
 construct the LDAP url which is a string and that it why above method
 returns the string itself read from carbon.xml.

 If the correct way is to return it after converting to an int, I will do
 that change. But then we have to convert to a string again to combine it and
 construct the url.
 Please let me know if I need to proceed changing the return type to int.

 Thanks,
 Hasini.



 On Mon, May 16, 2011 at 11:01 PM, Hasini Gunasinghe has...@wso2.comwrote:

 Hi Azeez,

 I didn't clearly get the problem here. Let me explain the LDAP port
 usage. There are two places where LDAP port is used in code.

 1. When starting embedded-ldap - this is done in ldap-server component
 which starts before user-core.
Earlier the port was in embedded-ldap.xml and AmilaJ has fixed it to
 read it from carbon.xml

 2. When user manager connects to the user store -  this is done in
 user-core.
Earlier port was in user-mgt.xml and I made it overridden from
 carbon.xml.

 I understand it is done in two ways. Can you please explain where I
 should fix this?
 Do I need to make both places read directly from carbon.xml or both
 places read port through CarbonUtils.getPortFromServerConfig method?

 Thanks,
 Hasini.

 On Mon, May 16, 2011 at 10:39 PM, Afkham Azeez az...@wso2.com wrote:

 [2011-05-16 22:33:15,402]  INFO
 {org.wso2.carbon.ldap.server.DirectoryActivator} -  Starting directory
 service on port 10399
 [2011-05-16 22:33:18,567] ERROR
 {org.wso2.carbon.user.core.ldap.LDAPConnectionContext} -  Error obtaining
 connection. localhost:10401

 The port creation is done by directly reading form the carbon.xml
 file, but connecting to that is done using the
 CarbonUtils.getPortFromServerConfig method. Because of this, I cannot get
 the port Offset to work. Please fix this ASAP.

 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*


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



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




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: 
 **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*





 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/**
 email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919
 blog: **http://blog.afkham.org* http://blog.afkham.org*
 twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez
 *
 linked-in: **http://lk.linkedin.com/in/afkhamazeez*
 *
 *
 *Lean . Enterprise . Middleware*



___
Carbon-dev mailing list