5 Replies Latest reply on Jun 27, 2006 7:33 PM by claprun

    Jboss 2.4 and portlet-instances.xml

    silicio

      Hi all,
      I'm getting some (i think) strange debug info about my deployment files.

      ...
      2006-06-22 04:46:27,703 DEBUG [org.jboss.portal.portlet.container.PortletContainer] Initialized portlet object mywork.controllers.CentralController
      2006-06-22 04:46:27,703 DEBUG [org.jboss.portal.core.deployment.jboss.PortletAppDeployment] Looking for the WEB-INF path of myportal
      2006-06-22 04:46:27,703 DEBUG [org.jboss.portal.core.deployment.jboss.PortletAppDeployment] Found -object.xml containing instances, you need to convert and move them to the file C:\Programmi\jboss-4.0.4.GA\server\default\.\tmp\deploy\tmp59698myportal-exp.war\WEB-INF/portlet-instances.xml
      2006-06-22 04:46:27,703 DEBUG [org.jboss.portal.core.deployment.jboss.PortletAppDeployment] Adding legacy instance CentralControllerInstance
      2006-06-22 04:46:27,703 INFO [org.jboss.portal.core.deployment.jboss.PortletAppDeployment] These instances have been found in -object.xml, you should put them in the file C:\Programmi\jboss-4.0.4.GA\server\default\.\tmp\deploy\tmp59698myportal-exp.war\WEB-INF/portlet-instances.xml
      2006-06-22 04:46:27,703 INFO [org.jboss.portal.core.deployment.jboss.PortletAppDeployment] <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <deployments>
      <deployment>
      <instance>
      <instance-id>CentralControllerInstance</instance-id>
      <portlet-ref>CentralController</portlet-ref>
      </instance>
      </deployment>
      </deployments>


      It says I need to put something in portlet-instances.xml, but this file wasn't abragated since 2.2 version?

      here something from portlet.xml and myportal-object.xml files:

      portletl.xml
      ...
       <portlet>
       <description>Controller centrale della mia web application</description>
       <portlet-name>CentralController</portlet-name>
       <portlet-class>mywork.controllers.CentralController</portlet-class>
       <expiration-cache>-1</expiration-cache>
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
       <portlet-info>
       <title>Central Menu Portlet</title>
       <short-title>Central Menu Portlet</short-title>
       <keywords>central, menu, portlet</keywords>
       </portlet-info>
       </portlet>
      ...
      


      myportal-object.xml:
      ...
       <window>
       <window-name>Central Controller Window</window-name>
       <instance-ref>CentralControllerInstance</instance-ref>
       <region>center</region>
       <height>0</height>
       </window>
      ...
       <deployment>
       <if-exists>overwrite</if-exists>
       <instance>
       <instance-name>CentralControllerInstance</instance-name>
       <component-ref>myportal.CentralController</component-ref>
       </instance>
       </deployment>
      ...
      


      Suggesionts?

        • 1. Re: Jboss 2.4 and portlet-instances.xml

          so what version of portal are you using and what portlets are you deploying?

          • 2. Re: Jboss 2.4 and portlet-instances.xml
            bdaw

            In 2.4 descriptor changed. Because of WSRP implementation which forced some architectural changes portlet-instances.xml was introduced.
            But there is still suppor for legacy 2.2 descriptors and that's why you receive the warning.

            So you need to follow what is written on the console:

            1) in myportal-object.xml comment out this part:

            <deployment>
             <if-exists>overwrite</if-exists>
             <instance>
             <instance-name>CentralControllerInstance</instance-name>
             <component-ref>myportal.CentralController</component-ref>
             </instance>
            </deployment>
            


            2) create portal-instances.xml and put it there with some minor tag name changes (exacly how the console message is pointing):

            <?xml version="1.0" encoding="utf-8" standalone="yes"?>
             <deployments>
             <deployment>
             <instance>
             <instance-id>CentralControllerInstance</instance-id>
             <portlet-ref>CentralController</portlet-ref>
             </instance>
             </deployment>
             </deployments>
            




            • 3. Re: Jboss 2.4 and portlet-instances.xml
              silicio

              Sorry rali i've forgot to specify my JBoss version.
              bdaw your suggestion worked finely! Thx.
              I didn't know about reintegrating use of portlet-instances.xml file for JBoss 2.4 version. I can't find the documentation on site.

              • 4. Re: Jboss 2.4 and portlet-instances.xml

                 

                "Silicio" wrote:

                I didn't know about reintegrating use of portlet-instances.xml file for JBoss 2.4 version. I can't find the documentation on site.


                I haven't documented it yet. ;-)

                We will be re-introducing portlet-instances.xml in 2.6. What you are seeing in the WARN message, is essentially to give you a warning that things will change.

                • 5. Re: Jboss 2.4 and portlet-instances.xml
                  claprun

                  Actually it'll be re-introduced in 2.4... :)