-
1. Re: Injection of JMS Queue fails
nickarls Nov 19, 2012 2:41 PM (in response to developer251)Check that you import the correct @Produces (CDI). I guess it will be a popular name...
-
2. Re: Injection of JMS Queue fails
developer251 Nov 20, 2012 2:20 AM (in response to nickarls)Thanks for your reply Nicklas, however I have checked and I'm importing javax.enterprise.inject.Produces;
It should be the correct one.
Max
-
3. Re: Injection of JMS Queue fails
nickarls Nov 20, 2012 3:23 AM (in response to developer251)So it's not an injection problem (you get not-null for the injection), the error comes when the queue is used?
-
4. Re: Injection of JMS Queue fails
jaikiran Nov 20, 2012 3:46 AM (in response to developer251)Looked related to https://community.jboss.org/message/777287#777287
-
5. Re: Injection of JMS Queue fails
nickarls Nov 20, 2012 4:08 AM (in response to jaikiran)It indeed looks like the code in
if (destination != null && !(destination instanceof HornetQDestination))
{
throw new InvalidDestinationException("Not a HornetQ Destination:" + destination);
}
But I thought there wouldn't be any proxies involved since the @Producer is @Dependent (default) scoped
-
6. Re: Injection of JMS Queue fails
developer251 Nov 20, 2012 5:07 AM (in response to nickarls)Thanks for your replies. well the error is thown when I try to create a MessageProducer from the JMS Session:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
QueueSender sender=null;
Connection connection = null;
Session session = null;
try {
connection = cf.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer publisher = session.createProducer(queue); // Exception !
}
From what I can read in the other thread, it seems there is no immediate fix for it now ?
Thanks Max
-
7. Re: Injection of JMS Queue fails
nickarls Nov 20, 2012 5:11 AM (in response to developer251)Does commenting out the if-statement from HornetQ and building your own version count? ;-)
-
8. Re: Injection of JMS Queue fails
developer251 Nov 20, 2012 7:53 AM (in response to nickarls)Thanks, however looking at the code, even if I comment out the if statement there's a cast to HornetQDestination just after:
HornetQDestination jbd = (HornetQDestination)destination;
I think I'll hit a ClassCastException if I try to skip the instanceof check.......
-
9. Re: Injection of JMS Queue fails
jbertram Nov 20, 2012 9:57 AM (in response to developer251)1 of 1 people found this helpfulFYI - We're discussing how to deal with this on https://community.jboss.org/thread/213568.