Wednesday, March 2, 2011

TIBCO Enterprise for JMS


TIBCO Enterprise for JMS

1      What is JMS?

Java Message Service 1.1 (JMS) is a Java framework specification for messaging between applications. Sun Microsystems developed this specification, in conjunction with TIBCO and others, to supply a uniform messaging interface among enterprise applications.

2      What is TIBCO EMS?

Its JMS plus it provides enterprise-class functionality such as fault-tolerance, message routing, and communication with other messaging systems like TIBCO
Rendezvous.

JMS supports two messaging models:

    * Point-to-point (queues) - one producer and one consumer per message.
    * Publish and subscribe (topics)

3      Can we have more than one producer/consumer for a queue?

More than one producer can send messages to the same queue, and more than one consumer can retrieve messages from the same queue.

4      How can you make only one consumer receives message from the queue?

By making the queue exclusive. If the queue is exclusive, then all queue messages can only be retrieved by the first consumer specified for the queue. Exclusive queues are useful when you want only one application to receive messages for a specific queue. If the queue is not exclusive, any number of receivers can retrieve messages from the queue.

5      Why do we need Non-exclusive queues?

Non-exclusive queues are useful for balancing the load of incoming messages across multiple receivers. Regardless of whether the queue is exclusive or not, only one consumer can ever retrieve each message that is placed on the queue.

6      How is broadcast messaging supported in JMS?

JMS supports Broadcast messaging using 'topics'. In this model, the producer is known as a publisher and the consumer is known as a subscriber.

7      Can more than one publishers public on same topic?

YES. All subscribed consumers receive the all messages.

8      What do you mean by 'failsafe' mode?

It is property of Queue. A failsafe mode allows messages to be written to disk synchronously to guarantee no messages are ever lost due to server failure.

9      Is content based routing possible in JMS?

YES. Messages sent to destinations can be routed to other servers.

10  Can JMS Queues/Topics receive TIBCO RV messages??

NO. But TIBCO EMS can receive.

11  Which package is used by the Java Applicatio to send/receive the JMS messages?

'javax.jms' package is used to         send/receive messages.

12  What is JMS Message structure?

JMS messages have a standard structure. This structure includes the following sections:
    * Header (required)
    * Properties (optional)
    * Body (optional)

The JMS specification details a standard format for the header and body of a message. Properties are provider-specific and can include information on specific
implementations or enhancements to JMS functionality.

13  What are TIBCO EMS Message properties?

JMS_TIBCO_COMPRESS - Allows messages to be compressed for more efficient storage.
JMS_TIBCO_DISABLE_SENDER - Specifies that the user name of the message sender should not be included in the message, if possible.
JMS_TIBCO_IMPORTED - Set by the server when the message has been imported from TIBCO Rendezvous.
JMS_TIBCO_MSG_EXT - Extends the functionality of map messages to include submessages or arrays.
JMS_TIBCO_MSG_TRACE - Specifies the message should be traced from producer to consumer.
JMS_TIBCO_PRESERVE_UNDELIVERED - Specifies the message is to be placed on the undelivered message queue if the message must be removed.
JMS_TIBCO_SENDER - Contains the user name of the message sender.

14  What are two delivery modes supported by JMS?

PERSISTENT and NON_PERSISTENT.

15  What is SSL?

Secure Sockets Layer (SSL) is a protocol for transmitting encrypted data over the Internet or an internal network. SSL works by using public and private keys to encrypt data that is transferred over the SSL connection. Most web browsers support SSL, and many Web sites and Java applications use the protocol to obtain confidential user information, such as credit card numbers.

16  Can you define the JMS API programming model for client?

Queue/Topic ConnectionFactory >>(Creates)>> Queue/Topic Connection >>  (Creates) >> Queue/Topic Session >> (can create 3 things) >>  Message/MessageProducer/MessageConsumer

- MessageProducers send messages to queue/topic.
- MessageConsumers receive messages from queue/topic.
- MessageListeners are registered with MessageConsumers and
  listen/receive message from the queues/topics.

17  What is ConnnectionFactory Object?

The ConnectionFactory object encapsulates a set of connection configuration  parameters. These objects are created using the administration interface and  they are stored and managed by the TIBCO Enterprise for JMS server.  When a  JMS client starts, it typically performs a Java Naming and Directory Interface  (JNDI) lookup for the ConnectionFactories that it needs.

18  How can write a generic JMS Client which can talk to any JMS Server?

Each JMS Server have their own unique 'InitialContext'. So in your JMS client set  the appropriate 'InitalContext' depending upon which server your are using.
Context ctx = new InitialContext(env);
ConnectionFactory myConnectionFactory =
   (ConnectionFactory) ctx.lookup("myConnectionFactory");

19  Tell me some thing about Connection object.

A Connection object encapsulates a virtual connection with the server. ConnectionFactory objects create Connection objects. You use a Connection to  create one or more Session objects. A connection is a fairly heavyweight object,  and therefore most clients will use one connection for all messaging. You may  create multiple connections, if needed by your application.

20  How do I use single connection for mutliple messaging?

Call start() method on connection before consuming message.

21  What are MessageListeners?

A MessageListener object acts as an asynchronous event handler for messages. This object implements the MessageListener interface and has one method, onMessage().

The J2EE 1.3 platform introduced message-driven beans (MDBs) that are a special kind of MessageListener. See the J2EE documentation for more information about MDBs.

22  Explain what are Static Queues/Topics?

Configuration information for static queues and topics is stored in configuration  files for the TIBCO Enterprise for JMS server. Static queues and topics are  administered by the server. Clients retrieve the destination using JNDI.

23  Explain what are Dynamic Queues/Topics?

Dynamic queues and topics are created on-the-fly by applications using  QueueSession.createQueue() and TopicSession.createTopic().  Dynamic queues  and topics do not appear in the configuration files, and exist as long as there are  messages or consumers on the destination. A JMS client cannot use JNDI to lookup dynamic queues and topics.

24  What are Destination Bridges?

Bridges allow all messages delivered to one destination to also be delivered to  the bridged destination. You can bridge between different destination types,  between the same destination type, or to more than one destination. Bridges are  not transitive.

25  Explain the persistence of message in Queue/Topic?

TIBCO Enterprise for JMS provides two modes for persisting topic/queue messages in external storage.  
(i) Normal
 - In this mode all the messages are written into file on    disk in asynchrouns mode. There is small probability    that, in case of software or hardware failure, some data may be lost without the possibility of recovery.
(ii) Failsafe
 - In this mode all data for that queue or topic are written    into external storage in synchronous mode, i.e. a write   operation is not complete until the data is   physically    recorded on the external device. The failsafe property    ensures that   no messages are ever lost in case of server failure. Although failsafe mode guarantees no messages are lost, it also significantly affects the performance.

Messages with the persistent delivery mode are always written to persistent storage, except when they are published to a topic that has no durable subscribers.     

26  Explain about the secure property of the Queue/Topic.

The secure property, when set on a destination, specifies permissions should be checked for that destination. When a topic or a queue does not have the secure   property turned on, any authenticated user can perform any actions with that   topic or queue. When the property is turned on, the administrator can assign permissions to the users. The secure property does not mean SSL-level security.  Secure only controls basic authentication and permission verification using   unencrypted, non-secure communication between the clients and the server. Both the authorization configuration parameter and the secure property on the   destination must be set for permissions to be enforced for a particular destination.

27  Explain about the global property of the Queue/Topic.

Messages destined for a topic or queue with the global property set are routed to  the other servers that are participating in routing with this server.

28  Explain import/export property of Queue/Topic.

IMPORT: The import property allows messages published by an  external system  to be received by a TIBCO Enterprise for JMS destination (a topic or a queue),  as long as the  transport to the external system is configured. Currently  you can  configure transports for TIBCO Rendezvous reliable  and certified messaging  protocols.

 EXPORT: The export property allows messages published by a  JMS client to a  topic to be exported to the external  systems with configured transports. Currently  you can  configure transports for TIBCO Rendezvous reliable and  certified  messaging protocols.

You must configure the communication parameters to the external system by  creating a named transport in the transports.conf file.

29  Explain exclusive property of Queues.

In exclusive mode, the first queue consumer receives all of the messages until the consumer fails. At that point, messages are delivered to the next consumer Non-exclusive queues cause messages to be delivered in a round-robin fashion to the set of queue receivers. This prevents a large buildup of messages at one receiver and thereby balances the load of incoming messages across all queue receivers.

30  When is the message delivery paused?

In exclusive mode, If a message cannot be delivered to a queue receiver  (because its pre-fetch limit is reached), TIBCO Enterprise for JMS attempts to  deliver the message to the next queue receiver. If the server attempts to deliver the message to all registered queue receivers and none of them can accept the  new message, the message is returned to the queue and message delivery is  paused until a queue receiver reports that it can accept the message.

31  Explain maxbytes property on Queue/Topic?

The maxbytes property has the following rules of inheritance:

    * If there is not a direct property value for the child, the most liberal (largest) of the parent or ancestor property values is used.
    * The child value, which is directly assigned to the child, overrides any values assigned to ancestors.

32  What is Flow Control?

In some situations, message producers may send messages more rapidly than  message consumers can receive them. The pending messages for a destination  are stored by the server until they can be delivered, and the server can potentially exhaust its storage capacity if the message consumers do not receive  messages quickly enough. To avoid this, TIBCO Enterprise for JMS allows you to  control the flow of messages to a destination. Each destination can specify a target maximum size for storing pending messages. When the target is reached,  TIBCO Enterprise for JMS blocks message producers when new messages are sent. This effectively slows down message producers until the message  consumers can receive the pending messages.

The flow_control parameter in tibjmsd.conf enables and disables flow control  globally for the TIBCO Enterprise for JMS server.

If there are no message consumers for a destination, the server does not enforce  flow control for the destination.

For global topics where messages are routed between servers, flow control can  be specified for a topic on either the server where messages are produced or the   server where messages are received. Flow control is not relevant for queue   messages that are routed to another server.

If the flowControl property is set on the topic on the server receiving the  messages, when the pending message size limit is reached, messages are not  forwarded by way of the route until the topic subscriber receives enough  messages to lower the pending message size below the specified limit.

If the flowControl property is set on the topic on the server sending the  messages, the server may block any topic publishers when sending new  messages if messages cannot be sent quickly enough by way of the route. This  could be due to network latency between the routed servers or it could be because flow control on the other server is preventing new messages from being  sent.  

Flow control can be specified on destinations that are bridged to other destinations. If you wish the flow of messages send by way of the bridge to slow  down when receivers on the bridged-to destination cannot process the messages  quickly enough, you must set the flowControl property on both destinations on  either side of the bridge.

33  Explain about JMS Message Bodies?

A JMS message has one of several types of message bodies, or no message  body at all. Message: This message type has no body. This is useful for simple  event notification.

TextMessage: A java.lang.String. For example, this can be the contents of an  XML file.

MapMessage: A set of name/value pairs. The names are java.lang.String  objects, and the values are Java primitive value types or their wrappers. The  entries can be accessed sequentially by enumeration or directly by name. The  order of entries is undefined.

BytesMessage: A stream of uninterrupted bytes. The bytes are not typed; that is,  they are not assigned to a primitive data type.

StreamMessage: A stream of primitive values in the Java programming  language. Each set of values belongs to a primitive data type, and must be read  sequentially.

ObjectMessage: A serializable object constructed in the Java programming  language.  

34  What are the three levels of Acknowledgements as defined by the JMS specification?

- DUPS_OK_ACKNOWLEDGE, for consumers that are tolerant of duplicate  messages.

- AUTO_ACKNOWLEDGE, in which the session automatically    acknowledges a  client's receipt of a message.

- CLIENT_ACKNOWLEDGE, in which the client acknowledges the message by calling the messag's acknowledge method.

35  Explain the two JMS Message Delivery Mode Extensions provided by TIBCO  EMS?

Reliable Message Delivery:
In addition to PERSISTENT and NON_PERSISTENT modes, you can  use  Tibjms.RELIABLE_DELIVERY mode from TIBCO Enterprise for  JMS. System  message (i.e. ack) is not sent to the client,  hence dose not have to wait. This  allows higher message  volume. It decreases the volume of message traffic, allowing better usage of system resources, and higher message rates. There are two ways to set the delivery mode to reliable:
 - Use a publish() or send() method that accepts a javax.jms.DeliveryMode as a  parameter.
 - Set the delivery mode for the message producer using the following  expression:
messageProducer.setDeliveryMode(         com.tibco.tibjms.Tibjms.RELIABLE_DELIVERY);

 No-Acknowledgement Message Receipt:
 In this mode all the information regarding message that is  sent to client is  eliminated from the server. Hence there  is no need for the client to send the ack.  This mode is  configured at session level.
   javax.jms.TopicSession session =
      topicConnection.createTopicSession(
            false,com.tibco.tibjms.Tibjms.NO_ACKNOWLEDGE);

36  How do you EMS server in Fault Tolerance mode?

JMS servers are configured as primary and backup servers to provide fault  tolerance. The primary and backup servers act as a pair, with the primary server  accepting client connections and performing the work of handling JMS messages, and the secondary server acting as a backup in case of failure. The  primary and backup servers must both have access to a shared state.

37  What is the shared state?

Shared state can be implemented as shared storage devices or through other  mechanisms such as replication. This shared state allows the backup server to take over any active connections and properly handle persistent messages.

Some common ways to implement shared storage are Network Attached Storage  (NAS) or Storage Area Network (SAN) devices. Replication schemes from  popular vendors such as Veritas or EMC can also be used for replicating the  shared state.

To prevent the backup server from assuming the role of the primary server  unnecessarily, the primary server locks the shared state during normal operation.  If the primary server fails, the lock is released, and the backup server can obtain a lock on the shared state.

 # If a queue or a topic is defined as failsafe in the  corresponding configuration  file, messages for that topic  or queue are stored in the sync-msgs.db file.

 # If the queue or topic is not defined as failsafe,  messages for the queue or topic are stored in async-msgs.db  file. 

38  What does the shared state include?

The state of the servers includes:
    * persisted messages for queues and topics
    * information on the primary server’s client connections
    * metadata regarding data delivery

39  How to set the FT JMS Server?

A backup fault-tolerant server is specified by having the following configuration  parameters set:
    * the server parameter must be set to the same name as the primary server
    * the ft_active parameter must be set to the URL of the primary server

When the backup server starts, it attempts to connect to the primary server. If the  connection can be established, the backup server enters standby mode for the  primary. If the connection cannot be established, the backup server becomes the  primary server.

40  What is Routing in EMS?

TIBCO Enterprise for JMS provides the ability for servers to route messages  between each other. Topic messages can be routed across multiple hops. Queue  messages can travel at most one hop to any other server from the server that  owns the queue.

Areas to concentrate :

1)TIBCO messaging with smart sockets chapter can be omitted.
2)Bridging chapter had many complicated questions
3)Routing chapter is also important - better if one works on creating routes between two servers and sends messages over queue and topic to understand the exact behaviour.
4)Message listener - important - remember all the criteria to be met for its
implementation and its behaviour when it makes asynchronous calls .The thread
behaviour and what all can be done in the thread when it is till processing a
message.
5)Best way to send a XML message over EMS - make it text message and compress it.
6)What happens when FT is in active-active configuration - behaviour and what can one see when show routes command is executed and are message transfers bidirectional .- in queue/ in topic
7)SSL chapter - only configuration questions - what to set where to get a particular configuration.
8)JNDI look up - what happens when factory is dynamically created and when looked up.

Important figures to remember :
MS API programming model


 Rendezvous Transports in the EMS Server
Object lookup in TIBCO Enterprise Message Service server



41  Appendix A – Certification Questions

41.1For storing persistent messages, which files are used by TIBCO EMS?

a)      failsafe-msgs.db
b)      sync-msgs.db
c)      async-msgs.db
d)      meta.db
Answer : B,C

41.2 To install settings from response file, which three  TIBCO EMS installer modes can be used? (Choose three)

a)      sysprep
b)      rpm
c)      silent
d)      GUI
e)      Console

Answer : C,D,E

41.3 Authorisation and flow_control properties can be set by boolean values

a)0/1
b)true/false
c)enabled/disabled
d)yes/no

Answer : C

41.4 which is a valid value for the field usr_auth :

a)true
b)local
c)enabled
d)SSL

Answer :B

41.5what is the exception that is thrown when a transaction is rolled back :

a)IllegalTransaction
b)IllegaltransctionRolledback
c)TransactionRolledBack
b)IllegalCall
                                    

41.6For the TIBCO EMS message what are the types of acknowledges that can be expected by the client which calls acknowledge()  - (Choose3)

a)NO_ACKNOWLEDGE
b)CLIENTACK
c)AUTO
d)EXPLICITCLIENT
e)DUPS_OK_ACKNOWLEDGE

41.7When message exported to TIBCO rendezvous, what are the valid JMS messages that can be expected.

a)bytemessgae
b)arraymessage
c)mapmessage
d)textmessage

41.8EMS server 1, EMS server 2 and EMS server 3 are in Fault tolerant modes and EMS server 3 and EMS server 4 are load balanced, what’s the configuration url :

a) tcp://EMS server1:7222,tcp://EMS server2:7223,tcp://EMS server3:7222| tcp://EMS server4:7223
b) tcp://EMS server1:7222,tcp://EMS server2:7223,tcp://EMS server3:7222,tcp://EMS server4:7223
c) tcp://EMS server1:7222|tcp://EMS server2:7223|tcp://EMS server3:7222,tcp://EMS server4:7223

Answer : A

41.9When a command show groups is executed and in the output a few of the groups have a (*) asterix in front of them - what are the reasons - select the best answer

a)groups are not in the main config file
b)groups are defined in external directory service
c)groups are dynamic
d)groups are system groups

Answer : B

41.10                Sample Configuration files for each activity in EMS server:

a)in the location specified  can be found at main conf file for each file
b)in samples/config
c)under /bin

Answer : A

41.11                TIBCO EMS server has authorization enabled. The queues Q1.Cerkiller.BAR, Q1.Cerkiller, and with secure property enabled, QUEUE.SAMPLE have been created. User ADMIN1 has also been created. To give user ADMIN1 view privileges on these queues expect for QUEUE.SAMPLE, name the admin command which has to be executed.

a)grant queue Q1.>ADMIN1 view
b)alter queue Q1.* allow ADMIN1 view
c)grant queue Q1.* ADMIN1 view
d)grant ADMIN1 view Q1.>
Answer : A

41.12                Choose from the list valid JMS headers :  (choose 3)

a)JMSTimestamp
b)JMSExpiration
c)JMSRedeliverd
d)JMStimeout
e)JMSContentLength
f)JMSContentType

Answer : A, B, C

41.13                TIBCO EMS server needs to be configured with Authorization=enabled. Select the best way to do this

a)Execute command set server authorization=enabled and restart the server
b)Change the authorization parameter in main tibemsd.conf file and restart the
server.
c)Call admin API to change the value and no need to restart the server

Answer : B

41.14                Fault Tolerant server configuration has A and B as two EMS servers. When and what does B has to do for failover .Select the best answer.

a)B becomes primary server only when it gets access to shared states
b)After timeout B deletes the shared state entry by server A and becomes primary
server
c)B becomes primary server until A is restored

41.15                To integrate with third party app servers : EMS must be :

a)JTA compliant
b)call adapter classes in jar files
c) <MDB which is usually the answer was not the choice provided>

41.16                q1.foo.bar,q1.foo.car and q1.sample are topics on the EMS server, the project

41.16requires to subscribe to topics q.foo.bar and q1.foo.car but not q1.sample, How can it be done


41.17                How is message compression done, what are the header fields set, what role does client play , what role does server play, side effects, advantages - all this in a

41.17scenario and had to pick the right configuration.

41.18                What are the objects that have to be created before a client can publish messages on a topic

41.19                Valid comands in admin tool :pick four - 6 commands where displayed which were very confusing

41.20                msgpoolblocksize

 - where is it found and its significance, when best used.

41.21                Conditions when a message are redelivered.

 - were confusing with relevant configurations that were to be set

41.22                Which method has to be called to create a queue

Answer : session.createqueue()

41.23                What is significance of metric parameter in connection factory URL

41.24                Questions on MessageListener?If there are 2 consumers C1 and C2, What are the valid statements below?(Choose 2)

a) C1.setMessageListener(L1);C1.receive();
b) C1.setMessageListener(L1);C2.receive();
c) C1.setMessageListener(null);C1.receive();
d) C1.receive();C1.setMessageListener(L1);
e) C1.close();C1.receive();

Answer: B, C, D

41.25                Which object can call convertToString() function?

a) Consumer.
b) Session.
c) Connection.
d) ObjectMessage.
e)TextMessage.(answer)

41.26                Which objects does a JNDI hold?

a) Destination
b) Session
c) Connection factories
d) URL

Answers : A, C

41.27                One has a EMS server running smoothly, you have a producer Q1, when Q1 is killed and a new producer is included which produces messages faster than the consumer can handle.

41.28                What can be done to improve performance.

a. Create multiple consumers on same queue.(load balancing)
b. Set flow control prop.

Answer  (a)

41.29                If a durable subscriber is listening on topic.*, it is killed and is recreated but now its listening on topic.cert.* What are the valid statements?

a) The subscribers only listens to only topic.cert.* and receives all the messages which were published after the restart.
b) The subscribers only listens to only topic.cert.* and receives all the messages.
c) The subscribers only listens topic.*.

41.30                When using reliable delivery? .Which of the following is true?

a)Reliable delivery is a specification of JMS.
b) Server performance is decreased.
c) Client performance is decreased.
d) Consumer will receive message until the connection is broken.

41.31                What are the valid values that can be given to JMS header JMSPriority ?

a)      High/Low
b)      0 to 9
c)      True/false
d)      Only 1 to 4

Answer: B

41.32                Question regarding threads: Pick two

a) Session are multithreaded.
b) Connections are multithreaded.
c) Session are single threaded.
d) Connections are single threaded.
Answers : B, C

41.33                What are the valid JMS Headers in the given options?

41.34                What are the valid JMS Properties in the given options?

41.35                Questions on exclusive queues?

41.36                Question on message selectors and Bridges?

41.37                Question on Bridges and Transactions?

41.38                When local-transactions are used, how does bridges work? Either all or none are send

41.39                Question on Routes, this was regarding Propagating Registered Interest?

41.40                How does EMS interface with 3rd party app-servers?One of the option was:

a)TIBCO Enterprise Message Service also implements all interfaces necessary for Java Transaction API  (JTA) compliance.
b) Include Adapter class files

Answer : A

41.41                What does store_truncate property in tibemsd do?

41.42                What are the valid properties for fault tolerance given in tibemsd.conf?

Choose 2 from 5 options

41.43                Question on .NET API's and MessageListener?

41.44                Question on behavior of temporary queues?

41.45                Question on different types of message bodies?

41.46                Question on different types of acknowledgements?

41.47                Question on acknowledge  available only for topics?

Answer :NO_ACKNOWLEDGE_MODE

41.48                Question on Destination property regarding the trace property?


41.49                 If group1 has receive permissions on topic1, and group2 has publish permissions on topic1.If user1 is a member of both group1 and group2, How can you revoke the publish permissions on topic1 given to user1 without disturbing other users.

Answer : This cant be done.

41.50                When exclusive property is set on topic, which statement is true?

Answer :Exclusive property cannot be set on topic.   

41.51                Which command is used to alter the prop of destination?

a)addprop
b)setprop
c)AlterProp
d)set
Answer : A

41.52                What is stored in shared state of FT-Servers?

41.53                Question of JMS_TIBCO_PRESERVE_UNDELIVERED property?

41.54                Question on MESSAGE Compression and the advantages?

41.55                Where are transport configurations stored for connecting to external systems?

a)      tibemsd.conf
b)      factories.conf
c)      transports.conf
d)      users.conf
Answer: transports.conf




Tuesday, March 1, 2011

FAQ on TIBCO



 Q)How do wait-notify resources work ?
Basically wait and notify should share a common notification configuration whichis just a schema definition for data that will be passed from notifier to waiter.
Specific instances of waiter & notifier are corrrelated via a key.
For example: when one process is in wait state for key 'Order-1', it waits tillanother process issues a notification with the same key value

Q)What is the default Axis in XPath ?
Child axis- What this means is that when you select "BOOK" from the current context, it selects a child node with that name, not a sibling with that name.
Otheraxes are parent , self , sibling etc.


Q)What are the output formats for XSLT?
XML,HTML,Text

Q)What does ' Success if no matching condition' transition mean ?
Lets say between two nodes N1 and N2, there are 3 success transitions with condition and there is no success transition without condition. If none of the conditions match then a 'Success if no matching condition' transition can be used. Also if there is a success transition and also success transitions with condition and if the condition matches then both the sucess transition (no condition) as well as the transition(s) with matching conditions are followed. So you can use 'Success if no matching condition' to prevent duplicate paths of execution.

Q)What is the Purpose of $_error variable ?
$_error variable is available in the node following the error transition. It captures the error message, error code etc.

Q)What are the cases where business process cant proceed correctly subsequent to restart from a checkpoint ?
Sending HTTP response, confirming an email/jms message etc. This is because theconfirmation or sending HTTP response has to done in the same session. When engine crashes these sessions are closed at their socket level. In such cases send response/confirm before checkpoint.

Q)Which group do you use to wait for multiple events and proceed with the first tooccur ?
A 'Pick First Group'.

Q)When is a 'Generate Error' activity useful?
When you handle an error inside a called subprocess or group and want to rethrowthe error to the caller(happens by default if you dont handle the error in thecalled process)

Q)Which activity is used for detecting duplicate message processing?
CheckPoint activity - Specify the uniqueID for the duplicate key field and engine maintains list of these key fields. When a process come to checkpoint activitywith the same value for duplicate key which already exists, it throws a DuplicateException. An error transition can then handle this case.
 Give an example where graceful migration of service from one machine to anotheris not possible.HTTP Receiver. In this case the receiver on new machine starts listening on thesame port, but you need to redirect requests from the old machine to the new one.

Q)What are the types of adapter services ?
Types of adapter services are :
Subscriber Service
Publisher Service
Request-Response Service
Request-Response Invocation Service

Q)If the business process needs to invoke another web service which resource do you use ?
SOAP request reply activity. If the business process needs to be exposed as SOAPservice use SOAP Event Source in conjunction with SOAP Send Reply or SOAP SendFault.

Q)What is the functionality of the Retrieve Resources resource?
It can be used to serve the wsdl file of a SOAP Event Source to a (http) client.Construct a process like: HTTP Receiver -> Retrieve Resources -> Send HTTP Response
Now the WSDL file for a SOAP service can be retreived using the http request

http://<host>:<port>/<path>/<resourceName>?wsdl

where 'path' is the folder path to the SOAP Event Source process and 'resourceName' is the name of the process

Example : http://purch:8877/Purchasing/GetPurchaseOrder?wsdl


Q)What is the scope of user defined process variables ?
The scope of user defined process variables is only the process in which it is defined.(Not even inside a sub process that is invoked from this process)

Tibco bw



TIBCO BW -FAQS

1) What is the use of service container?
Ans) In the latest version of TIBCO Active Matrix Business Works a new feature called Service container is added. In this service container we can add number of EAR files and run all the services simultaneously. With the Service container feature we can add and upgrade processes without bringing down other running processes.

2) In how any ways can we create EAR files.
Ans) We can build EAR files in 2 ways. One method is using the Enterprise Archive pallete in the Tibco designer and adding the process archive we can build EAR file.
Other method is from the cmd prompt. We use the command appmanage and buildear.

3) What is Schema and why do we create schema.
Ans) Schema is used to create a XML schema file in which we add the variables which we want to use in our designer process. We can create the elements under which we can add the typed variables. The structure formed will be in the form of tree structure.

4) What is the use of confirm activity.
Ans) Confirm activity is used to confirm the success of a activity that have confirmable messages. For example if certain process starts on reception of a message then if that process starts the confirm activity sends a confirm message to the sender of the message.

5) What are the different modes of tibco BW installation.
Ans) There are 3 modes installation . They are a) GUI b) console c) silent

