Re: Re: Re: multiple web domains

James Lee <[email protected]>
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <[email protected]>
On 12/11/10, 19:32:19, =?UTF-8?B?UmFmYcWCIEtydXBpxYRza2k=?=
<[email protected]> wrote regarding [jonas] Re: Re: multiple web
domains:

> Actually I want to publish two applications under different domain
> names using one jonas instance, like this:
> app1.war -> http://example.com/
> app2.war -> http://nonexistent.com/

I use a file called jonas-web.xml which contains:

<?xml version="1.0" encoding="ISO-8859-1"?>
<jonas-web-app xmlns="http://www.objectweb.org/jonas/ns"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.objectweb.org/jonas/ns
        http://www.objectweb.org/jonas/ns/jonas-web-app_4_2.xsd">

        <host>THE_HOST_NAME</host>
        <context-root>/</context-root>

</jonas-web-app>


It works with EARs and WARs but there is a warning with WARs if the same
context root is used on > 1 domain.  If it actually failed I'd have
complained before but here is the error now:


2010-11-05 23:55:24,154 : WARNING : RMI TCP Connection(51)-192.168.1.54 :
org.objectweb.jonas.web.jetty50.jmx.JSR77ConfigurationMBean.postRegister
:    EXCEPTION
javax.management.InstanceAlreadyExistsException:
jonas:J2EEServer=jonas,J2EEApplication=null,j2eeType=WebModule,name=/
        at
com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject
(DefaultMBeanServerInterceptor.java:1484)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBe
an(DefaultMBeanServerInterceptor.java:963)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Def
aultMBeanServerInterceptor.java:917)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Defa
ultMBeanServerInterceptor.java:312)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java
:482)
        at
org.objectweb.jonas.web.jetty50.jmx.JSR77ConfigurationMBean.defineJsr77M
Beans(JSR77ConfigurationMBean.java:128)
        at
org.objectweb.jonas.web.jetty50.jmx.JSR77ConfigurationMBean.postRegister
(JSR77ConfigurationMBean.java:90)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.postRegisterInvoke
(DefaultMBeanServerInterceptor.java:1035)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBe
an(DefaultMBeanServerInterceptor.java:974)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(Def
aultMBeanServerInterceptor.java:917)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(Defa
ultMBeanServerInterceptor.java:312)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java
:482)
        at
org.mortbay.util.jmx.ModelMBeanImpl.getComponentMBeans(ModelMBeanImpl.ja
va:1200)
        at
org.mortbay.jetty.servlet.jmx.WebApplicationContextMBean.getConfiguratio
ns(WebApplicationContextMBean.java:123)
        at
org.mortbay.jetty.servlet.jmx.WebApplicationContextMBean$1.lifeCycleStar
ted(WebApplicationContextMBean.java:73)
        at org.mortbay.util.Container.start(Container.java:79)
        at
org.objectweb.jonas.web.jetty50.JettyJWebContainerServiceImpl.doRegister
War(JettyJWebContainerServiceImpl.java:360)
        at
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebC
ontainerServiceImpl.java:969)
        at
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWarMBean(Abs
JWebContainerServiceImpl.java:1053)
        at org.objectweb.jonas.adm.Adm.addWar(Adm.java:357)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
        at
org.objectweb.carol.rmi.jrmp.server.JUnicastServerRef.dispatch(JUnicastS
erverRef.java:143)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.j
ava:790)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
va:649)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908)
        at java.lang.Thread.run(Thread.java:619)



James.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.