Wednesday, November 4, 2009

Tibco Products Installation Sequences

Tibco Products Installation Sequences
 
In this post, we only talk about the tibco products of EMS, Administrator, Running Agent, BusinessWorks, BusinessEvents. Here are the sequence to install the products,
 
1. install TIBCO EMS. EMS is a messaging system to produce/consume message to/from queues/topics.
 
2. install Tibco Running Agent. It incluses Tibco Rendezvous, Tibco Hawk (Tibco monitor tool), Tibco Designer (BE, BW development tool)
 
3. install Tibco Administrator which is the running env for BE, BW or others.
 
4. install Tibco BusinessWorks which can integrate with many products besides tibco product itself and run as process.
 
5. install Tibco BusinessEvents which is another tool to handle event/concept/scroecard with rules.

Wednesday, October 14, 2009

TIBCO EMS: Destination Features

TIBCO EMS: Destination Features

 

  1. You can set a secure mode for access control at the queue or topic level

 

  1. You can set threshold limits for the amount of memory used by the EMS

 

 

  1. You can route messages sent to destinations to other servers

 

  1. You can also create bridges between destinations of the same or different types to create a hybrid messaging model for your application

 

 

  1. You can control the flow of messages to a destination

 

  1. You can exchange messages with other message services.Queues can receive TIBCO Rendezvous and TIBCO SmartSockets messages. Topics can either receive or send Rendezvous and TIBCO SmartSockets messages

 

 

  1. You can set queues to be exclusive or non-exclusive. Only one receiver can receive messages from an exclusive queue

 

  1. You can specify a redelivery policy for queues. When messages must be redelivered, you can specify a property on the queue that determines the maximum number of times a message should be redelivered

 

 

  1. You can trace and log all messages passing through a destination

 

  1. You can include the user name of the message producer in the message with sender_name and sender_name_endorced

 

 

  1. Administrator operations can use wildcards in destination names

 

  1. You can set the failsafe mode on a topic or queue to direct the server to write persistent messages to disk synchronously to guarantee messages are not lost under any circumstances.

 

 

  1. You can specify that a consumer is to receive batches of messages in the background to improve performance

Monday, October 12, 2009

EMS: Setup Fault Tolerance

 
 
 
EMS: Setup Fault Tolerance
 
Here is the summary to setup fault tolerance servers, tcp://ems1:7222 and tcp://ems2:7222 for example,
 
 
  1. In server ems1,ems2, change the property server to same values EMS-SERVER for example.
 
b.      In server ems1, change ft_active to tcp://ems2:7222. In server ems2, change ft_active to tcp://ems1:7222. 
 
 
c.      In both servers, set properties ft_heartbeat, ft_actiation, ft_reconnect_timeout in file tibemsd.conf. The values can be different in bot servers.
 
d.      Make sure both servers use the shared configuration files (users.conf, groups.conf and others) except tibemsd.conf and shared state files(meta.db, async-msgs.db,sync-msgs.db). tibemsd.conf should have 2 copies seperately in both servers. In server ems1, setup 2 folders for configuration and shared state files. Copy all configuration files to the configuration folder named Con for example. Copy all shared state files to another one named DataStore for example.
 
e.      In server ems1, ems2, map above folders to a same driver, like Z: for example.
 
f.      In server ems1,ems2, set properties users, groups, topics, queues, acl_list, factories, routs, bridges, transports, tibrvcm, durables like below to let the server know where to get those configuration files.
users   =  Z:/Con/Configureusers.conf
groups = Z:/Con/groups.conf
 
g.      In server ems1, ems2, set properties store value like below
store=Z:/DataStore
Note that above property only specify the folder path
 
h.      In servers ems1,ems2, set the property store_minimum_sync, store_minimum_async  to the same value
 
i.      If authorized property is set enabled, create a TIBCO EMS id/password pairs. The id should be same as the server property value. In this example, create id named EMS-SERVER. And set the password property accordingly in servers ems1, ems2. 
 
j.      Restart TIBCO EMS service in both servers to validate the settings.
 
All properties above can be founder in  tibemsd.conf file.
 
 

