Re: ERXFrameworkPrincipal
Re: ERXFrameworkPrincipal
- Subject: Re: ERXFrameworkPrincipal
- From: Farrukh Ijaz <email@hidden>
- Date: Tue, 29 Jun 2010 22:02:09 +0300
Dear Mike,
Thanks for your reply. Sorry, but I couldn't get what you just said. Can you please elaborate? See my comments below?
On 2010-06-29, at 8:33 PM, Mike Schrag wrote:
> make sure you set the framework principal class for your framework to point to this class name or it won't be loaded.
The MyWSFramework.class is part of the REQUIRES[] array as well as is used inside the static block:
>> static {
>> setUpFrameworkPrincipalClass(MyWSFramework.class);
>> }
My Wonder Application depends upon this framework. The code I've put in the finishInitialization() of the framework was inside the Application's finishInitialization(). Now the above framework is part of the classpath of the application and is packaged with the application and I can access all the classes and components. This is the only setup I've done for this framework. Is there any other place where I need to call certain method(s) to make it work?
Thanks in advance,
Farrukh
>
> On Jun 29, 2010, at 1:30 PM, Farrukh Ijaz wrote:
>
>> Hi,
>>
>> I'm trying to use the ERXFrameworkPrincipal class. Can someone please explain in layman's term how I should use it? Below is the code.
>>
>> package com.xyz;
>>
>> // Hidden Imports
>>
>> import er.extensions.ERXFrameworkPrincipal;
>> import er.rest.routes.ERXRouteRequestHandler;
>>
>> public class MyWSFramework extends ERXFrameworkPrincipal {
>>
>> public static Class<ERXFrameworkPrincipal>[] REQUIRES = new Class[] {
>> // Hidden required classes
>> };
>>
>> static {
>> setUpFrameworkPrincipalClass(MyWSFramework.class);
>> }
>>
>> @Override
>> public void finishInitialization() {
>> // Initialize CMS Web Services
>> System.err.println("Initializing Web Services...");
>> WOApplication application = WOApplication.application();
>> application.setDefaultRequestHandler(application.requestHandlerForKey(application.directActionRequestHandlerKey()));
>> ERXRouteRequestHandler handler = new SecuredRouteRequestHandler(
>> ERXRouteRequestHandler.WO);
>> // Hidden routes...
>> ERXRouteRequestHandler.register(handler);
>> }
>>
>> }
>>
>> But finishInitialization() doesn't get fired. This lead me to think perhaps all my other frameworks are not being initialized although their finishInitialization() method is left blank.
>>
>> Please do not refer back to the Example code as I've already gone through it and didn't find significant difference in the framework classes.
>>
>> Farrukh
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden