[jboss-user] [JBoss Portal] - How to virtual host jboss portal?

wmsopou do-not-reply at jboss.com
Sun Oct 5 08:20:10 EDT 2008


How do I host the portal and an old web application on the same jboss server? 

I have two subdomains pointing to the same ip number. So for "http://oldapp.mydomain.com" I want to open the old application and for "http://newportal.mydomain.com" I want to open the jboss portal. 

They have both been deployed to the same jboss server. Its the 2.6.6-GA with the portal bundled. 

In the portal application I changed the context so it binds to "/" instead of "/portal" in jboss-web.xml:
<jboss-web>
  |     <security ...
  |     <context-root>/</context-root>
  |     ...
  | </jboss-web>
  | 
I also changed the server.xml connector tag to use port 80 instead of 8080. This worked fine  - now "http://newportal.mydomain.com" would open the portal site.

Then I changed the portal application to bind to a virtual host by adding a virtual-host tag to the same file:
<jboss-web>
  |     <security ...
  |     <context-root>/</context-root>
  |     <virtual-host>newportal.mydomain.com</virtual-host>
  |     ...
  | </jboss-web>
  | 
In the old web application I did the same except I bound it to a another virtual host name (and used root context just like the portal):

  |     <context-root>/</context-root>
  |     <virtual-host>oldapp.mydomain.com</virtual-host>
  | 
Last thing I did was to define both these virtual hosts in server.xml:

  |     ...
  |     <Engine name="jboss.web" defaultHost="oldapp.mydomain.com">
  |         <Realm ... >
  |         <host name="oldapp.mydomain.com" autoDeploy="true"  
  |           deployOnStartup="true" deployXML="true">
  |                 <alias>oldapp.mydomain.com</alias>
  |                 <Valve 
  |                 className="org.apache.catalina.valves.AccessLogValve"
  |                 prefix="oldapp_access_log." suffix=".log"
  |                 pattern="common" directory="${jboss.server.log.dir}"
  |                 resolveHosts="false" />
  |         </host>
  | 
  |          <host name="newportal.mydomain.com"
  |            autoDeploy="true" deployOnStartup="true" deployXML="true"
  |            configClass=
  |             "org.jboss.web.tomcat.security.config.JBossContextConfig"
  |            >
  |                 <alias>newportal.mydomain.com</alias>
  |                 <Valve 
  |                 className="org.apache.catalina.valves.AccessLogValve"
  |                 prefix="portal_access_log." suffix=".log"
  |                 pattern="common" directory="${jboss.server.log.dir}"
  |                 resolveHosts="false" />
  |             <Valve className=
  |                "org.jboss.web.tomcat.service.jca.CachedConnectionValve"
  |                cachedConnectionManagerObjectName=
  |                 "jboss.jca:service=CachedConnectionManager"
  |                 transactionManagerObjectName=
  |                 "jboss:service=TransactionManager" />
  |        </host>
  | 
I start the server with args "-b 192.168.1.5". The firewall forwards incoming port 80 to this local ip number of the jboss server.

Now "http://oldapp.mydomain.com" works fine - it opens the old application. But when I try to open the jboss portal "http://newportal.mydomain.com" then I get this exception:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )
	org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:276)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )
	org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:303)
	org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:613)
	org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)

	org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
	org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
	org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
	org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
	org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
	org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
	org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
	org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
	org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
	org.hibernate.loader.Loader.doQuery(Loader.java:673)
	org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
	org.hibernate.loader.Loader.loadEntity(Loader.java:1907)
	org.hibernate.loader.entity.CollectionElementLoader.loadElement(CollectionElementLoader.java:72)
	org.hibernate.persister.collection.OneToManyPersister.getElementByIndex(OneToManyPersister.java:360)
	org.hibernate.collection.AbstractPersistentCollection.readElementByIndex(AbstractPersistentCollection.java:158)
	org.hibernate.collection.PersistentMap.get(PersistentMap.java:146)





Any1 know what Im missing here to make it work??



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180424#4180424

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180424



More information about the jboss-user mailing list