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 Dan Olsen <da...@utah.gov> on 2008/06/03 17:38:20 UTC

Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can access the database but I can't seem to get access to it. Does anyone know how Jetspeed is setting up the database connection? When I try the following code, I get a naming exception. If anyone knows why that code does not get the work please let me know ASAP. Thanks!
 
==== BEGIN MY getConnection FUNCTION ====
public static Connection getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }
 
  return null;
 }
 
==== END MY getConnection FUNCTION ====

Re: Accessing Jetspeed Database

Posted by Dan Olsen <da...@utah.gov>.
I am building portlets that are going into Jetspeed.

>>> David Sean Taylor <da...@bluesunrise.com> 6/3/2008 1:58 PM >>>

On Jun 3, 2008, at 12:41 PM, Dan Olsen wrote:

> So I have the following line of code:
>
> DataSource ds = DataSourceFactory.getInstance();
>
> Should I now be able to call ds.getConnection()? I do this and I am  
> getting errors saying my connection is null.
>


Its not clear whether you are working from within the Jetspeed webapp,  
or another portlet application
If you are writing portal code (inside Jetspeed), I recommend simply  
using Spring to wire it together
There are plenty of examples of that in the WEB-INF/assembly directory

I suspect you are probably working on your own web (portlet) application
In this case, you will not have access to Jetspeed's data source from  
you web app, nor will you have direct access to our spring container
However we do provide Jetspeed Services for portlets. There a lots of  
examples of this in the j2-admin portlet application
Take a look at the jetspeed-portlet.xml for the j2-admin app:

<js:services>
         <js:service name='ApplicationServerManager'/>
         <js:service name='DeploymentManager'/>
<js:service name='EntityAccessor'/>
         <js:service name='GroupManager'/>
         <js:service name='PageManager'/>
         <js:service name='PermissionManager'/>
         <js:service name='PortletFactory'/>
         <js:service name='PortalAdministration'/>
         <js:service name='PortletRegistryComponent'/>
         <js:service name='PortalStatistics'/>
         <js:service name="Profiler" />
         <js:service name='RoleManager'/>
    <js:service name='SearchComponent'/>
         <js:service name="SSO" />
         <js:service name='UserManager'/>
         <js:service name='DecorationFactory'/>
         <js:service name='SecurityAccessController'/>
         <js:service name='PortletTrackingManager'/>
         <js:service name='PortalConfiguration'/>
         <js:service name='ImporterManager'/>
         <js:service name='AuditActivity'/>
</js:services>

