Hi Francisco,

You can run your existing code and Magnolia in the same webapp. What you'd do 
is add the Spring context loader listener to web.xml and your servlets and 
filters. What you'll need to do after that is make magnolia ignore all requests 
that you want your servlets to handle. This is done by adding bypasses to the 
Magnolia filter chain [1].

In this setup Spring is started even when Magnolia starts in install-update 
mode. Which is fine unless you have code in your application that uses Magnolia 
apis and depends on for instance the content repository being available. Then 
you need to start spring as a module, do that by writing your own module and 
inherit from BlossomModuleSupport. There's an example of this on the Blossom 
documentation page [2] and the sample [3] shows how to do the module.

At that point you will also need to defer initialization of your servlets and 
filters until Magnolia completes the install-update phase. For this purpose 
Blossom ships with a DispatcherServlet class [4] that does exactly this and a 
filter [5] that does the same.

As for Spring Security, see this thread [6] on the topic, using the filter 
mentioned above solved it for them.

Hope that helps,
Tobias

[1] 
http://documentation.magnolia-cms.com/technical-guide/request-processing-and-filters.html#Dispatching
[2] http://documentation.magnolia-cms.com/modules/blossom.html
[3] http://documentation.magnolia-cms.com/modules/blossom.html#GettingStarted
[4] 
http://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/modules/magnolia-module-blossom/2.0/magnolia-module-blossom/apidocs/info/magnolia/module/blossom/web/InstallationAwareDispatcherServlet.html
[5] 
http://nexus.magnolia-cms.com/content/sites/magnolia.public.sites/modules/magnolia-module-blossom/2.0/magnolia-module-blossom/apidocs/info/magnolia/module/blossom/web/InstallationAwareDelegatingFilterProxy.html
[6] 
http://forum.magnolia-cms.com/forum/thread.html?threadId=e8fc4df7-15bd-49de-ae4f-27dc66ed6a45#9e5106cf-87eb-4d72-a7dc-2f72fa531e2a

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=7e735c17-8e37-4882-9bd3-8f400a5b4195


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to