This content has been marked as final.
Show 2 replies
-
1. Re: Portal 2.7.0 - how to get to PortalNode API?
prabhat.jha Nov 19, 2008 1:04 PM (in response to johnnythehun)- Please use 2.7.0.GA version instead of RC1.
- You need to add JBoss Portlet Fileter as mentioned in reference guide at http://docs.jboss.com/jbportal/v2.7.0/referenceGuide/html/changelog.html -
2. Re: Portal 2.7.0 - how to get to PortalNode API?
johnnythehun Nov 19, 2008 9:28 PM (in response to johnnythehun)Thanks it works.
For the Page creation part - if anyone else is looking for a solution I found this on another thread (it works):TransactionManager tm = null; try { InitialContext ic = new InitialContext(); tm = (TransactionManager) ic.lookup("java:/TransactionManager"); return tm; } catch (NamingException ex) { System.out.println("Failed to find transactionmnager"); return null; } try { tm.begin(); MBeanServer mbeanServer = MBeanServerLocator.locateJBoss(); container = (PortalObjectContainer) MBeanProxy.get(PortalObjectContainer.class, new ObjectName("portal:container=PortalObject"), mbeanServer); Context ctx = container.getContext(); Portal po = ctx.getPortal(pathToPage.get(0).getName()); po.createPage("JBOSS rocks!"); } finally { tm.commit(); }