Skip to main content

Exception attempting to inject Unresolved Message-Destination-Ref

4 replies [Last post]
waynetg
Offline
Joined: 2007-06-04
Points: 0

Hi all

I am using glassfish v3.0.1 b 14.

I have two Topics that are defined as follows im my domain.xml

It seems that the server can't find jms/OutgoingMessageTopic even though it is able to find jms/OutgoingMessageTopic and they have an identical declaration. I have tried
@Resource(name = "jms/OutgoingMessageTopic")
and
Destination destination = (Destination) c.lookup("java:comp/env/jms/OutgoingMessageTopic");

and both fail
I get the following with asadmin:
/opt/glassfishv301b14/bin/asadmin list-jndi-entries --context jms

OutgoingMessageFactory: javax.naming.Reference
IncomingMessageTopic: javax.naming.Reference
IncomingMessageFactory: javax.naming.Reference
OutgoingMessageTopic: org.glassfish.javaee.services.ResourceProxy

Command list-jndi-entries executed successfully.

I have no idea why OutgoingMessageTopic is seen as a org.glassfish.javaee.services.ResourceProxy
instead of javax.naming.Reference like the rest.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jr158900
Offline
Joined: 2005-04-13
Points: 0

Yes, @Resource(lookup / mappedName) should work.

Similarly, when the look up is done, it should be
initialContext.lookup("jms/OutgoingMessageTopic")
unless the application's deployment descriptor has defined

waynetg
Offline
Joined: 2007-06-04
Points: 0

Thanks, awesome!

cf126330
Offline
Joined: 2005-03-29
Points: 0

It should be

@Resource(mappedName = "jms/OutgoingMessageTopic"), or

@Resource(lookup = "jms/OutgoingMessageTopic")

jr158900
Offline
Joined: 2005-04-13
Points: 0

Yes, @Resource(lookup / mappedName) should work.

Similarly, when the look up is done, it should be
initialContext.lookup("jms/OutgoingMessageTopic")
unless the application's deployment descriptor has defined