Julien,

I tried it. 
I'm getting now a PortalObjectContainer object but I'm not able to retrieve  
the context. This context makes it possible for me to createPages and Windows.

Underneath the code that I have used and the jboss-portlet.xml that is part of 
my servlet deployment.


Can you give me a new hint?

Thanks,

jeroen.

try
{
        MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
        container = (PortalObjectContainer)  
                          MBeanProxy.get(PortalObjectContainer.class, 
                          new ObjectName("portal:container=PortalObject"),
                          mbeanServer);
}
catch (Exception e)
{
        log.error("Cannot get interceptor stack", e);
        throw new IllegalStateException("Cannot get interceptor stack");
}       
if (container == null) {
                        System.out.println("No portal object container");
}
else
{
        System.out.println( "We got the portal object container" );
        Context ctx = null;
         try {
                ctx = container.getContext();
         } 
         catch ( Exception ex )  {
                System.out.println( "Failed to get context" );
          }     
          if ( ctx == null ) {
              System.out.println( "PortalObjectContainer context is empty!" );
         }
}

<portlet-app>
    <!-- Service injected in the portlet context. -->
    
      <service-name>PortalObjectContainer</service-name>
      
<service-class>org.jboss.portal.core.model.portal.PortalObjectContainer</service-class>
      <service-ref>portal:container=PortalObject</service-ref>
   
       
</portlet-app>


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960103#3960103

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960103
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to