Yes, Thanks.
It works.
Now I'm off to the next step and that is making the pages user specific.
To share the knowledge hereby the code.
In case someone has improvements please suggest.
TransactionManager tm = null;
try {
InitialContext ic = new InitialContext();
tm = (TransactionManager) ic.lookup("java:/TransactionManager");
} catch (NamingException ex) {
System.out.println("Failed to find transactionmnager" );
}
try
{
tm.begin();
try {
MBeanServer mbeanServer = MBeanServerLocator.locateJBoss();
container = (PortalObjectContainer)MBeanProxy.get(PortalObjectContainer.class,
new ObjectName("portal:container=PortalObject"), mbeanServer);
Context ctx = container.getContext();
PortalObject po = ctx.getDefaultPortal();
out.print("PortalNode " + po.getName());
System.out.println( "Portal retrieved!" + po.getName() );
++loop;
Portal portal = (Portal) po;
portal.createPage( "JBOSS rocks!" + loop );
portal.createPage( "JBOSS rocks again!" + loop );
portal.createPage( "JBOSS rocks and again!" + loop );
}
finally {
tm.commit();
}
}
catch ( Exception ex ) {
ex.printStackTrace();
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960125#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...