Hi @SHADOW . I just noticed this thread never got a reply on. Have you made any progress on this issue?
The one thing from your snippets above that strikes me as odd (not necessarily incorrect, I’m just not super familiar): you are using weblogic.jndi.WLInitialContextFactory
as your context factory. So, using WebLogic as an external JNDI lookup provider, vs. using Solace com.solacesystems.jndi.SolJNDIInitialContextFactory
. Correct? How have you configured the external JNDI? Does it have all the same (Solace-specific) properties as Solace connection factory? Like, since using WebLogic JNDI for initial context, I’m not sure exactly how it would handle a JNDI topic lookup? I mean, it could work, but I’m not sure. Too bad a JMS expert doesn’t weigh in here.
Ah, looking at this sample code here , maybe this is something to help?
// lookup the connection factory
SolConnectionFactory cf = (SolConnectionFactory)ctx.lookup(cfName);
// lookup the destination
Object destination = ctx.lookup(destinationName);
// Create a JMS Connection instance .
connection = cf.createConnection();
// Create a non-transacted, client ACK session.
Session session = connection.createSession(false, SupportedProperty.SOL_CLIENT_ACKNOWLEDGE);
// Create the producer and consumer
MessageConsumer consumer = null;
MessageProducer producer = null;
if (destination instanceof Topic) {
Topic topic = (Topic)destination;
consumer = session.createConsumer(topic);
producer = session.createProducer(topic);
} else if (destination instanceof Queue) {
Queue queue = (Queue)destination;
consumer = session.createConsumer(queue);
producer = session.createProducer(queue);
} else {
Maybe not. Although, your casting exception occurs during the send()
method, and not here, right?
Topic topic = (Topic) initialContext.lookup(TOPIC_JNDI_NAME);
So that means that the lookup succeeds? And returns a valid JMS Topic destination. So I’m guessing that maybe the particular send()
call you’re using is overloaded or not pure JMS, and is expecting a Solace topic vs. JMS topic or something? Hmmm, just checked the JavaDocs , and that looks ok too.
I’m not sure. Let us know if you have an update!