6) When we save a project what files are created under the saved project folder.
Ans) In that folder we see the Aeschema folder, all processes create in that project and the vcrepo.dat file.

7) What are the contents of vcrepo.dat
Ans) This files contains the display name , RV encodings and description.

8) What is grouping activity?
Ans) Grouping activity is used to group certain activities used in the designer so that we can loop those activities and iterate the group with conditions.

9) What is the condition for a process in order to build the EAR file.
Ans) We need to have a process starter.

10) How can we design exception handling?
Ans) The basic method is by routing the process to another sub process whenever error occurs by using the error transition.

11) What is the use of Render XML pallet.
Ans) It is used to create a XML file by creating the tags used in the xml file.
12) What are the elements in the WSDL file.
Ans) In abstract WSDl file we have the information about the messages ( request, reply) port type, operation. In concrete in addition to above we have the transport information.

13) What is the use of global variables?
Ans) Global variables are useful in order to provide dynamic input at the run time.

14) What is custom activity?
Ans) Custom activity is useful when we want others to use our process and not allow them to view the contents of the process. We can add this process into our MY Pallete section. We can directly use this process by dragging it into our process.

15) In web service in how many ways can we create connections.
Ans) 2 ways. HTTP and JMS.

16) How does the file poller activity works.
Ans) This is a starter activity which starts the process whenever there is update for the file that is specified.

17) What is the use of project template?
Ans) In project template we can save our standard processes that we want to use in future. These processes are generally the ones which have the commonly used activities.

18) What is the optimum maximum number of connections in JDBC?
Ans) 10

19) What is sub process and what is its use?
Ans) Whenever we call a process from another process , the called processbecomes the subprocess. Sub process helps in reducing the complexity of the design by assigning the activity in other process.

20) What is TRA.
Ans) Tibco Runtime Agent is the main frame work for all the tibco softwares. It provides the runtime agent and monitoring agent. All the libraries required by the designs are provided by TRA.

21) What are the process variables that are available to all activities as inputs.
Ans) global variables and process context.

22) What are break points?
Ans) Break points are used to check the inputs and outputs of each activity during testing the design so that we can debug our design. We can place the check points for all activities on input and output side.

23) What re the encoding techniques in WSDL?
Ans ) Encoded and literal.
24) What are the conditions in transitions?
Ans) Success, Success with condition, Success with no condition and error.

25) What are the different variables in BW?
Ans) Global variables, Shared variables, process variables and job shared variables.
26. Explain the processes flow of your latest project by including activities.
ans: for various service implementation I designed processes using various BW activities like JMS Queue Receiver, XML Parser
27. What are the differences between the versions 2.x and 5.2?
ans:
type 2.x 5.2
deployment In 2.x deployment is done in the designer Here deployment is done using administrator tool
Name spaces Name spaces are prefixed with tib No tib in name spaces
pallets Extra pallets added
Iterate-reset At the end of each iterate the output is not reset Here the output is reset after each iteration
installation Here all the components like BW,ADB,FILE etc come as a package Here we will have to install each component separately
File type All files are .dat. we have to convert these manually Multi format file are available so that we do not have to convert the dat files

28. What are the activities you worked on?
Ans: JMS queue receiver,confirm,checkpoint,XML parser,call process,JDBC update,SOAP,HTTP.
write to log - widely used.
Assign.

29. What is the inspector activity does?
Ans: the inspector activity is used to obtain the output of any activity or all the activities and process variables.
Scenario: You can use the inspector activity to write the output of any activity or process variable in the current process. Activities and process variables in a subprocess are not available to the Inspector activity (but the output of a Call Process activity can be written using the Inspector activity). If you wish to obtain the output from one or more activities or process variables in a subprocess, place the Inspector activity in the process definition of the subprocess.

30.Can you tell me at least four starter activities and when they get executed?
Ans:
1) Adapter subscriber, adap request response server :-When ever a message comes into a destination queue or network, listerns to a request from a adapter and sends a respose back to that adapter
2) File poller :- polls for any changes that occur in the file and with any change grabs the whole file.
3) Timer:- receive notification Starts a process on the time specified ex: before JDBC QUERY, starts a process on receiving of data from a notify activity.
4) http receiver :-Starts a process based on a request from http server.
5) Jms queue receiver, jms topic subscriber :- Starts a process when ever a new message comes into the specified queue, starts a process when ever there is a new message in the specified topic.
6) Receive mail :- The Receive Mail process starter polls a POP3 mail server for new mail. When new mail is detected and retrieved, the Receive Mail process starter starts a new process for the process definition it resides in and passes the mail data to the next activity in the process flow.
7) Rv subscriber:- The Rendezvous Subscriber process starter creates a process when a TIBCO Rendezvous message on the given subject is received.
Cool Rmi server :- The RMI Server process starter registers the specified remote object name with the specified registry server and then creates process instances to handle incoming requests for the object. The process definition acts as the implementation of the specified object.
9) Soap event source :- The SOAP Event Source process starter creates a process instance for incoming SOAP requests. SOAP is a standard protocol for invoking web services. This allows you to create a web service using process definitions.
At runtime, a client can retrieve the WSDL file for a process containing this process starter using an HTTP request. Once the WSDL is retrieved, the client can perform a SOAP request to invoke the web service.
10)Tcp receiver The TCP Receiver process starter starts a new process when a client requests a TCP connection.

31. What is the purpose of JMS Queue receiver activity and Queue sender activity?
Ans: Starts a process when ever a new message comes into the specified queue.
A queue sender activity sends messages into the specified queue.