Here is an arbitrary example of using a Jetspeed service in a  
portlet's init:

     private PortalStatistics statistics;


     public void init(PortletConfig config) throws PortletException
     {
         super.init(config);
         PortletContext context = getPortletContext();
         statistics = (PortalStatistics) context
                 .getAttribute 
(CommonPortletServices.CPS_PORTAL_STATISTICS);
         if (statistics == null)
                 throw new PortletException(
                         "Could not get instance of portal statistics  
component");
     }


and then perhaps in your processAction:

...
DataSource ds = statistics.getDataSource();





Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
You can find the user id and encrypted password inside
SECURITY_CREDENTIAL table but I cannot help you in finding the username.
I don't know where Jetspeed developers store username info.

In some tables you can find it directly, for exampl USER_STATITICS, but
there is no connection between principal id and username.

Maybe some developer is reading this post?


			ROb


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


Re: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Try this

mvn -P tomcat,dbpsml

The above command is for Maven 2 plugin

Vivek

*

*Frank Otto wrote:
> the latest --> 2.1.3
>
> Vivek Kumar schrieb:
>> Hi
>>
>> Which version of jetspeed are you using ?
>>
>> Vivek
>>
>> Frank Otto wrote:
>>> thanks for your answer.
>>>
>>> okay, but I have build my custom portal with maven. is there a 
>>> possibility to change the storing method?
>>>
>>> Vivek Kumar schrieb:
>>>> Hi
>>>>
>>>> Jetspeed installer gives you options to store pages in database.
>>>>
>>>> Vivek
>>>>
>>>> Frank Otto wrote:
>>>>> hi,
>>>>>
>>>>> how can I save the psml in the database? Is there a configuration 
>>>>> entry in jetspeed?
>>>>>
>>>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>>>
>>>>>
>>>>> kind regards,
>>>>>
>>>>> Frank
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
the latest --> 2.1.3

Vivek Kumar schrieb:
> Hi
> 
> Which version of jetspeed are you using ?
> 
> Vivek
> 
> Frank Otto wrote:
>> thanks for your answer.
>>
>> okay, but I have build my custom portal with maven. is there a 
>> possibility to change the storing method?
>>
>> Vivek Kumar schrieb:
>>> Hi
>>>
>>> Jetspeed installer gives you options to store pages in database.
>>>
>>> Vivek
>>>
>>> Frank Otto wrote:
>>>> hi,
>>>>
>>>> how can I save the psml in the database? Is there a configuration 
>>>> entry in jetspeed?
>>>>
>>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>>
>>>>
>>>> kind regards,
>>>>
>>>> Frank
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
> 
> 
> ---------------------------------------------------------------------
> 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: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Hi

Which version of jetspeed are you using ?

Vivek

Frank Otto wrote:
> thanks for your answer.
>
> okay, but I have build my custom portal with maven. is there a 
> possibility to change the storing method?
>
> Vivek Kumar schrieb:
>> Hi
>>
>> Jetspeed installer gives you options to store pages in database.
>>
>> Vivek
>>
>> Frank Otto wrote:
>>> hi,
>>>
>>> how can I save the psml in the database? Is there a configuration 
>>> entry in jetspeed?
>>>
>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>
>>>
>>> kind regards,
>>>
>>> Frank
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>


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


Re: store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
thanks for your answer.

okay, but I have build my custom portal with maven. is there a 
possibility to change the storing method?

Vivek Kumar schrieb:
> Hi
> 
> Jetspeed installer gives you options to store pages in database.
> 
> Vivek
> 
> Frank Otto wrote:
>> hi,
>>
>> how can I save the psml in the database? Is there a configuration 
>> entry in jetspeed?
>>
>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>
>>
>> kind regards,
>>
>> Frank
>>
>>
>> ---------------------------------------------------------------------
>> 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: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Hi

Jetspeed installer gives you options to store pages in database.

Vivek

Frank Otto wrote:
> hi,
>
> how can I save the psml in the database? Is there a configuration 
> entry in jetspeed?
>
> I don't want a folder for each user under WEB-INF/pages/_user/.
>
>
> kind regards,
>
> Frank
>
>
> ---------------------------------------------------------------------
> 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


store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
hi,

how can I save the psml in the database? Is there a configuration entry 
in jetspeed?

I don't want a folder for each user under WEB-INF/pages/_user/.


kind regards,

Frank


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


Re: Accessing Jetspeed Database

Posted by Michael Binette <je...@adinquiry.com>.
Yes, you will need to use the FULL_PATH if you need to do it from a database
trigger.  I believe you can use UserManager and User objects in code to do
some of that for you if you were doing it in code (but haven't looked into
it).

--
Michael

On Wed, Dec 31, 2008 at 9:01 AM, Roberto Rossi <ro...@cone.it>wrote:

> So, to obtain the username we have to extract it from the FULL_PATH, is
> this right?
>
> Thank you Michael.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
So, to obtain the username we have to extract it from the FULL_PATH, is this right?

Thank you Michael.




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


RE: Accessing Jetspeed Database

Posted by James Winburn <jw...@computerguidance.com>.
Chetan,

Also be aware that users are usually assigned to one or more security
roles ("user", "admin", etc.)  Roles are defined in the
SECURITY_PRINCIPAL table along with the usernames, but are distinguished
from usernames by the FULL_PATH column.  Usernames paths will contain
the "/user/" string but roles will be prepended with "/role/".  (e.g.
/role/admin)

Roles are mapped to users in the SECURITY_USER_ROLE table which has just
two columns:
	USER_ID: a foreign key to the SECURITY_PRINCIPAL table
corresponding
			to the user.
	ROLE_ID: a foreign key to the SECURITY_PRINCIPAL table
corresponding
			to the role.     

Users are assigned to multiple roles by defining multiple rows per user
in this table.

Oh, and if you want to store user information beyond username/password
(i.e. user profiles), note that this information is considered a user
preference and is stored in the PREF-NODE table. 

Hope this helps,
James Winburn

-----Original Message-----
From: Michael Binette [mailto:jetspeed@adinquiry.com] 
Sent: Wednesday, December 31, 2008 6:45 AM
To: Jetspeed Users List
Subject: Re: Accessing Jetspeed Database

The username is in SECURITY_PRINCIPAL along with names of groups and
roles.
You will notice that the CLASSNAME column will have a value of
org.apache.jetspeed.security.InternalUserPrincipalImpl for all users.
Or,
you can look at the FULL_PATH column and see that all user rows start
with
/user/.

I don't think the user name is saved anywhere else in its plain form
while
adding a new user.

--
Michael


On Wed, Dec 31, 2008 at 5:43 AM, Chetan Patel
<ch...@webmail.aruhat.com>wrote:

>
> Hi Rob,
>
> Thanks for suggestion.
>
> The first solution is easy.
>
> I have see the all table but I am not able to find out which table is
use
> for storing user information in jetspeed.
>
> Please help me.
>
> Thanks again for help.
>
> --Chetan Patel
>
>
>
>
> Roberto Rossi-3 wrote:
> >
> > I think you can:
> >
> > 1) write a trigger of Jetspeed user tables to update to your own
table
> > whenever new records are inserted or when some records are updated,
in
> > this way you have not to change j2-admin source code.
> > To use triggers you should have mysql version 5.0.2 or greater, see
> > http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more
details.
> > 2) modify j2-admin source code to adapt it to your needs
> >
> > I think the 1) approach is simples even if less elegant. Obviously
check
> > your mysql version
> >
> >
> >
> >                              ROb
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail:
jetspeed-user-help@portals.apache.org
> >
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.ht
ml
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: Accessing Jetspeed Database

