Hi,
I'm trying to get hold of JBoss JMS queue from my MBean. It works fine when I
"hot-deploy" my MBean when JBoss is allready started, but fails when I start
JBoss with my MBean deployed. I get following exception:
Failed to get JMS Queue. Exception = javax.naming.NameNotFoundException:
ConnectionFactory not bound
The code get the queue looks like this:
private void getJMSQueue() {
| try {
| InitialContext iniCtx = new InitialContext();
| Object tmp = iniCtx.lookup("ConnectionFactory");
| QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
| conn = qcf.createQueueConnection();
| que = (Queue) iniCtx.lookup("queue/testQueue");
| session = conn.createQueueSession(false,
QueueSession.AUTO_ACKNOWLEDGE);
| conn.start();
| } catch (Exception e) {
| System.out.println("Failed to get JMS Queue. Exception = " +
e.toString());
| return;
| }
| System.out.println("GeneralMessageManager() Got JMS queue!!");
| }
This is how my jboss-service.xml looks like:
<server>
| <mbean code="com.ascom.communication.jmx.ServerSocket"
name="Ascom:service=ServerSocket,jndiName=ascom/communication/terminal">
| <attribute name="JndiName">ascom/communication/terminal</attribute>
| <depends>jboss:service=Naming</depends>
| <depends>jboss.jms:alias=QueueConnectionFactory</depends>
| </mbean>
| </server>
What am I doing wrong?
Thanks for your reply!
/Magnus
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921778#3921778
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921778
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user