[Design of JBoss Tools (dev)] - JBOSS AS Stopping
by wchico2
Hi,
in our Eclipse-based development environment
we noticed that in the JBOSS Tools for Eclipse 3.3 there is still the problem (as is the same with the Eclipse WTP version) that when the JBOSS AS 4.2.2 is being stopped the registry cannot be found and you get a CommunicationException.
Note that this only occurs when you setup the AS we apply the -b option to setup a different IP than localhost so we can access it from outside the development machine (where JBOSS AS is running too)
Is this or will this be fixed in the upcoming release for Eclipse 3.4??
Thanks so much,
Wolfgang.
P.S.:
Here's the log:
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1416)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:596)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1387)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
... 5 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at java.net.Socket.(Socket.java:367)
at java.net.Socket.(Socket.java:267)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)
... 5 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168976#4168976
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168976
17 years, 4 months
[Design the new POJO MicroContainer] - Re: StructureContext and candidate annotations
by alesj
I've added this to AbstractStructureDeployer:
| /**
| * Create deployment resource loader.
| *
| * @param root the deployment root
| * @return new deployment resource loader
| */
| protected abstract DeploymentResourceLoader createDeploymentResourceLoader(VirtualFile root);
|
| /**
| * Create annotation environment.
| *
| * @param classLoader the classloader
| * @return new annotation environment
| */
| protected abstract AnnotationEnvironment createAnnotationEnvironment(ClassLoader classLoader);
|
| /**
| * Check for candidate annotations.
| *
| * @param context the structure context
| * @param roots the roots to check
| */
| protected void checkCandidateAnnotations(StructureContext context, VirtualFile... roots)
| {
| if (roots == null || roots.length == 0)
| throw new IllegalArgumentException("Null or empty roots");
|
| if (candidateAnnotations == null || candidateAnnotations.isEmpty())
| return;
|
| for(VirtualFile root : roots)
| {
| DeploymentResourceLoader loader = createDeploymentResourceLoader(root);
| ClassLoader cl = new DeploymentResourceClassLoader(loader);
| AnnotationEnvironment env = createAnnotationEnvironment(cl);
| for (Class<? extends Annotation> annotationClass : candidateAnnotations)
| {
| if (env.hasClassAnnotatedWith(annotationClass))
| {
| context.addFoundAnnotation(annotationClass);
| }
| }
| }
| }
|
Where MockEARStructureDepolyer then checks in
Module's StructureContext if we have any matching annotation.
OK?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168974#4168974
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168974
17 years, 4 months