Posted by Michael Binette <je...@adinquiry.com>.
The username is in SECURITY_PRINCIPAL along with names of groups and roles.
You will notice that the CLASSNAME column will have a value of
org.apache.jetspeed.security.InternalUserPrincipalImpl for all users.  Or,
you can look at the FULL_PATH column and see that all user rows start with
/user/.

I don't think the user name is saved anywhere else in its plain form while
adding a new user.

--
Michael


On Wed, Dec 31, 2008 at 5:43 AM, Chetan Patel <ch...@webmail.aruhat.com>wrote:

>
> Hi Rob,
>
> Thanks for suggestion.
>
> The first solution is easy.
>
> I have see the all table but I am not able to find out which table is use
> for storing user information in jetspeed.
>
> Please help me.
>
> Thanks again for help.
>
> --Chetan Patel
>
>
>
>
> Roberto Rossi-3 wrote:
> >
> > I think you can:
> >
> > 1) write a trigger of Jetspeed user tables to update to your own table
> > whenever new records are inserted or when some records are updated, in
> > this way you have not to change j2-admin source code.
> > To use triggers you should have mysql version 5.0.2 or greater, see
> > http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
> > 2) modify j2-admin source code to adapt it to your needs
> >
> > I think the 1) approach is simples even if less elegant. Obviously check
> > your mysql version
> >
> >
> >
> >                              ROb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.html
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Accessing Jetspeed Database

Posted by Chetan Patel <ch...@webmail.aruhat.com>.
Hi Rob,

Thanks for suggestion.

The first solution is easy. 

I have see the all table but I am not able to find out which table is use
for storing user information in jetspeed.

Please help me.

Thanks again for help. 

--Chetan Patel




Roberto Rossi-3 wrote:
> 
> I think you can:
> 
> 1) write a trigger of Jetspeed user tables to update to your own table
> whenever new records are inserted or when some records are updated, in
> this way you have not to change j2-admin source code. 
> To use triggers you should have mysql version 5.0.2 or greater, see
> http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
> 2) modify j2-admin source code to adapt it to your needs
> 
> I think the 1) approach is simples even if less elegant. Obviously check
> your mysql version
> 
> 
> 
>                              ROb     
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


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


Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
I think you can:

