You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by DimasOwl <dm...@db.com> on 2009/07/07 10:56:46 UTC

MDB to listen to Tibco JMS

Documentation is quite poor http://openejb.apache.org/3.0/mdb-container.html
It describes only default settings for ActiveMQ.
Is it possible to listen to topic on external JMS server (Tibco)

Any sample would be extremely helpful!
-- 
View this message in context: http://www.nabble.com/MDB-to-listen-to-Tibco-JMS-tp24369433p24369433.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: MDB to listen to Tibco JMS

Posted by David Blevins <da...@visi.com>.
On Jul 15, 2009, at 11:36 PM, DimasOwl wrote:

>
> hi, David
> They couldn't provide such file
> Actually the only available way is to use standard approach:
> create InitialContext and get connectionfactory, and topic by their  
> jndi
> names
>
> For us it is slightly more complicated as we have to use LDAP server  
> as
> mediator between Tibco and client application.
>
> I've found next page
> https://genericjmsra.dev.java.net/docs/tibco-genericjmsra-integration-sample-doc/Integrating_Sun_Java_System_Application_Server_with_Tibco_JMS_using_the_Generic_Resource_Adapter_for_JMS.html
>
> Looks like that is client's responsibility to create resource  
> adapter. I
> believe I have all necessary settings to do that. Could you tell me  
> is there
> more simple way to generate adapter. I don't want to install Sun's  
> server

According to that doc it seems Sun has a Resource Adapter that works  
with any JMS implementation, such as Tibco.  If you can get that  
Resource Adapter and it does work with other app servers like a  
Resource Adapter should, then it should be possible to package the  
Resource Adapter (the .rar file) in your ear and deploy it into OpenEJB.

Seems like the doc also mentions some fairly important <activation- 
config> settings which you could just as easily include in your ejb- 
jar.xml or via the @ActivationConfig annotation.

I am not sure of any needs that the Resource Adapter or Tibco may  
have, but any compliant and *portable* Resource Adapter will work in  
OpenEJB.  I can't guarantee that the Resource Adapter/Tibco setup  
mentioned in that doc is both of those things, but we can hope :)

-David


Re: MDB to listen to Tibco JMS

Posted by DimasOwl <dm...@db.com>.
hi, David
They couldn't provide such file
Actually the only available way is to use standard approach:
create InitialContext and get connectionfactory, and topic by their jndi
names

For us it is slightly more complicated as we have to use LDAP server as
mediator between Tibco and client application. 

I've found next page
https://genericjmsra.dev.java.net/docs/tibco-genericjmsra-integration-sample-doc/Integrating_Sun_Java_System_Application_Server_with_Tibco_JMS_using_the_Generic_Resource_Adapter_for_JMS.html

Looks like that is client's responsibility to create resource adapter. I
believe I have all necessary settings to do that. Could you tell me is there
more simple way to generate adapter. I don't want to install Sun's server
-- 
View this message in context: http://www.nabble.com/MDB-to-listen-to-Tibco-JMS-tp24369433p24510876.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: MDB to listen to Tibco JMS

Posted by DimasOwl <dm...@db.com>.
hi, David
that is the problem as I don't have any files

I will try to  talk with guys from Tibco support if they could provide such
file.
-- 
View this message in context: http://www.nabble.com/MDB-to-listen-to-Tibco-JMS-tp24369433p24485446.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: MDB to listen to Tibco JMS

Posted by David Blevins <da...@visi.com>.
On Jul 9, 2009, at 1:31 AM, DimasOwl wrote:

> 2009-07-09 09:09:31,912 - ERROR - Endpoint connection to JMS broker  
> failed:
> Wire format negociation timeout: peer did not send his wire format.

> openejb.xml
> <Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">

Use of the ActiveMQResourceAdapter won't work with other JMS  
implementations than ActiveMQ.

Do you have a resource adapter for your Tibco JMS broker (something  
with a .rar extension).  If so can you post the ra.xml file from it?

