[Messaging, JMS & JBossMQ] - Queue not bound
by itty06
| ejb-jar.xml
|
| <resource-env-ref>
| <description>administration object ref for outbound queue</description>
| <resource-env-ref-name>jms/ReplyQueue</resource-env-ref-name>
| <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
| </resource-env-ref>
|
| jboss.xml
|
| <resource-env-ref>
| <resource-env-ref-name>jms/ReplyQueue</resource-env-ref-name>
| <jndi-name>ABC</jndi-name>
| </resource-env-ref>
|
I have integrated tibco with JBoss 4.
When I try to lookup queue using resource-env-ref-name
value I get error where it says queue ABC not bound.
I have a queue ABC in tibco configured to have JNDI name of ABC as well.
What JBoss is trying to do is locate ABC in its local JNDI.
| Properties prop = new Properties();
| prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.tibco.tibjms.naming.TibjmsInitialContextFactory");
| prop.setProperty(Context.PROVIDER_URL, "tcp://localhost:7222");
| Context ctx = new InitialContext(prop);
| ConnectionFactory factory = (ConnectionFactory) ctx.lookup("java:comp/env/jms/QCF");
| queue = (Destination) ctx.lookup("java:comp/env/jms/ReplyQueue");
|
|
I get this error
javax.naming.NamingException: Could not dereference object
[Root exception is javax.naming.NameNotFoundException: ABC not bound]
but if I change
ctx.lookup("java:comp/env/jms/ReplyQueue");
to
ctx.lookup("ABC");
I get a Destination object.
Even changing
Context ctx = new InitialContext(prop);
to
Context ctx = new InitialContext();
doesn't give me any object.
Any suggestion?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990839#3990839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990839
18 years, 1 month
[JBoss AOP] - Can't read parameter annotations through reflection
by dwl8
I'm currently thinking about using JBoss AOP but i can't seem to get by this issue. I cannot read the parameter annotations of methods w/ a pointcut annotation. Here's the code i'm using:
jboss-aop.xml:
| <aop>
| <aspect class="test.aop.aspects.LockAspect"/>
|
| <bind pointcut="all((a)test.aop.annotations.WriteLock)">
| <advice name="writeLock" aspect="test.aop.aspects.LockAspect"/>
| </bind>
|
| <bind pointcut="all((a)test.aop.annotations.ReadLock)">
| <advice name="readLock" aspect="test.aop.aspects.LockAspect"/>
| </bind>
| </aop>
|
java code:
| @ReadLock
| public static People getPerson(@FirmId Integer firmId, Integer personId) {
| return peopleMap.get(firmId).get(personId);
| }
|
When i try to read the parameter annotation @FirmId through method.getParameterAnnotations() i get 0 length arrays for each param. When i change @ReadLock to, say, @Deprecated, I can read the parameter annotation correctly. I'm wondering if the loadtime byte code weaving(?) is doing something to the annotation. Any help is greatly appreciated. I'm pretty new to this stuff so i may be missing something obvious...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990838#3990838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990838
18 years, 1 month