1) write a trigger of Jetspeed user tables to update to your own table
whenever new records are inserted or when some records are updated, in
this way you have not to change j2-admin source code. 
To use triggers you should have mysql version 5.0.2 or greater, see
http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
2) modify j2-admin source code to adapt it to your needs

I think the 1) approach is simples even if less elegant. Obviously check
your mysql version



                             ROb     


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


Re: Accessing Jetspeed Database

Posted by Chetan Patel <ch...@webmail.aruhat.com>.
Hello All,

I have use usermanagement service of j2-admin.

I have use MySql as a database.

Now, I have created myuser table(two fields id and name) in same database. 
When admin or any user add new user; we need to insert id and name of
created user in this table.

For that what I have to do?

Please help me, I am new in jetspeed2.

Thanks in advance.

--Chetan Patel
-- 
View this message in context: http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21228019.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


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


Re: Accessing Jetspeed Database

Posted by Serkan Camurcuoglu <se...@telenity.com>.
Did you write the <js:services> things into a jetspeed-portlet.xml and 
put it into the WEB-INF/ directory of your web application as David 
said? I think you should first have a look at the jetspeed-portlet.xml 
in the webapps/j2-admin/WEB-INF/ directory as an example. I think you 
may also need to redeploy your portlet application after these changes.