With that information we can probably work up a config for you and use  
it to improve the documentation as well.

-David


Re: MDB to listen to Tibco JMS

Posted by DimasOwl <dm...@db.com>.
Hi,
Thank a lot for you answer, Jean
I've tried to follow you suggestion
now I've got 
2009-07-09 09:09:31,912 - ERROR - Endpoint connection to JMS broker failed:
Wire format negociation timeout: peer did not send his wire format.
2009-07-09 09:09:31,913 - ERROR - Endpoint will try to reconnect to the JMS
broker in 30 seconds


openejb.xml 
<Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">
  # Broker configuration URI as defined by ActiveMQ
  # see http://activemq.apache.org/broker-configuration-uri.html

  BrokerXmlConfig

  # Broker address

  ServerUrl tcp://lonmmsjmsu1.uk.db.com:10140

  # DataSource for persistence messages

  DataSource My Unmanaged DataSource
</Resource>

and  here is annotation from MDB
@MessageDriven
        (activationConfig = {
            @ActivationConfigProperty(propertyName = "destination",
                    propertyValue = "EventsTopic"),
            @ActivationConfigProperty(propertyName = "destinationType",
                    propertyValue = "javax.jms.Topic"),
            @ActivationConfigProperty(propertyName = "acknowledgeMode",
                    propertyValue = "Auto-acknowledge"),
            @ActivationConfigProperty(propertyName =
"subscriptionDurability",
                    propertyValue = "NonDurable")
                }
        )
***


More questions:
How to describe user and password to connect to topic?
And what is suspicious is why it doesn't throw  authentication Exception 


Jean-Louis MONTEIRO wrote:
> 
> Hi,
> 
> AFAIK, Active MQ is used both:
> - server (optional): used when you want to start an embedded broker
> - client: Active MQ is used to connect to a broker (ActiveMQ, MQSeries,
> TibcoRV, ...)
> 
> So a configuration like the following should work.
> 
>  <Resource id="MyActiveMQResourceAdapter" provider="Default JMS Resource
> Adapter">
>     # Broker configuration URI as defined by ActiveMQ
>     # see http://activemq.apache.org/broker-configuration-uri.html
>     # We can leave it empty because we don't want to start an embedded
> ActiveMQ broker
>     BrokerXmlConfig
> 
>     # Broker address
>     # It must point to your Tibco broker
>     ServerUrl tcp://<host>:<port>
> 
>     # Specifies the size of the thread pool available to ActiveMQ.
>     ThreadPoolSize 30
>   </Resource>
> 
> Jean-Louis
> 
> 

-- 
View this message in context: http://www.nabble.com/MDB-to-listen-to-Tibco-JMS-tp24369433p24406229.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: MDB to listen to Tibco JMS

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi,

AFAIK, Active MQ is used both:
- server (optional): used when you want to start an embedded broker
- client: Active MQ is used to connect to a broker (ActiveMQ, MQSeries,
TibcoRV, ...)

So a configuration like the following should work.

 <Resource id="MyActiveMQResourceAdapter" provider="Default JMS Resource
Adapter">
    # Broker configuration URI as defined by ActiveMQ
    # see http://activemq.apache.org/broker-configuration-uri.html
    # We can leave it empty because we don't want to start an embedded
ActiveMQ broker
    BrokerXmlConfig

    # Broker address
    # It must point to your Tibco broker
    ServerUrl tcp://<host>:<port>

    # Specifies the size of the thread pool available to ActiveMQ.
    ThreadPoolSize 30
  </Resource>

Jean-Louis


DimasOwl wrote:
> 
> Documentation is quite poor
> http://openejb.apache.org/3.0/mdb-container.html
> It describes only default settings for ActiveMQ.
> Is it possible to listen to topic on external JMS server (Tibco)
> 
> Any sample would be extremely helpful!
> 

-- 
View this message in context: http://www.nabble.com/MDB-to-listen-to-Tibco-JMS-tp24369433p24399019.html
Sent from the OpenEJB User mailing list archive at Nabble.com.