Hi, On Mon, Aug 12, 2013 at 10:37 AM, Pradeep Fernando <[email protected]> wrote:
> Hi, > > let me re-iterate the problem, i may be wrong here... > > - when we create secondary user-stores for tenants those get persisted in > the file system. > - They get deployed via deployers during server-startup/hot deployment > - for user-core initialization we only need data-sources needed by the > user-mgt.xml > - Axis2Deployers get engaged during carbon-core initialization.. > - by that time we have registry fully initialized. > > so why this problem. Please help me to understand.. > I believe you're right in what you've mentioned. Basically, in tenant mode, AFAIR, the data sources are initialized in DataSourceAxis2ConfigurationContextObserver which extends Axis2ConfigurationContextObserver. And I believe, there's no strong order in initializing those observers at runtime which might have had something to do with this. So when a tenant is loaded, it would first try to initialize it's user-store, thereby requiring to have it's data source initialized prior to that (Please correct me if I'm wrong). I guess, it's likely we would run into a similar problem if that particular order is not preserved. > > thanks. > > > On Mon, Aug 12, 2013 at 10:26 AM, Sumedha Rubasinghe <[email protected]>wrote: > >> >> >> On Mon, Aug 12, 2013 at 10:10 AM, Pradeep Fernando <[email protected]>wrote: >> >>> Hi Prabath/Sumedha, >>> >>> AFAIK, we ditched the inline data-source model and moved to a centrally >>> defined data-source model sometime back. Aren't we going backwards with >>> this modification ? >>> >>> If i understand it correct, now we have, >>> >>> master-datasource for super-tenant >>> registry stored datasources for tenants >>> user-store DB stored datasources for user-store needs. >>> >>> IMHO, this looks like a hack. What we really should do is fixing the >>> tenant data-source model. May be registry is not the correct place to store >>> datasources... >>> >> >> Yes.. This is a hack. So far G-Reg is our de-facto location for storing >> configurations. The problem here is User core starts up before Registry >> does. Reverse order is not possible. >> How about updating tenant specific datasources.properties first (at the >> point of creating a datasource) & syncing with G-Reg later? >> >> >> >> >>> >>> >>> >>> On Mon, Aug 12, 2013 at 8:43 AM, Prabath Siriwardena >>> <[email protected]>wrote: >>> >>>> With the patch Darshana provided - the issue is fixed now.. Datasource >>>> configuration is stored with userstore manager for secondary user stores... >>>> >>>> Thanks & regards, >>>> -Prabath >>>> >>>> >>>> On Mon, Aug 12, 2013 at 8:30 AM, Sumedha Rubasinghe >>>> <[email protected]>wrote: >>>> >>>>> Prabath, >>>>> AFAIR data sources defined in user-store configuration are not stored >>>>> in a multi tenanted manner. Since you already have the set up running, >>>>> could you check if the same data source can be accessed from another >>>>> tenant? >>>>> >>>>> >>>>> On Mon, Aug 12, 2013 at 7:36 AM, Prabath Siriwardena <[email protected] >>>>> > wrote: >>>>> >>>>>> Applied the patch at revision 180626. Thanks Darshana...! >>>>>> >>>>>> Regards, >>>>>> -Prabath >>>>>> >>>>>> >>>>>> On Sun, Aug 11, 2013 at 9:38 PM, Darshana Gunawardana < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Asela, PrabathA and myself had offline chat regarding [1] which has >>>>>>> the same root cause for this. >>>>>>> >>>>>>> The problem is that datasources created using UI which persists as >>>>>>> registry resources and we need to access them user.core startup. But >>>>>>> registry is not available in that time. With these constraints, proposed >>>>>>> solution was defining data-source configurations in line with user-store >>>>>>> configurations. >>>>>>> >>>>>>> [1] - https://wso2.org/jira/browse/IDENTITY-1526 >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> >>>>>>> On Sun, Aug 11, 2013 at 8:32 PM, Prabath Siriwardena < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Created a datasource pointing to a mysql database - please see >>>>>>>> the configuration attached. >>>>>>>> >>>>>>>> Then created a secondary UserstoreManager from the UI - under the >>>>>>>> same tenant - pointing to the above datasource. >>>>>>>> >>>>>>>> All worked fine.. >>>>>>>> >>>>>>>> Then restarted.. and getting the following error.... >>>>>>>> >>>>>>>> Caused by: javax.naming.NameNotFoundException: Name [jdbc/mysql] is >>>>>>>> not bound in this Context. Unable to find [jdbc]. >>>>>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:820) >>>>>>>> at org.apache.naming.NamingContext.lookup(NamingContext.java:168) >>>>>>>> at >>>>>>>> org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContext.lookup(CarbonContextDataHolder.java:916) >>>>>>>> at javax.naming.InitialContext.lookup(InitialContext.java:392) >>>>>>>> at javax.naming.InitialContext.doLookup(InitialContext.java:265) >>>>>>>> at >>>>>>>> org.wso2.carbon.user.core.util.DatabaseUtil.lookupDataSource(DatabaseUtil.java:91) >>>>>>>> >>>>>>>> Any thoughts ? >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Thanks & Regards, >>>>>>>> Prabath >>>>>>>> >>>>>>>> Mobile : +94 71 809 6732 >>>>>>>> >>>>>>>> http://blog.facilelogin.com >>>>>>>> http://RampartFAQ.com >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Dev mailing list >>>>>>>> [email protected] >>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Regards, >>>>>>> >>>>>>> * >>>>>>> Darshana Gunawardana >>>>>>> *Software Engineer >>>>>>> WSO2 Inc.; http://wso2.com* >>>>>>> E-mail: [email protected] >>>>>>> **Mobile: +94718566859 >>>>>>> *Lean . Enterprise . Middleware >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks & Regards, >>>>>> Prabath >>>>>> >>>>>> Mobile : +94 71 809 6732 >>>>>> >>>>>> http://blog.facilelogin.com >>>>>> http://RampartFAQ.com >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> /sumedha >>>>> b : bit.ly/sumedha >>>>> >>>> >>>> >>>> >>>> -- >>>> Thanks & Regards, >>>> Prabath >>>> >>>> Mobile : +94 71 809 6732 >>>> >>>> http://blog.facilelogin.com >>>> http://RampartFAQ.com >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Pradeep Fernando* >>> Associate Technical Lead;WSO2 Inc.; http://wso2.com >>> >>> blog: http://pradeepfernando.blogspot.com >>> m: +94776603662 >>> >> >> >> >> -- >> /sumedha >> b : bit.ly/sumedha >> > > > > -- > *Pradeep Fernando* > Associate Technical Lead;WSO2 Inc.; http://wso2.com > > blog: http://pradeepfernando.blogspot.com > m: +94776603662 > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Prabath Abeysekara Associate Technical Lead, Data TG. WSO2 Inc. Email: [email protected] <[email protected]> Mobile: +94774171471 <http://harshana05.blogspot.com/>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