Dan Olsen wrote:
> When I do this I then get the following error in my portlet: "Could not get instance of portal statistics component".
>
>   
>>>> David Sean Taylor david@bluesunrise.com> 6/3/2008 1:58 PM >> ( mailto:david@bluesunrise.com> )
>>>>         
>
> Here is an arbitrary example of using a Jetspeed service in a  
> portlet's init:
>
>      private PortalStatistics statistics;
>
>
>      public void init(PortletConfig config) throws PortletException
>      {
>          super.init(config);
>          PortletContext context = getPortletContext();
>          statistics = (PortalStatistics) context
>                  .getAttribute 
> (CommonPortletServices.CPS_PORTAL_STATISTICS);
>          if (statistics == null)
>                  throw new PortletException(
>                          "Could not get instance of portal statistics  
> component");
>      }
>
>
> and then perhaps in your processAction:
>
> ...
> DataSource ds = statistics.getDataSource();
>
>
>
>
>
>   


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


Re: Accessing Jetspeed Database

Posted by Serkan Camurcuoglu <se...@telenity.com>.
Did you write the <js:services> things into a jetspeed-portlet.xml and 
put it into the WEB-INF/ directory of your web application as David 
said? I think you should first have a look at the jetspeed-portlet.xml 
in the webapps/j2-admin/WEB-INF/ directory as an example. I think you 
may also need to redeploy your portlet application after these changes.


Dan Olsen wrote:
> When I do this I then get the following error in my portlet: "Could not get instance of portal statistics component".
>
>   
>>>> David Sean Taylor david@bluesunrise.com> 6/3/2008 1:58 PM >> ( mailto:david@bluesunrise.com> )
>>>>         
>
> Here is an arbitrary example of using a Jetspeed service in a  
> portlet's init:
>
>      private PortalStatistics statistics;
>
>
>      public void init(PortletConfig config) throws PortletException
>      {
>          super.init(config);
>          PortletContext context = getPortletContext();
>          statistics = (PortalStatistics) context
>                  .getAttribute 
> (CommonPortletServices.CPS_PORTAL_STATISTICS);
>          if (statistics == null)
>                  throw new PortletException(
>                          "Could not get instance of portal statistics  
> component");
>      }
>
>
> and then perhaps in your processAction:
>
> ...
> DataSource ds = statistics.getDataSource();
>
>
>
>
>
>   


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


Re: Accessing Jetspeed Database

Posted by Dan Olsen <da...@utah.gov>.
When I do this I then get the following error in my portlet: "Could not get instance of portal statistics component".

>>> David Sean Taylor david@bluesunrise.com> 6/3/2008 1:58 PM >> ( mailto:david@bluesunrise.com> )

Here is an arbitrary example of using a Jetspeed service in a  
portlet's init:

     private PortalStatistics statistics;


     public void init(PortletConfig config) throws PortletException
     {
         super.init(config);
         PortletContext context = getPortletContext();
         statistics = (PortalStatistics) context
                 .getAttribute 
(CommonPortletServices.CPS_PORTAL_STATISTICS);
         if (statistics == null)
                 throw new PortletException(
                         "Could not get instance of portal statistics  
component");
     }


and then perhaps in your processAction:

...
DataSource ds = statistics.getDataSource();





Re: Accessing Jetspeed Database

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Jun 3, 2008, at 12:41 PM, Dan Olsen wrote:

> So I have the following line of code:
>
> DataSource ds = DataSourceFactory.getInstance();
>
> Should I now be able to call ds.getConnection()? I do this and I am  
> getting errors saying my connection is null.
>


Its not clear whether you are working from within the Jetspeed webapp,  
or another portlet application
If you are writing portal code (inside Jetspeed), I recommend simply  
using Spring to wire it together
There are plenty of examples of that in the WEB-INF/assembly directory

I suspect you are probably working on your own web (portlet) application
In this case, you will not have access to Jetspeed's data source from  
you web app, nor will you have direct access to our spring container
However we do provide Jetspeed Services for portlets. There a lots of  
examples of this in the j2-admin portlet application
Take a look at the jetspeed-portlet.xml for the j2-admin app:

	<js:services>
         <js:service name='ApplicationServerManager'/>
         <js:service name='DeploymentManager'/>
		<js:service name='EntityAccessor'/>
         <js:service name='GroupManager'/>
         <js:service name='PageManager'/>
         <js:service name='PermissionManager'/>
         <js:service name='PortletFactory'/>
         <js:service name='PortalAdministration'/>
         <js:service name='PortletRegistryComponent'/>
         <js:service name='PortalStatistics'/>
         <js:service name="Profiler" />
         <js:service name='RoleManager'/>
	    <js:service name='SearchComponent'/>
         <js:service name="SSO" />
         <js:service name='UserManager'/>
         <js:service name='DecorationFactory'/>
         <js:service name='SecurityAccessController'/>
         <js:service name='PortletTrackingManager'/>
         <js:service name='PortalConfiguration'/>
         <js:service name='ImporterManager'/>
         <js:service name='AuditActivity'/>
	</js:services>

Here is an arbitrary example of using a Jetspeed service in a  
portlet's init:

     private PortalStatistics statistics;


     public void init(PortletConfig config) throws PortletException
     {
         super.init(config);
         PortletContext context = getPortletContext();
         statistics = (PortalStatistics) context
                 .getAttribute 
(CommonPortletServices.CPS_PORTAL_STATISTICS);
         if (statistics == null)
                 throw new PortletException(
                         "Could not get instance of portal statistics  
component");
     }


and then perhaps in your processAction:

	...
	DataSource ds = statistics.getDataSource();





RE: Accessing Jetspeed Database

Posted by Dan Olsen <da...@utah.gov>.
I am using it in my own DatabaseConnector class that gets used to load content from the database.
 
Isn't there someway I can just look up the database resource in the jetspeed.xml context file? I would think I should be able to do this with Context.lookup("java:comp/env/jdbc/jetspeed");
 
However, I get "javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at ..."

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 1:48 PM >>>

If your Spring wiring is being loaded, that should work.  One word of
caution is that you should not use this type of strategy in any static
initialization blocks or anywhere that it could be loaded prior to the
Spring ApplicationContext load completing.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 2:41 PM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

So I have the following line of code:

DataSource ds = DataSourceFactory.getInstance();

Should I now be able to call ds.getConnection()? I do this and I am
getting errors saying my connection is null.

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 10:44 AM >>>

When I have to bridge that gap between Spring and non-Spring classes, I
have usually created a Factory with a static getter and a non-static
setter (or use constructor injection).  Then, I would wire a bean in
Spring to construct an instance of the factory and call the non-static
setter.  The setter would set the value of the static instance element.
Then, you could just call DataSourceFactory.getDataSource() to get the
instance.  It saves you from replicating a lot of Spring setup that
already works perfectly.  I haven't tried this exact thing in Jetspeed
yet, but I have done it in other similar environments.

Example: 

public class DataSourceFactory {
    private static DataSource instance;

    public static DataSource getInstance() { return
DataSourceFactory.instance; }
    
    public void setInstance(DataSource ds) {
        DataSourceFactory.instance = ds;
    }
}

Supplementary Spring config (in etc/assembly/override)

<bean id="dataSourceFactory" class="DataSourceFactory">
    <property name="instance" ref="JetspeedDS" /> </bean>

Then, DataSourceFactory.getInstance() would return the Spring
"singleton" object for the data source.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 11:23 AM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

Can I access that in a non-Spring class?

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 9:44 AM >>>

To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com 
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org 
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!

==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }

  return null;
}

==== END MY getConnection FUNCTION ====

---------------------------------------------------------------------
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: Accessing Jetspeed Database

Posted by Tim Garrett <tg...@saepio.com>.
If your Spring wiring is being loaded, that should work.  One word of
caution is that you should not use this type of strategy in any static
initialization blocks or anywhere that it could be loaded prior to the
Spring ApplicationContext load completing.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 2:41 PM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

So I have the following line of code:
 
DataSource ds = DataSourceFactory.getInstance();
 
Should I now be able to call ds.getConnection()? I do this and I am
getting errors saying my connection is null.

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 10:44 AM >>>

When I have to bridge that gap between Spring and non-Spring classes, I
have usually created a Factory with a static getter and a non-static
setter (or use constructor injection).  Then, I would wire a bean in
Spring to construct an instance of the factory and call the non-static
setter.  The setter would set the value of the static instance element.
Then, you could just call DataSourceFactory.getDataSource() to get the
instance.  It saves you from replicating a lot of Spring setup that
already works perfectly.  I haven't tried this exact thing in Jetspeed
yet, but I have done it in other similar environments.

Example: 

public class DataSourceFactory {
    private static DataSource instance;

    public static DataSource getInstance() { return
DataSourceFactory.instance; }
    
    public void setInstance(DataSource ds) {
        DataSourceFactory.instance = ds;
    }
}

Supplementary Spring config (in etc/assembly/override)

<bean id="dataSourceFactory" class="DataSourceFactory">
    <property name="instance" ref="JetspeedDS" /> </bean>

Then, DataSourceFactory.getInstance() would return the Spring
"singleton" object for the data source.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov]
Sent: Tuesday, June 03, 2008 11:23 AM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

Can I access that in a non-Spring class?

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 9:44 AM >>>

To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov]
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!

