KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > CorePortal


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core;
10
11 import org.jboss.portal.core.plugins.page.PageRepository;
12 import org.jboss.portal.server.Portal;
13 import org.jboss.portal.server.metadata.PortalMetaData;
14
15 /**
16  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
17  * @version $Revision: 1.3 $
18  */

19 public class CorePortal extends Portal
20 {
21
22    public CorePortal(PortalMetaData portalMD, String JavaDoc name)
23    {
24       super(portalMD, name);
25    }
26
27    public PageRepository getPageRepository()
28    {
29       return (PageRepository)getPlugin("PAGES");
30    }
31
32    public void create() throws Exception JavaDoc
33    {
34       super.create();
35
36 // // Work around for shared hibernate
37
// SessionFactory factory = (SessionFactory)new InitialContext().lookup("java:portal/SessionFactory");
38
// for (Iterator i = factory.getAllClassMetadata().values().iterator();i.hasNext();)
39
// {
40
// ClassPersister persister = (ClassPersister)i.next();
41
// if (persister.hasCache())
42
// {
43
// persister.getCache().clear();
44
// }
45
// }
46
}
47 }
48
Popular Tags