-
1. Re: Placing portlet_instances.xml in a central place ...
peterj May 20, 2008 11:15 AM (in response to rohit000)An entire portal layout can be defined in the conf/data/default-object.xml file, but only if all portlet war files are deployed within jboss-portal.sar (like the example portlets in the "samples" directory).
I have been able to add CMS portlet instances to a portlet-specific portlet-instances.xml file by adding this to the WEB-INF/jbossportlet.xml file:<portlet-app> <service> <service-name>CMS</service-name> <service-class>org.jboss.portal.cms.CMS</service-class> <service-ref>:service=CMS</service-ref> </service> </portlet-app>
But the existing portlet-instances.xml files are not sacrosanct - the ones provided are only examples (just as the default portal is only an example). It is expected that you change them.
I would at this point give you a URL to my JBossWorld presentation on that topic, but the JBossWorld web site still does not contain a link to my presentation (despite the fact that they have my presentation and the signed letter of agreement to permit publishing it). -
2. Re: Placing portlet_instances.xml in a central place ...
theute May 20, 2008 11:34 AM (in response to rohit000)"PeterJ" wrote:
I would at this point give you a URL to my JBossWorld presentation on that topic, but the JBossWorld web site still does not contain a link to my presentation (despite the fact that they have my presentation and the signed letter of agreement to permit publishing it).
I'll investigate this issue -
3. Re: Placing portlet_instances.xml in a central place ...
rohit000 May 20, 2008 7:37 PM (in response to rohit000)Peter,
Thanks for the response.
The problem with keeping a custom portal application in jboss-portal.sar is that any change in the custom portal application will need the restart of the portal server.
However, I think this is a needed feature. If a deployer needs to put his hand in the Portlet package (.war file) to create the instances, that surely breaks the abstraction of a Portlet package which is developed by the Portlet developer.
Also the same is achievable through admin portal. But doing it through admin console is not a scalable option if you need to deploy large number of instances of the portal in different boxes. -
4. Re: Placing portlet_instances.xml in a central place ...
peterj May 21, 2008 10:56 AM (in response to rohit000)Actually, the problem is really with the class scoping required for war file.
Example. X.war contains portletX and its portlet-instance.xml file declares one instance with the *-object.xml placing that instance somewhere.
Now in Y.war, you would like to create another instance of portletX. But you cannot because Y.war does not have visibility to portletX. You could cheat - copy the class files for portletX into Y.war and then create an instance in the portlet-instances.xml file in Y.war.
So the issue is with creating the instances. I think that once the instances are created, any *-object.xml file in any war file can use those instances to place them on a portal page (its been a while since I did this, I think in 2.4.x, so I am not sure if this still works, I'd give it a try just to verify it but don't have the time today).
So if I understand your use case correctly, you have several jbossas instances with jboss portal deployed, and custom portlat (maybe the same, maybe different) defined in each one. Then at some later time you decide to add/modify a page by adding or dropping portlet objects. And you need to do this for some/all of the portals. -
5. Re: Placing portlet_instances.xml in a central place ...
rohit000 May 21, 2008 1:10 PM (in response to rohit000)Peter,
I think you have got most of my requirements.
The points I would like to additionally highlight are -
1) The Portal deployer should be able to create new instances of the available portlets without touching the .war file(s) of the Portlet(s)
2) This is along with the support of hot deplyment -
6. Re: Placing portlet_instances.xml in a central place ...
peterj May 21, 2008 6:54 PM (in response to rohit000)The JBossWorld presentation is now at http://www.jbossworld.com/downloads/presentations/. Scroll down to Friday, look for JBoss Portal How To Guide.
-
7. Re: Placing portlet_instances.xml in a central place ...
rohit000 May 22, 2008 4:22 PM (in response to rohit000)Hi Peter,
Tried to access the same.
Once I click the link I get a zip file which has set of folders for configurations, pictures etc. Not the pdf.
Seems like right file is not uploaded -
8. Re: Placing portlet_instances.xml in a central place ...
peterj May 22, 2008 5:21 PM (in response to rohit000)Looks like they posted the ODP (Open Document Presentation) file. You will need OpenOffice.org to read that. And yes, all of the Open Document files are really just zip files with various xml file and other content.
-
9. Re: Placing portlet_instances.xml in a central place ...
julien1 May 22, 2008 6:02 PM (in response to rohit000)It is not really possible to put a instance file centrally because it relies on the portlet to be deployed before instance are created (in order to properly clone state if needed), that's why an instance file is packaged with a portlet application.
-
10. Re: Placing portlet_instances.xml in a central place ...
rohit000 May 23, 2008 9:39 AM (in response to rohit000)Hi Julien,
Thanks for the explanation. I can see the point. -
11. Re: Placing portlet_instances.xml in a central place ...
pmn92 May 27, 2008 7:54 AM (in response to rohit000)May be you mean that it is not really possible as it is architectured today.
A clear separation of portlets and page/window deployment is a feature that should be on the list. This is especially useful when deployment includes parametrization of portlets. That way you can have a clear and clean separation between portlet packages and parametrized deployment packages. -
12. Re: Placing portlet_instances.xml in a central place ...
rohit000 May 29, 2008 4:51 PM (in response to rohit000)I do agree with PMN on this. This feature should be in the roadmap.