==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }

  return null;
}

==== END MY getConnection FUNCTION ====

---------------------------------------------------------------------
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: Accessing Jetspeed Database

Posted by Dan Olsen <da...@utah.gov>.
So I have the following line of code:
 
DataSource ds = DataSourceFactory.getInstance();
 
Should I now be able to call ds.getConnection()? I do this and I am getting errors saying my connection is null.

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 10:44 AM >>>

When I have to bridge that gap between Spring and non-Spring classes, I
have usually created a Factory with a static getter and a non-static
setter (or use constructor injection).  Then, I would wire a bean in
Spring to construct an instance of the factory and call the non-static
setter.  The setter would set the value of the static instance element.
Then, you could just call DataSourceFactory.getDataSource() to get the
instance.  It saves you from replicating a lot of Spring setup that
already works perfectly.  I haven't tried this exact thing in Jetspeed
yet, but I have done it in other similar environments.

Example: 

public class DataSourceFactory {
    private static DataSource instance;

    public static DataSource getInstance() { return
DataSourceFactory.instance; }
    
    public void setInstance(DataSource ds) {
        DataSourceFactory.instance = ds;
    }
}

Supplementary Spring config (in etc/assembly/override)

<bean id="dataSourceFactory" class="DataSourceFactory">
    <property name="instance" ref="JetspeedDS" />
