Skip to main content

Source code revision

svn

summary: GLASSFISH-18499: Load Admin RestAdapters lazily This fix is continuation of earlier fix for this bug. After our earlier checkin,
revision: 52987
author: Sahoo
date: 2012-03-16 09:15:27 UTC (4 years)
message: GLASSFISH-18499: Load Admin RestAdapters lazily
This fix is continuation of earlier fix for this bug. After our earlier checkin,
embedded ejb container tests failed with exceptions like:

java.lang.IllegalStateException: Can't operate without at least one
at com.sun.enterprise.config.util.ServerHelper.getAdminListener(ServerHelper.java:164)
at com.sun.enterprise.config.serverbeans.Config$Duck.getAdminListener(Config.java:460)
...
at com.sun.enterprise.v3.admin.adapter.AdminEndpointDecider.setValues(AdminEndpointDecider.java:118)
at com.sun.enterprise.v3.admin.adapter.AdminEndpointDecider.(AdminEndpointDecider.java:84)
at org.glassfish.admin.restconnector.AbstractProxyRestAdapter.getEpd(AbstractProxyRestAdapter.java:88)
at org.glassfish.admin.restconnector.AbstractProxyRestAdapter.getListenAddress(AbstractProxyRestAdapter.java:125)
at com.sun.enterprise.v3.services.impl.Endpoint$AdapterEndpoint.getAddress(Endpoint.java:113)
at com.sun.enterprise.v3.services.impl.GrizzlyService.registerEndpoint(GrizzlyService.java:558)
at com.sun.enterprise.v3.services.impl.GrizzlyService.registerAdapter(GrizzlyService.java:617)
at com.sun.enterprise.v3.services.impl.GrizzlyService.registerNetworkProxy(GrizzlyService.java:456)
at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:346)
...

This exception is basically happening when GrizzlyService is trying to register the adapters.
It was not obvious as to why it was working prior to my checkin (rev #52891). After a lot of debugging,
I found that in embedded mode, we are dropping RestAdapter services from habitat.
Since my earlier checkin changed the adapter class names, they were not getting dropped.
Hence this fix where I am dropping the correct services.
Change Path Actions
M trunk/main/nucleus/admin/rest/rest-service/src/main/java/org/glassfish/admin/rest/EmbeddedInhabitantsParser.java
 
 
Close
loading
Please Confirm
Close