You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Colin Chalmers <co...@xs4all.nl> on 2005/07/25 21:36:24 UTC

Utilising Spring in 1.x

Hi all,

I'm looking forward to working with Jetspeed-2 incorporating the Spring 
integration. However I have to continue with 1.x for the time being 
'till we can plan an upgrade.
I would however like to start replacing the EJB service calls currently 
in our PortalActions and PortletActions. Has anyone tried this or have 
tips as to how/where the Spring ApplicationContext should be loaded and 
accessed? Perhaps adding a ref in the runData Object to pass onto the 
different Objects?

Would welcome any thoughts on this with the goal of easy upgrade to 
jetspeed-2.

Colin

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Utilising Spring in 1.x

Posted by Scott T Weaver <sc...@binary-designs.net>.
Hi Colin,

Depending on how tightly you want to be bound to Jetspeed, you actually use
it's internal Spring engine.  You can export your Spring beans/services
using the jetspeed-portlet.xml the access these via
PortletContext.getAttribute().  For a good, working example take a look at
jetspeed-portlet.xml under applications/pam/src/webapp/WEB-INF and
org.apache.jetspeed.portlets.pam.PortletApplicationDetail.java under
applications/pam/src/java.

Hth,
-Scott

> -----Original Message-----
> From: Colin Chalmers [mailto:colnews@xs4all.nl]
> Sent: Wednesday, July 27, 2005 2:01 AM
> To: Jetspeed Users List
> Subject: Re: Utilising Spring in 1.x
> 
> Hi Jing,
> 
> Thx for the tip. I did look into this a couple of months ago and may go
> down this path at a later date.
> What I'm looking for initially is how/where best to load spring so that
> I can access (Spring) services from Portal- PortletActions.
> 
> I thought about a/the BasePortalAction for starters but is the context
> file not read every time an action is accessed or does spring cache this
> in the background?
> 
> Colin
> 
> Jing Xue wrote:
> 
> > Colin Chalmers wrote:
> >
> >> Hi all,
> >>
> >> I'm looking forward to working with Jetspeed-2 incorporating the
> >> Spring integration. However I have to continue with 1.x for the time
> >> being 'till we can plan an upgrade.
> >> I would however like to start replacing the EJB service calls
> >> currently in our PortalActions and PortletActions. Has anyone tried
> >> this or have tips as to how/where the Spring ApplicationContext
> >> should be loaded and accessed? Perhaps adding a ref in the runData
> >> Object to pass onto the different Objects?
> >>
> >> Would welcome any thoughts on this with the goal of easy upgrade to
> >> jetspeed-2.
> >>
> > Hi Colin,
> > Have you looked at Spring Portlet Support?
> > http://opensource.atlassian.com/confluence/spring/display/JSR168/Home
> >
> > It's currently still in the sandbox, but from my experience it's
> > fairly stable by now. Most of the APIs are directly ported from Spring
> > MVC, so it's also easy to learn if you have used the latter.
> >
> > HTH.
> > --Jing
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Utilising Spring in 1.x

Posted by Colin Chalmers <co...@xs4all.nl>.
Hi Jing,

Thx for the tip. I did look into this a couple of months ago and may go 
down this path at a later date.
What I'm looking for initially is how/where best to load spring so that 
I can access (Spring) services from Portal- PortletActions.

I thought about a/the BasePortalAction for starters but is the context 
file not read every time an action is accessed or does spring cache this 
in the background?

Colin

Jing Xue wrote:

> Colin Chalmers wrote:
>
>> Hi all,
>>
>> I'm looking forward to working with Jetspeed-2 incorporating the 
>> Spring integration. However I have to continue with 1.x for the time 
>> being 'till we can plan an upgrade.
>> I would however like to start replacing the EJB service calls 
>> currently in our PortalActions and PortletActions. Has anyone tried 
>> this or have tips as to how/where the Spring ApplicationContext 
>> should be loaded and accessed? Perhaps adding a ref in the runData 
>> Object to pass onto the different Objects?
>>
>> Would welcome any thoughts on this with the goal of easy upgrade to 
>> jetspeed-2.
>>
> Hi Colin,
> Have you looked at Spring Portlet Support? 
> http://opensource.atlassian.com/confluence/spring/display/JSR168/Home
>
> It's currently still in the sandbox, but from my experience it's 
> fairly stable by now. Most of the APIs are directly ported from Spring 
> MVC, so it's also easy to learn if you have used the latter.
>
> HTH.
> --Jing
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Utilising Spring in 1.x

Posted by Jing Xue <jx...@digizenstudio.com>.
Colin Chalmers wrote:

> Hi all,
>
> I'm looking forward to working with Jetspeed-2 incorporating the 
> Spring integration. However I have to continue with 1.x for the time 
> being 'till we can plan an upgrade.
> I would however like to start replacing the EJB service calls 
> currently in our PortalActions and PortletActions. Has anyone tried 
> this or have tips as to how/where the Spring ApplicationContext should 
> be loaded and accessed? Perhaps adding a ref in the runData Object to 
> pass onto the different Objects?
>
> Would welcome any thoughts on this with the goal of easy upgrade to 
> jetspeed-2.
>
Hi Colin,
Have you looked at Spring Portlet Support? 
http://opensource.atlassian.com/confluence/spring/display/JSR168/Home

It's currently still in the sandbox, but from my experience it's fairly 
stable by now. Most of the APIs are directly ported from Spring MVC, so 
it's also easy to learn if you have used the latter.

HTH.
--Jing


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org