dev@glassfish.java.net

Re: web container still starts in 3.1 embedded ejb

From: Amy Roh <amy.roh_at_oracle.com>
Date: Wed, 02 Jun 2010 19:31:44 -0700

Marina Vatkina wrote:
> I'm not sure if I need to do anything extra in 3.1 or if the 3.1 code
> tries to outsmart me, but something that I was able to do in v3,
> doesn't work any more.
>
> That something is suppressing web container from being started when
> the EJB embeddable API is used to run GF in embedded mode.
>
> In v3 I was able to achieve that goal by creating a modified version
> of the existing domain.xml (EJB embeddable container is supported only
> against a pre-existing install) that had empty elements for
> <network-listeners> and <protocols>, and skipped lazy-init attribute
> in the <iiop-listener>. At that time I did try to suppress wider
> elements, but that caused nasty errors and we were in a time crunch
> (embedded was coming in at the last minute) to try and solve the
> problem in a better way.
Where is this modified domain.xml located?

  [java] SEVERE: WEB0355: network-listener [http-listener-1] referenced
by virtual server [server] does not exist

This error happens because you have virtual-server "server" with
network-listeners "http-listener-1", however, you have empty
<network-listeners> as you mentioned.

<virtual-server id="server"
network-listeners="http-listener-1,http-listener-2" />

Try removing network-listeners and you'll no longer see the warning.
Looks like embedded does get started and the test passes despite of the
warning messages.

     [java] INFO: GlassFish3.1-SNAPSHOT (Amy-private) startup time :
Embedded(3041ms) startup services(4992ms) total(8033ms)
......
     [java] INFO: Portable JNDI names for EJB SimpleEjb :
[java:global/ejb-ejb31-embedded-profile-ejb/SimpleEjb!org.glassfish.tests.ejb.profile.SimpleEjb,
java:global/ejb-ejb31-embedded-profile-ejb/SimpleEjb]
     [java]
     [java] ==> Spent on CREATE: 11131 msec
     [java] Looking up EJB...
     [java] Invoking EJB...
     [java]
     [java] ==> Spent on LOOKUP: 2 msec
     [java]
     [java] ==> Spent on CALL: 60 msec
     [java] EJB said: hello
     [java] Jun 2, 2010 7:07:44 PM com.sun.logging.LogDomains$1 log
     [java] INFO: JMXStartupService and JMXConnectors have been shut down.
     [java] Jun 2, 2010 7:07:44 PM com.sun.logging.LogDomains$1 log
     [java] INFO: Shutdown procedure finished
     [java] Jun 2, 2010 7:07:44 PM AppServerStartup run
     [java] INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
     [java]
     [java] ==> Spent on CLOSE: 170 msec
     [java]
     [java] ==> Spent on TEST: 11365 msec
     [java] Value of key is: embedded with profile
     [java] Done calling EJB
     [java] Generating report at
/Users/Amy/glassfish-v3/v3/appserv-tests/test_results.xml
     [java]
     [java]
     [java] -----------------------------------------
     [java] - embedded with profile: PASS -
     [java] -----------------------------------------


Amy

>
> Let me know what I can do in 3.1 to have the same behavior as in v3.
>
> See [v3] and [v3.1] below for the corresponding output of a simple
> embedded ejb test. You can try yourself by running 'ant all' from
> v2/appserv-tests/devtests/ejb/ejb31/embedded/profile (no need to start
> a database or a server).
>
> thanks,
> -marina
>
> [v3]
> [java] Jun 2, 2010 5:59:24 PM
> com.sun.enterprise.v3.server.AppServerStartup run
> [java] INFO: GlassFish v3 (74.2) startup time : Embedded(2441ms)
> startup services(932ms) total(3373ms)
> [java] Jun 2, 2010 5:59:25 PM
> org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread
> run
> [java] INFO: JMXStartupService: JMXConnector system is disabled,
> skipping.
> [java] Jun 2, 2010 5:59:25 PM
> com.sun.enterprise.transaction.JavaEETransactionManagerSimplified
> initDelegates
> [java] INFO: Using
> com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate
> as the delegate
> [java] Jun 2, 2010 5:59:27 PM AppServerStartup run
>
>
> [v3.1]
> [java] Jun 2, 2010 6:06:44 PM com.sun.enterprise.util.EarlyLogger
> add
> [java] INFO: Total time to parse domain.xml: 76 milliseconds
> [java] Jun 2, 2010 6:06:45 PM com.sun.logging.LogDomains$1 log
> [java] INFO: enterprise_used_delegate_name
> [java] Jun 2, 2010 6:06:45 PM
> com.sun.common.util.logging.LoggingConfigImpl openPropFile
> [java] INFO: Cannot read logging.properties file.
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] SEVERE: WEB0355: network-listener [http-listener-1]
> referenced by virtual server [server] does not exist
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] SEVERE: WEB0355: network-listener [http-listener-2]
> referenced by virtual server [server] does not exist
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] INFO: webContainer.virtualServer.created
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] SEVERE: WEB0355: network-listener [admin-listener]
> referenced by virtual server [__asadmin] does not exist
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] INFO: webContainer.virtualServer.created
> [java] Jun 2, 2010 6:06:46 PM com.sun.logging.LogDomains$1 log
> [java] INFO: webContainer.virtualServer.loadedDefaultWebModule
> [java] Jun 2, 2010 6:06:47 PM com.sun.logging.LogDomains$1 log
> [java] INFO: Done with starting web container
> [java] Jun 2, 2010 6:06:47 PM com.sun.logging.LogDomains$1 log
> [java] INFO: GlassFish3.1-SNAPSHOT (mvatkina-private) startup
> time : Embedded(2433ms) startup services(2483ms) total(4916ms)
> [java] Jun 2, 2010 6:06:47 PM com.sun.logging.LogDomains$1 log
> [java] INFO: JMXStartupService: JMXConnector system is disabled,
> skipping.
> [java] Jun 2, 2010 6:06:47 PM AppServerStartup run
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>