7 Replies Latest reply on Feb 26, 2010 3:59 AM by Hardy Massen

    Portlet instantiated twice

    Hardy Massen Novice

      Hi,

       

      interesting phenomenon on GateIn-3.0.0-CR01. My portlets are instantiated twice:

       

      Portlet-Code:


      public class MyPortlet extends GenericPortlet {


          static int counter = 0;
         
          @Override
          public void init() throws PortletException {
              super.init();
              System.out.println("### Portlet-Init Called "+counter+" ###");
              System.out.println("this: "+this);
              counter++;
          }

      [...]

      }

       

      Console-Output:

       

      16:14:35,187 INFO  [TomcatDeployment] deploy, ctxPath=/TestPortlet
      16:14:35,296 INFO  [STDOUT] ########### Portlet-Init Called 0 ##############
      16:14:35,296 INFO  [STDOUT] this: my.test.portlet.MyPortlet@18d47e9
      16:14:35,296 INFO  [STDOUT] ########### Portlet-Init Called 1 ##############
      16:14:35,296 INFO  [STDOUT] this: my.test.portlet.MyPortlet@1b11657

       

      Bug?

       

      Regards,

       

      LeoLo