[JBoss/Spring Integration] - Re: Accessing app_1's spring beans in app_2's config file
by gumnaam
Where can I find the class InitializerContextLoaderListener ?
I tried to follow the above code, but I couldn't find InitializerContextLoaderListener anywhere, so I assumed that you were refering to ContextLoaderListener , and substituting InitializerContextLoaderListener with ContextLoaderListener made the code compile, but it doesn't run.
The problem is as per the code for JndiContextSaver, the WebApplicationContext is created by calling super method. And here if the web context's applicationContext.xml has any bean definitions, that refer to a parent bean defi. (in bean factory in the ejb context), then they don't get deployed.
I get bean ref. error, and as a result the WebApplication context creation throws an error.
If the WebApplicationContext is created by a super call, how will the spring deployer make it aware of the parent application context in the ejb container.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135910#4135910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135910
18 years, 1 month
[JBoss Messaging] - Re: no exception callback for JBM clients when server detect
by bodrin
Ok, thanks!
I have updated to this one
http://repository.jboss.com/jboss/remoting/2.2.2.SP5/lib/jboss-remoting.jar
Here is the config of my ClusteredConnectionFactory in connection-factories-service.xml :
| ...
| <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
| name="jboss.messaging.connectionfactory:service=ClusteredConnectionFactory"
| xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
|
| <attribute name="JNDIBindings">
| <bindings>
| <binding>/ClusteredConnectionFactory</binding>
| <binding>/ClusteredXAConnectionFactory</binding>
| <binding>java:/ClusteredConnectionFactory</binding>
| <binding>java:/ClusteredXAConnectionFactory</binding>
| </bindings>
| </attribute>
|
| <attribute name="SupportsFailover">true</attribute>
| <attribute name="SupportsLoadBalancing">false</attribute>
| </mbean>
| ...
|
Unfortunately I'm able to reproduce the above scenario each time I try.
At step 5. / 6. I always get a dump like the following on cluster node1:
| [root@blade8 jboss-4.2.2.GA-JBM-1.4.0.SP3]# 14:35:44,883 WARN [SimpleConnectionManager] ConnectionManager[de3c87] cannot look up remoting session ID a1m2s4i-enks3t-fdpvfj55-1-fdpvhdf8-1i
| 14:35:44,884 WARN [SimpleConnectionManager] A problem has been detected with the connection to remote client a1m2s4i-enks3t-fdpvfj55-1-fdpvhdf8-1i, jmsClientID=null. It is possible the client has exited without closing its connection(s) or the network has failed. All connection resources corresponding to that client process will now be removed.
|
|
After this the consumer receives the messages if I start the producer, but when I kill cluster node1, the consumer do not get any exception callback.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135904#4135904
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135904
18 years, 1 month
[Javassist user questions] - Re: adding annotations
by cat4hire
Hi,
I'm still fighting with the annotation problem. I've made a code clean up, and now I've got the following piece of code:
| // make a new class
| CtClass newProxyClass = pool.makeClass( subProxyClassName );
| newProxyClass.setSuperclass( baseProxyClass );
|
| // place a default constructor in the new class
| CtConstructor constructor = new CtConstructor(null, newProxyClass );
| constructor.setBody(";");
| newProxyClass.addConstructor(constructor);
|
| // get the class file and add the annotation
| ClassFile classFile = newProxyClass.getClassFile();
| ConstPool constantPool = classFile.getConstPool();
| AnnotationsAttribute attr = new AnnotationsAttribute(constantPool, AnnotationsAttribute.visibleTag);
| javassist.bytecode.annotation.Annotation a = new javassist.bytecode.annotation.Annotation(this.annotationClassName, constantPool);
| attr.setAnnotation(a);
| classFile.addAttribute(attr);
| classFile.setVersionToJava5();
|
| // transform the classfile into bytecode
| ByteArrayOutputStream bos = new ByteArrayOutputStream();
| DataOutputStream os = new DataOutputStream( bos );
| classFile.write( os );
| os.close();
|
| // load the class
| return this.defineClass(subProxyClassName, bytecode, 0, bytecode.length);
|
at runtime no exception are thrown, but the new class still has no annotation added!
Then I saved the bytecode to a file in two cases, the above piece of code and the one without the addAttribute, and I can see they are different, so it seems as the annotation is added, but it is not visible to the runtime system.
Please, any suggestion is appreciated!!!
Thanks,
Luca
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135894#4135894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135894
18 years, 1 month