RV Connection

Send Snippet To: Save this snippet to Code Collector Pro -- view all phact's snippets
language: Java
license: Other

Code for Snippet:

                
private TibrvTransport getTransport() {
    if (transport == null) {
      try {
        Tibrv.open(Tibrv.IMPL_NATIVE);
      } catch (TibrvException e) {
        throw new ConnectionException("failed to init rendezvous, make sure you have TIBCO/tibrv/bin in your PATH / LD_LIBRARY_PATH", e, this);
      }
      try {
        transport = new TibrvRvdTransport(service, network, daemon);
      } catch (TibrvException e) {
        throw new ConnectionException("failed to create tibrv transport", e, this);
      }
    }
    return transport;
  }
 
  public TibrvListener createListener(String topic, TibrvReadConnector connector) throws TibrvException  {
    getTransport();
    return new TibrvListener(Tibrv.defaultQueue(), connector, getTransport(), topic, null);
  }
 
  public void send(TibrvMsg msg) throws TibrvException {
    getTransport().send(msg);
  }
 
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 814
Date Added: 2008-03-17 11:03:16
Last Modified: 0000-00-00 00:00:00

Web Analytics