Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Re: help on activemq - jndi on jetty 7.1.4

Don,

A WEB-INF/jetty-env.xml file:

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd";>

<Configure class="org.eclipse.jetty.webapp.WebAppContext">

<New id="connectionFactory" class="org.eclipse.jetty.plus.jndi.Resource">
      <Arg>jms/connectionFactory</Arg>
      <Arg>
        <New class="org.apache.activemq.ActiveMQConnectionFactory">
            <!-- <Arg>vm://portfolioBroker</Arg> -->
            <Arg>tcp://localhost:61616</Arg>
        </New>
      </Arg>
    </New>

    <New id="stocksQueue" class="org.eclipse.jetty.plus.jndi.Resource">
      <Arg>jms/stocksQueue</Arg>
      <Arg>
        <New class="org.apache.activemq.command.ActiveMQQueue">
            <Arg>Consumer.Node1.VirtualTopic.STOCKS</Arg>
        </New>
      </Arg>
    </New>

</Configure>


A WEB-INF/web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
         version="2.5">

  <resource-ref>
        <res-ref-name>jms/connectionFactory</res-ref-name>
        <res-type>javax.jms.ConnectionFactory</res-type>
        <res-auth>Container</res-auth>
  </resource-ref>

  <message-destination-ref>

<message-destination-ref-name>jms/stocksQueue</message-destination-ref-name>
    <message-destination-type>javax.jms.Queue</message-destination-type>
    <message-destination-usage>Consumes</message-destination-usage>
  </message-destination-ref>

</web-app>


Jan
On 21/07/10 16:21, Don Santillan wrote:
Hello,

Anybody?

-don

Don Santillan wrote:
Hello,

I am having problems making activemq 5.3.2 in jetty 7.1.4 to work
through jndi. I already followed a bunch of examples from the site
(and mailing lists) but I guess most of them are out of date.

Can anybody please make an actually working example that would only
prove that looking up from a context really gets a connection?

Thanks in advance!
-don
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users

--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com


Back to the top