Hi all, This is what I have tried up to now,
I tried with Method 1 explained by Ruchira, which is to add a router.jag and intercept incoming requests and route them after doing tenant/context initialization stuff. Problem with that was : all the files other than .jag files(ex: .css , font files .jpeg etc) are coming to this and when trying to include those it gives a compilation error. Then tried with sandboxing (starting and ending tenant flow) the module method of jagg.jag file. Failed! Then tried with sandboing the block method of jagg.jag file. Failed! same problem occurred in both scenarios. Problem with above was : by the time code executes at module layer , tenant flow has already been started and ended as well. So at that time context tenant is carbon.super. Then tried with sandboxing the render method of jagg.jag. Above problem was vanished and another problem occurred, That is : we found that other than the requests for pages , there are some ajax calls directly coming to block layer, since theres no rendering happenning, no tenant flow has been started as well. Then what we did was we added a router.jagg and and a url mapping for "/site/blocks/*" in jaggerry.conf and inside the router.jag we included the file. Now everything is working fine except for a NPE while publishing messages to the wall. Will work with Manu tomorrow morning and update further. @Ruchira, Do we need to create a redmine item for this one ? Thanks On Mon, Mar 16, 2015 at 7:15 PM, Mahesh Chinthaka <[email protected]> wrote: > Hi Ruchira, > > Actually I tried with Method 1 and I'm getting some errors. > I talked to SameeraM and UdaraR from jaggeey team. As per the discussion, > > In Appfactory appmgt app, we are using 'block model'. > Will it be ok if I sandbox the module method in jagg.jag file ? > > Thanks > > > On Fri, Mar 13, 2015 at 3:46 PM, Ruchira Wageesha <[email protected]> > wrote: > >> Hi Mahesh, >> >> I will not be available in the office for next 2 weeks. But here is the >> method I initially had in my mind. >> >> i.e. All request are mapped to a single *.jag file. From that *.jag file, >> you check the request URL and find the requested *.jag file path[1]. After >> that you do whatever the tenant initialization stuff and include [1] using >> Jaggery's include method. Later, you can end the tenant flow and complete >> the request flow. >> >> *Method 1:* >> >> i.e. at jaggery.conf >> >> * ---> router.jag >> >> at router.jag >> ---------------- >> >> infer tenant and start tenant flow >> try { >> include the requested Jaggery file >> } finally { >> end tenant flow >> } >> >> >> *Method 2:* (If method #1 doesn't work for you) >> >> Implement set of handlers(would have to be specified at jaggery.conf as >> *.jag or *.js files) to intercept incoming and outgoing HTTP requests. For >> this, you might need to improve Jaggery code. >> >> Anyway, for both the options, please talk either to Manu or Jaggery team. >> >> /Ruchira >> >> On Fri, Mar 13, 2015 at 3:17 PM, Mahesh Chinthaka <[email protected]> >> wrote: >> >>> Hi Ruchira, >>> >>> Im gonna take this task over and do the implementation. >>> Could you please let me know a feasible time for you to have a chat on >>> this ? >>> >>> Thanks >>> >>> On Thu, Jan 29, 2015 at 2:51 PM, Dimuthu Leelarathne <[email protected]> >>> wrote: >>> >>>> Hi, >>>> >>>> In AF we want to define set of actions that should execute before a >>>> request and clean it on response. We cannot do it it by tomcat valves >>>> because one of the actions is "start tenant flow" and "set governance >>>> artefact navigator". This is not possible right now in a straight forward >>>> way. >>>> >>>> Could we get an extension in Jaggery to do this? >>>> >>>> thanks, >>>> dimuthu >>>> >>>> >>>> -- >>>> Dimuthu Leelarathne >>>> Architect & Product Lead of App Factory >>>> >>>> WSO2, Inc. (http://wso2.com) >>>> email: [email protected] >>>> Mobile : 0773661935 >>>> >>>> Lean . Enterprise . Middleware >>>> >>>> _______________________________________________ >>>> Architecture mailing list >>>> [email protected] >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>> >>>> >>> >>> >>> -- >>> *Mahesh Chinthaka Vidanagama* | Software Engineer >>> WSO2, Inc | lean. enterprise. middleware. >>> #20, Palm Grove, Colombo 03, Sri Lanka >>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345 >>> Email: [email protected] | Web: www.wso2.com >>> >> >> >> >> -- >> >> *Ruchira Wageesha**Associate Technical Lead* >> *WSO2 Inc. - lean . enterprise . middleware | wso2.com <http://wso2.com>* >> >> *email: [email protected] <[email protected]>, blog: >> ruchirawageesha.blogspot.com <http://ruchirawageesha.blogspot.com>, >> mobile: +94 77 5493444 <%2B94%2077%205493444>* >> > > > > -- > *Mahesh Chinthaka Vidanagama* | Software Engineer > WSO2, Inc | lean. enterprise. middleware. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 71 63 63 083 | Work: +94 112 145 345 > Email: [email protected] | Web: www.wso2.com > -- *Mahesh Chinthaka Vidanagama* | Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 63 63 083 | Work: +94 112 145 345 Email: [email protected] | Web: www.wso2.com
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