Thursday, October 1, 2009

祖国生日快乐

祖国生日快乐

 

祝愿我们伟大祖国繁荣昌盛!!!

祝愿我们伟大的民族长盛不衰!!!

Tuesday, September 29, 2009

EMS: Steps to Send/Receive Message

EMS:  Steps to Send/Receive Message

 

Here are the steps to send/receive message from client side, (java code)

 

  1. Create a connection factory.

 

ConnectonFactory f = new com.tibco.tibjms.TibjmsConnectionFactory(String serverURL);

 

  1. Create a connection

Connection c = f.createConnection(String username, String password);

      If the server property authorization is disabled, you do not need to specify the username and password.

 

  1. Create a session

Session s=c.createSession(Boolean transcationFlag, Int delivery_mode);

 

  1. Get destination

Javax.jms.Queue d=s.CreateQueue(String queueName);

Javax.jms.Topic d=s.CreateTopic(String topicName);

 

Once the Queue/Topic exists, then return the destination object.

 

 

  1. Create message producer to send message, or

MessageProducer p=s.createProducer(Destination  d);

 

Create a Message object, TextMessage object for example,

TextMessage tm = s.createTextMessage();

You can set property for the message and the text body.

tm.setText(String textBody);

tm.setStringProperty(String propertyName, String propertyValue);

p.send(tm);

 

 

  1. Create message consumer to receive message

 MessageConsumer p=s.createConsumer(Destination d, String selector);

     

      For synchronously receiver,

      p.receive();

 

     For asynchronously receiver, you need to implement MessageListener class and restruture the onMessage function.

Class myMessageListener implements MessageListener

{

Public void onMessage(Message message)

{

// add code here to handle if message is sent to queue/topic

   System.out.println(“The imcoming message is: “+message);

}

}

 

     In the main class, set consumer listener

p.setMessageListener(new myMessageListener);

 

Note that, for the MessageConsumer class, you need to start the connection before receive message from Queue/Topic

  1. start();

 

Note: another way to get the ConnectionFactory/Queue/Topic object JNDI interface.

 

 

 

Friday, September 25, 2009

TIBCO EMS: Access Control

TIBCO EMS: Access Control

 

EMS Permissions

  1. administrator permission

The permission defines the right for users/groups to create, modify, delete, and view users, destinations, routes, factories and others.

 

Notes: users in admin group have all administrator permissions regardless of the permission settings.

 

You can not grant revoke administrator permissions from any users in admin group.

Users with change-admin-acl and view-user/group permission can grant or revoke permissions to other users but can only grant or revoke permissions that have been granted.

 

Users in groups inherit the administrator permission.

 

 

  1. destination-based administrator permission

The permission defines the right for users/group to create, modify, delete, purge, view destinations.

Notes:  any destination-lever permission granted to a user or group for a wildcard destination is inherited for all child destinations.

 

  1. user permission

The permission defines the right for users/group to send, receive to/from queue or publish, subscribe to/from topic. Besides, it defines the right to create durable subscriptions to topics.

 

 

Server/Destination Connection Settings

Once the authorization is disabled (default setting), the server grants any connection request and doest not check permissions when a client connects to a destination.

 

Note: users must always log in with the correct administration username and password to perform any administrative function.

 

Once the authorization is enabled, the server grants connections only from authorized users. The server will check the destination permission if the destination has secure property.

 

Note: secure is a destination-based property. The server will not check the destination permission even if the destination permissions have defined but the secure property does not set.

 

Friday, September 18, 2009

TIBCO EMS: Ways to Persistent Message

TIBCO EMS: PERSISTENT MESSAGE

 

  1. Persistent messages sent to Queues

Note: server always persistent the message to disk

 

  1. Persistent messages published to Topics

Note: only persistent the message if the subscribe is one of Durable Consumer or Fault Tolerant Consumer.

 

  1. Persistent Messages and Failsafe Destinations

Note:  once the failsafe in queue or topic are set, the producer or publisher will wait until server persistent the message to disk. Else the server return control to producer or publisher before complete the persistent operations.