inline
On Jun 6, 2006, at 6:47 AM, [EMAIL PROTECTED] wrote:





Hello,

I am trying to test jms activemq working and i got a problem that i cant
resolve ...

I got the following plan ...

 <connector
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.0";
    configId="MyJMSRId"
    parentId="geronimo/activemq-broker/1.0/car">
      <resourceadapter>
            <resourceadapter-instance>
<resourceadapter-name>ActiveMQ RA</ resourceadapter-name>
                  <config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
                  <config-property-setting
name="UserName">geronimo</config-property-setting>
                  <config-property-setting
name="Password">geronimo</config-property-setting>
                  <workmanager>
                        <gbean-link>DefaultWorkManager</gbean-link>
                  </workmanager>
            </resourceadapter-instance>
            <outbound-resourceadapter>
                  <connection-definition>

<connectionfactory-interface>javax.jms.ConnectionFactory</ connectionfactory-interface>
                        <connectiondefinition-instance>
                              <name>tcf</name>
                              <implemented-interface>
javax.jms.TopicConnectionFactory</implemented-interface>
                              <connectionmanager>
                                    <xa-transaction>
                                          <transaction-caching/>
                                    </xa-transaction>
                                    <single-pool>
                                          <max-size>10</max-size>

<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                                          <match-one/>
                                    </single-pool>
                              </connectionmanager>
                              <!--

<global-jndi-name>jms/ConnectionFactoryLocalTx</global-jndi-name>

                              <credential-interface>
javax.resource.spi.security.PasswordCredential</credential- interface>-->
                        </connectiondefinition-instance>
                  </connection-definition>
            </outbound-resourceadapter>
      </resourceadapter>
      <adminobject>
<adminobject-interface>javax.jms.Queue</adminobject- interface>

<adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</ adminobject-class>
            <adminobject-instance>

<message-destination-name>MDBTransferBeanOutQueue</message- destination-name>
                  <config-property-setting
name="PhysicalName">MDBTransferBeanOutQueue</config-property-setting>
            </adminobject-instance>
      </adminobject>
      <adminobject>
<adminobject-interface>javax.jms.Topic</adminobject- interface>

<adminobject-class>org.codehaus.activemq.message.ActiveMQTopic</ adminobject-class>
            <adminobject-instance>

<message-destination-name>ATopic</message-destination-name>
                  <config-property-setting
name="PhysicalName">ATopic</config-property-setting>
            </adminobject-instance>
      </adminobject>
</connector>

It was deploy ok,  i got  "tcf" like connection factory, and i want to
"put/publish" a message into topic "ATopic".

Ok, my code is so easy:

                  InitialContext ctx = new InitialContext();
TopicConnectionFactory tcf = (TopicConnectionFactory)
                         ctx.lookup("java:comp/env/jms/MyJMS");
TopicConnection connection = tcf.createTopicConnection();
                  out.println(""+connection);
                  out.flush();
                  Topic topic = (Topic)
ctx.lookup("java:comp/env/jms/ATopic");
                  connection.start();

                  TopicSession session =
connection.createTopicSession(false,

Session.AUTO_ACKNOWLEDGE);
                  TopicPublisher publisher =
session.createPublisher(topic);

                  TextMessage message = session.createTextMessage();
                  message.setText("hola");
                  publisher.publish(message);


then,

"java:comp/env/jms/MyJMS" ==>  into my web.xml

<resource-ref>
      <res-ref-name>jms/MyJMS</res-ref-name>
          <res-type>javax.jms.ConnectionFactory</res-type>
          <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

and into geronimo--web.xml

 <nam:resource-ref>
    <nam:ref-name>jms/MyJMS</nam:ref-name>
    <nam:resource-link>tcf</nam:resource-link>
  </nam:resource-ref>


and it works ok, because i can get a object from connection factory , but,

how can i get a topic objecto from "ATopic"  , how can i define this
process:


if i add to web.xml

 <nam:resource-env-ref>
        <nam:ref-name>jms/ATopic</nam:ref-name>

<nam:message-destination-link>MyTopic</nam:message-destination-link>
    </nam:resource-env-ref>

I assume you put this in geronimo-web.xml and the snippet below in web.xml?

I see that the connector plan calls the topic "ATopic" whereas here you have "MyTopic". If this is not a typo in your mail, what happens if you correct this? In particular are there any deployment errors? If so please paste them.

thanks
david jencks


and into geronimo-web.xml

<resource-env-ref>
        <resource-env-ref-name>jms/ATopic</resource-env-ref-name>
        <resource-env-ref-type>
          javax.jms.Topic
        </resource-env-ref-type>
    </resource-env-ref>


geronimo server shows a configuration problem ...

what am i doing wrong '

any web/tutorial that including "working examples"?

because, there are a lot of tutorial but i can't get that examples works
...

any example aboy mdb bean (in/out) that can i use and test?

thank you


Este mensaje y sus anexos pueden contener información confidencial, por lo que se informa de que su uso no autorizado está prohibido por la ley. Si Vd. considera que no es el destinatario pretendido por el remitente, por favor póngalo en su conocimiento por esta misma vía o por cualquier otro medio y elimine esta comunicación y los anexos de su sistema, sin copiar,
remitir o   revelar los contenidos del mismo a cualquier otra persona.
Cualquier información, opinión, conclusión, recomendación, etc. contenida en el presente mensaje no relacionada con la actividad empresarial del Grupo Banesto y/o emitida por persona sin capacidad para ello, deberá considerarse como no proporcionada ni aprobada por el Banco. Banesto pone los medios a su alcance para garantizar la seguridad y ausencia de
errores en la   correspondencia electrónica, pero no puede asegurar la
inexistencia de virus o la no alteración de los documentos transmitidos electrónicamente, por lo que declina cualquier responsabilidad a este
respecto.

This message and its contents may contain confidential information and its
non-authorised use is prohibited by law. If you are not the intended
recipient of this email, please advise the sender of the fact using the same, or other, means and delete this message and its contents from your
system without   copying, forwarding or revealing the contents of the
message to any other   person. Any information, opinion, conclusion,
recommendation, etc. contained in this message and which is unrelated to
the business activity of Grupo   Banesto and/or issued by unauthorised
personnel, shall be considered unapproved by the Bank. Banesto implements
control measures to ensure, as far   as possible, the security and
reliability of all its electronic correspondence. However, the Bank does not guarantee that emails are virus-free or that documents have not be
altered and takes no responsibility   in this respect.


Reply via email to