Hi
There used to be org.jboss.portal.core.model.portal.Context in JBOSS Portal 2.4.1, according to the javadoc it should also be in JBOSS Protal 2.6 http://docs.jboss.com/jbportal/v2.6/javadoc/org/jboss/portal/core/model/portal/Context.html but it is not there (am I missing something?).
I am trying to get the portal names from the JBOSS Portal. I was able to do it in 2.4.1 with following code :
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 {
PortalObjectContainer container;
container = (PortalObjectContainer)getPortletContext().getAttribute("PortalObjectContainer");
Context context = container.getContext();
Iterator portalObjectIterator= context.getChildren().iterator();
ArrayList names = new ArrayList();
while (portalObjectIterator.hasNext())
{
PortalObject child = (PortalObject) portalObjectIterator.next();
String name = child.getName();
names.add(name);
}
}
finally {
tm.commit();
}
}
catch ( Exception ex ) {
ex.printStackTrace();
}I am using JBOSS-4.0.5.GA, protal 2.6 CR2, oracle