32. What are acknowledgement modes and where do you set them and what is the applicability of each mode?
Ans:
The acknowledge mode for incoming messages. Can be one of the following:
• Auto — the message is automatically acknowledged when it is received.
• Client — the message will be acknowledged at a later point by using the Confirm activity. If the message is not confirmed before the process instance ends, the message is redelivered and a new process instance is created to handle the new incoming message. Ensure that your process definition confirms the message when using this acknowledge mode.
• TIBCO EMS Explicit Client Acknowledge — this mode behaves exactly the same as the Client mode, except the session is not blocked and one session can handle all incoming messages.
• Dups OK — the message is acknowledged automatically when it is received. JMS provides this mode for lazy acknowledgement, but TIBCO BusinessWorks acknowledges messages upon receipt.
• Transactional — this mode is used when a transaction that can process JMS messages is included in the process definition. The message is acknowledged when the transaction commits. See TIBCO BusinessWorks Process Design Guide for more information about creating transactions that JMS activities can participate in.

33. What is a check point activity and confirm activity?
Ans: A checkpoint saves the current process data and state so that it can be recovered at a later time in the event of a failure. If a process engine fails, all process instances can be recovered and resume execution at the location of their last checkpoint in the process definition.

The Confirm activity confirms any confirmable messages received by the process instance. For example, if a process is started because of the receipt of an RVCM message, the Confirm activity can send a confirmation message to the publisher of the RVCM message

34. What happens if you use check point activity first and confirm next?
ans:
In the case of confirmable messages , you must consider the consequences of performing a checkpoint before or after a Confirm activity.
If the checkpoint is taken before the Confirm activity, then a crash occurs after a checkpoint but before a confirm, the original message is resent. In this case, the restarted process can no longer send the confirmation. However, a new process is started to handle the resent message, and you can implement your process to handle the restarted and new processes appropriately.
If the checkpoint is taken after a Confirm activity, there is potential for a crash to occur after the Confirm but before the checkpoint. In this case, the message is confirmed and therefore not redelivered. The process instance is not restarted, because the crash occurred before the checkpoint.
You must consider the type of processing your process definition performs to determine when a checkpoint is appropriate if your process definition receives confirmable messages.

35. What is the potential problem with JMS Queue requestor?
Ans:
When we specify a reply to queue there is a chance of other processes sending messages to the same queue and the jms queue requestor interpreting that as the actual response and sending this wrong message to the client.

36. What is the other JMS activity you would use to address the problem?
Ans:
Get jms queue message. This incorporates a message ID to identify the true message.

37. What are the activities you used to publish the messages from BW process to network on RV?
Ans: publish rv message activity (along with the shared resource – rv transport).

38. What is the transition in BW?
Ans: to move the data from one activity to another or when conditions exist on the data.

39. What are the different kinds of condition types you can have in transition? Explain Them
Ans:
a)Success :- Take this transition unconditionally. That is, always transition to the activity the transition points to, if the activity completes successfully.
This is the default condition for transitions.
b)Success with condition :- Specify a custom condition using XPath. If the activity completes successfully, and the condition you create evaluates to true, the transition is taken to the activity it points to.
You can type in an XPath condition, and you can use the XPath formula builder to drag and drop XPath expressions and data into the condition. See Chapter 9, XPath for more information about specifying XPath conditions and using the XPath formula builder.
c)Success if no matching condition :- Take this transition when the activity completes successfully, but only if no other transitions are taken. This is useful when multiple transitions with conditions are drawn to other activities. This condition type can be used to handle any cases not handled by the conditions on the other transitions.
d)Error :- Take this transition if there is an error during processing of the activity.

40. What is Generate Error activity? What the applications of it ?
Ans:This activity generates an error and causes an immediate transition to any error transitions. If there are no error transitions, the process instance halts execution. This activity is useful in a group or in a called process. If you would like to catch and raise your own error conditions, you can use this activity to do so.

41. What are the shared variables and process variables?
Ans:
Process variables: Process variables are data structures available to the activities in the process. You can define your own process variables and assign values to them in your process definition. Process variables are defined on the Process Variables tab of the Process Definition resource. And assigning values to these kind of variables is done using the assign activity.
Shared variables: A Shared Variable resource allows you to share data across process instances. All process instances can read and update the data stored in a shared variable. This type of shared variable is useful if you wish to pass data across process instances or if you wish to make a common set of information available to all process instances.

42. What is XPATH?
Ans: isa XML based path language used to navigate the XML document and manipulate the data

43. What is XSD?
Ans: XML schema definition.

44. What is name space in XSD?
Ans: A name conflict will occur when two different documents use the same element names. So each element is given a unique namespace.

45 what is aweb-service?
Ans: application or a network responding to some remote web-request.

46what isw a wsdl?what are different types of wsdl?
Ans:Web-services run on wsdl,it defines structure of schema.There are two types of wsdl
Abstract wsdl:-Used on server side,contains request,response and type of operation performed.
concrete wsdl:-used on client side,contains abstract wsdl and transport used.


