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 <[email protected]> wrote: > > > On Mon, May 16, 2011 at 11:43 PM, Hasini Gunasinghe <[email protected]>wrote: > >> >> >> On Mon, May 16, 2011 at 11:34 PM, Afkham Azeez <[email protected]> wrote: >> >>> >>> >>> On Mon, May 16, 2011 at 11:30 PM, Hasini Gunasinghe <[email protected]>wrote: >>> >>>> >>>> >>>> On Mon, May 16, 2011 at 11:11 PM, Afkham Azeez <[email protected]> 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 >>>>> <[email protected]>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 <[email protected]>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: **[email protected]* <[email protected]>* 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 >>>>>>> [email protected] >>>>>>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Carbon-dev mailing list >>>>>> [email protected] >>>>>> 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: **[email protected]* <[email protected]>* 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: **[email protected]* <[email protected]>* 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: **[email protected]* <[email protected]>* 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 [email protected] http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