</bean>

Then, DataSourceFactory.getInstance() would return the Spring
"singleton" object for the data source.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 11:23 AM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

Can I access that in a non-Spring class?

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 9:44 AM >>>

To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com 
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org 
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!

==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }

  return null;
}

==== END MY getConnection FUNCTION ====

---------------------------------------------------------------------
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: Accessing Jetspeed Database

Posted by Tim Garrett <tg...@saepio.com>.
 
When I have to bridge that gap between Spring and non-Spring classes, I
have usually created a Factory with a static getter and a non-static
setter (or use constructor injection).  Then, I would wire a bean in
Spring to construct an instance of the factory and call the non-static
setter.  The setter would set the value of the static instance element.
Then, you could just call DataSourceFactory.getDataSource() to get the
instance.  It saves you from replicating a lot of Spring setup that
already works perfectly.  I haven't tried this exact thing in Jetspeed
yet, but I have done it in other similar environments.

Example: 

public class DataSourceFactory {
    private static DataSource instance;

    public static DataSource getInstance() { return
DataSourceFactory.instance; }
    
    public void setInstance(DataSource ds) {
        DataSourceFactory.instance = ds;
    }
}

Supplementary Spring config (in etc/assembly/override)

<bean id="dataSourceFactory" class="DataSourceFactory">
    <property name="instance" ref="JetspeedDS" />
</bean>

Then, DataSourceFactory.getInstance() would return the Spring
"singleton" object for the data source.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 11:23 AM
To: Jetspeed Users List
Subject: RE: Accessing Jetspeed Database

Can I access that in a non-Spring class?

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 9:44 AM >>>

To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov]
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!

==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }

  return null;
}

==== END MY getConnection FUNCTION ====

---------------------------------------------------------------------
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: Accessing Jetspeed Database

Posted by Dan Olsen <da...@utah.gov>.
Can I access that in a non-Spring class?

>>> "Tim Garrett" <tg...@saepio.com> 6/3/2008 9:44 AM >>>

To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com 
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org 
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!

==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }

  return null;
}

==== END MY getConnection FUNCTION ====

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


RE: Accessing Jetspeed Database

Posted by Tim Garrett <tg...@saepio.com>.
 
To the best of my knowledge, Jetspeed is wiring it via Spring in
WEB-INF/assembly/boot/datasource.xml.  The Spring bean is called
"JetspeedDS".

Tim Garrett
Software Engineer
Saepio Technologies
tgarrett@saepio.com
816.777.2158
Saepio Makes Distributed Marketing Effective, Engaging & Easy.

-----Original Message-----
From: Dan Olsen [mailto:danrolsen@utah.gov] 
Sent: Tuesday, June 03, 2008 10:38 AM
To: Jetspeed Users List <jetspeed-user@portals.apache.org
Subject: Accessing Jetspeed Database

I am trying to access the Jetspeed database. There is a jetspeed.xml
file in {tomcat_dir}/conf/Catalina/localhost/. I know Jetspeed can
access the database but I can't seem to get access to it. Does anyone
know how Jetspeed is setting up the database connection? When I try the
following code, I get a naming exception. If anyone knows why that code
does not get the work please let me know ASAP. Thanks!
 
==== BEGIN MY getConnection FUNCTION ==== public static Connection
getConnection(RenderResponse response)
   throws IOException {
  // TODO Auto-generated method stub
  try {
   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:/comp/env");
   if (envCtx == null) {
    throw new Exception("Boom - No Environment Context");
   }
   // envCtx.1
   DataSource ds = (DataSource) envCtx.lookup("jdbc/jetspeed");
   if (ds != null) {
    return ds.getConnection();
   } else {
    return null;
   }
  } catch (NamingException ex) {
   ex.printStackTrace(response.getWriter());
  } catch (Exception ex) {
   ex.printStackTrace(response.getWriter());
  }
 
  return null;
 }
 
==== END MY getConnection FUNCTION ====

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