47. What are the modes of installation of tibco bw applns?
a. GUI mode
b. Console
c. Silent mode
48. What is the thread count in tibco administrator?
a. 8-32 threads for BW engines
b. For http connections-10/75
c. JMS-it’s a single thread model
49. What is Max jobs, Flow limit, and Activation limit?
a. Max jobs: Max jobs specify the number of process instances that are kept in memory while executing.
b. Flow Limit: it is the max number of jobs that can be spawned before the process starter is suspended.
c. Activation Limit: Specifies that once a process instance is loaded and it must be placed in memory till it completes execution.
50. What are tibco best practices-users?
a. User ”tibco” should be master of all applications.
b. User “tibcou” should have read only access to tibco applications and have read write access to logs owned by developer groups.
51. In how many ways can you deploy EAR file?
a. Using tibco administrator GUI
b. Use Appmanage utility to deploy EAR file into targeted domains
52. Whether to use check point/confirm activity first?
a. BW doc/general palette/checkpoint/confirm
53. What information can be found in the appmanage.batch file?
a. Component paths, service instance paths that is required to run AppManage utility
54. What is difference between EMS and RV?
a. Ems is centralized where as RV is bus based
55. What are the 2 message transport types?
a. Ems has 2 message transport types
i. Point-to-point: queues
ii. Pub-sub : topics
56. What is the diff between tibco adapter and BW component?
a. Adapters are connectors that use a messaging channel that can be configured over source/target systems which can be used in Pub,Sub or Replyrequest mode. BW components are designer, administrator, bw engine.
57. Why are routes used?
a. When we have to send messages from one server to another.
58. What parameters would be used to control storage in EMS?
a. Flow control property
59. What are the diff types of messaging services in RV?
a. RV
b. RVCM
c. RVCMQ
d. RVRD
60. Which transport is used between hawk agent and hawk microagent?
a. Rv
61. What re the three transport types available when configuring a tibco component?
a. HTTp, RV,local
62. What is the standard file extension of deployment files?
a. EAR
63. How many ways are there to move files between 2 secured UNIX servers
a. Sftp /https
64. What information can be found in the tibco bw tra files?
a. Service instance machine names, fault-tolerant settings, java heap sizes, jmv lib paths , repository URL
65. Can you give one example for sync and async operation?
a. Sync-request-reply and req-reply invocation services
b. Async-publication and subscription services
66. What are the different types of queues?
a. Static-created by the user
b. Dynamic- created by the sender/receiver application at run time.
c. Temporary- created by receiver to submit the response to EMS server/Sender to get the messages.
67. What are the various types of application property types in EMS?
a. Boolean, byte, short, char, int, long, float, double, string.
68. What are event queues?
a. An event queue contains received but undelivered messages, periodic timers, and state change callbacks etc.
69. What are the wire formats supported by file adapter?
a. AE,XML,RV
70. What is job shared variable and shared variable?
a. Job shared variable- is used to share the value of the variable between the main process and the sub process.
b. Shared variable- is used to share the value of the variable between two processes
71. What is the difference between jdbc and adb
a. Jdbc is a collection of activities that can be used for custom operations
b. ADB is an adapter which is used to capture the events and take action, this has pub and sub mechanisms, pub is used to capture the events and publish the messages and sub will be used to upsert the operations.
72. How is reduce the load on ems server?
a. Using maxbytes, flow limit, prefetch mechanisms
73. What is a tibco domain?
a. It’s a collection of software and hardware components that are used for business process integration.
74. What is tibco hawk agent?
a. It’s a independent process that monitors the status of the applications.
75. What are the resources that get included in the EAR file, created by the TIBCO designer?
a. EAR file contain
i. Local project resources
ii. Library builder resources
iii. Alias library resource files
iv. Files referred in classpath of designer
v. All the files under the designer installation directory.
76. What is tcp and udp
a. Tcp is used for client request. Udp is used for service call.
77. What is the difference between RVD and RVRD
a. RVD is used to route with in a subnet
b. RVRD is used to route through different subnet.
78. What are message selectors?
a. Message selectors are used to filter messages based on expression syntax. This reduces the processing overhead from the application.
79. What is a Home Queue and what is a Routed Queue in EMS routes?
a. Home Queue: The global queue sitting in the EMS server, where Route is being created.
b. Routed Queue: the global queue sitting in the EMS server where the queue name is referring to route.
80. What is the EMS maximum message size?
a. The maximum message size is 512 MB.
81. What are the delivery modes supported by EMS server?
a. EMS supports 2 delivery modes
i. Persistent
ii. Non-persistent
iii. Reliable.
82. What are the message types supported by EMS?
a. Text
b. XML
c. Bytes
d. Stream
e. Simple
f. Object
g. ObjectRef
h. Map
83. What are the wildcard characters supported by EMS?
a. * - means that any token can be in place of *.
b. > - matches any destination name i.e., it matches one or more trailing elements.
You can subscribe to wildcard topics but can’t publish.
You can neither send nor receive from wildcard queue names
84. What is the default storage limit for destinations?
a. Setting the flowControl property on a destination but specifying no value causes the server to use a default value of 256KB.
85. What is the syntax to create bridges?
a. Create bridge bridge_name source=destination_type:name target=destination_type:name
86. How do avoid/stop creation of dynamic queues/topics?
a. By deleting the parent queue “>”
87. Explain what do you understand by TRA?
a. TIBCO Runtime Agent is a bundle of tibco software and third-party software that is needed to run many TIBCO applications such as TIBCO Business works and Adapters
88. What are the components installed when you install TRA?
a. TIBCO designer
b. Java Runtime Environment
c. TIBCO Hawk Agent
d. TIBCO Rendezvous
e. TIBCO Domain Utility
f. TIBCO Wrapper etc.
89. Explain TIBCO Hawk Agent?
a. It is an autonomous process that resides on each computer on which TRA is installed. Hawk Agent uses a set of rules called rulebases to configure system management, status and automation tasks.
90. What is the use of TIBCO Wrapper utility
a. It allows deployment of a TIBCO product or TIBCO Adapter SDK based custom adapter as a service.
91. How is load balancing done in Randezvous?
a. Using distributed queues
92. What protocol does RV uses to communicate with in a subnet and outside the subnet?
a. UDP within a subnet
b. TCP outside subnet.
93. What is the difference between technical and functional adapters?
a. A
b. F
94. What is the use of secured queues and topics?
a. Setting ‘secure’ property to queues/topics can restrict unauthorized users from publishing/sending and subscribing/receiving the messages.
95. What is Publish by value and Publish by reference?
a. In Publish by Value, all the specified columns in the source table are copied into the Publishing table.
b. In Publish by reference, only the specified key column values are copied to the publishing table.
96. What are the services available in Adapter?
a. Publication service
b. Subscription service
c. Request-response service