[jboss-user] [JBoss Portal] - Re: Injecting PortalObjectContainer into servlet

jkoek do-not-reply at jboss.com
Sat Jul 22 08:12:11 EDT 2006


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?



        MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
        container = (PortalObjectContainer)  
                          new ObjectName("portal:container=PortalObject"),
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");
	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!" );

    <!-- Service injected in the portlet context. -->

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

More information about the jboss-user mailing list