Re: Why application is parsed twice

2014-12-21 Thread Imesh Gunaratne
Great thanks Udara! On Mon, Dec 22, 2014 at 10:01 AM, Udara Liyanage wrote: > Hi Imesh, > > I changed this to application creating time, but could not push the > changes. > > On Sun, Dec 21, 2014 at 11:48 PM, Imesh Gunaratne > wrote: >> >> Hi Udara, >> >> Thanks for the information, I see the b

Re: Why application is parsed twice

2014-12-21 Thread Udara Liyanage
Hi Imesh, I changed this to application creating time, but could not push the changes. On Sun, Dec 21, 2014 at 11:48 PM, Imesh Gunaratne wrote: > > Hi Udara, > > Thanks for the information, I see the below logic > in DefaultApplicationParser: > > private ApplicationClusterContext createApplicati

Re: Why application is parsed twice

2014-12-21 Thread Imesh Gunaratne
Hi Udara, Thanks for the information, I see the below logic in DefaultApplicationParser: private ApplicationClusterContext createApplicationClusterContext () throws ApplicationDefinitionException { ... String oAuth_token = createToken(appId); payloadData.add(TO

Re: Why application is parsed twice

2014-12-21 Thread Udara Liyanage
Hi Imesh, Below are the admin services using and operations OAuthAdminService - registerOAuthApplicationData IdentityApplicationManagementService - createApplication, getApplication, updateApplication Since authentication handlers does not set the carbon context, there is no way of identifying t

Re: Why application is parsed twice

2014-12-21 Thread Imesh Gunaratne
Can you please explain those admin calls Udara? I can see ten user logins for an application having two cartridges for one application parse process: [2014-12-21 04:21:56,892] INFO {org.apache.stratos.autoscaler.api.AutoScalerServiceImpl} - Starting to add application: [application-id] single-gr

Re: Why application is parsed twice

2014-12-21 Thread Udara Liyanage
Hi, Token generation has 2,3 admin calls and since token is generated twice per application (since application is parsed twice). That is why you see many logging logs. Touched, not typed. Erroneous words are a feature, not a typo.

Re: Why application is parsed twice

2014-12-21 Thread Imesh Gunaratne
Yes we could persist the parsed application and re-use it in the deployment process. We could do this improvement. BTW why do we see a list of user login statements in the log during the application parse process? Thanks On Sun, Dec 21, 2014 at 12:54 PM, Udara Liyanage wrote: > Hi, > > Applicat

Re: Why application is parsed twice

2014-12-20 Thread Udara Liyanage
Hi, Application is parsed and handleApplicationCreated is called. We need to improve this to use applicationContext which is created at application created time 1. ApplicationContext applicationContext = RegistryManager.getInstance().getApplicationContext(applicationId); 2. if

Re: Why application is parsed twice

2014-12-20 Thread Udara Liyanage
Hi, Sorry for the buzz, application is parsed if not exists in applicationContext. On Sun, Dec 21, 2014 at 12:00 PM, Udara Liyanage wrote: > > Hi Imesh, Reka, > > Just wanted to know why application is parsed at > 1) application creation time > 2) application deployment time > > Currentl

Why application is parsed twice

2014-12-20 Thread Udara Liyanage
Hi Imesh, Reka, Just wanted to know why application is parsed at 1) application creation time 2) application deployment time Currently token is created at application parsing time(ideally should not), thus token creating occurred twice. -- Udara Liyanage Software Engineer WSO2, Inc.: h