Monday, August 19, 2013

Scripted Deployment in TIBCO BW

Scripted Deployment in TIBCO BW



  • Create an archive file in designer but don’t build EAR file. EAR file should build from command prompt.

  • Go to the following location in Command prompt

C:\TIBCO_BW\tra\5.6\bin>                  



  •     To build Ear file from the project

buildear -s -ear /Scriptdeploy.archive -o E:\scriptedDep.ear -p E:\scripteddeploymentdocument\scriptdeploy





  • Now we have to build Deployment Configuration file from EAR file.

AppManage -export -ear E:\scriptedDep.ear -out E:\scripteddeploymentdocument\scriptedDep.xml












  •    Add the following into formation in confirmation file (.xml)

  <bindings>
                <binding name="ScriptedDeployment">
                    <machine>Home-PC</machine>
                    <product>
                        <type>bwengine</type>
                        <version>5.8</version>
                        <location>C:\tibco\bw\5.8</location>
                    </product>
                    <description></description>
                    <contact></contact>
                    <shutdown>
                        <checkpoint>false</checkpoint>
                        <timeout>0</timeout>
                    </shutdown>
                </binding>
            </bindings>






  •     Now deploy the Application in to a domain

AppManage -deploy -ear E:\scriptedDep.ear -deployconfig E:\scripteddeploymentdocument\scriptedDep.xml -app ScriptedDep -domain mindmajix -user mindmajix -pw mindmajix




In Admin




  •    For undeploying an application

AppManage -undeploy -app scriptdept -user mindmajix -pw mindmajix -domain mindmajix

  •              To Deploy the application in  Fault Tolerance

             <isFt>true</isFt>

Change the value if "isFt" to true. By default it will be false
and add one more binding in the bindings and <ftWeight>100</ftWeight> in each binding with different binding names

If ftWeight value is different in two bindings (500 and 200)it will be in primary and secondary mode if both values are equal then it will be in peer to peer.





  • Now You undeploy the Application and deploy aging

Undeploy the Application

AppManage -undeploy -app ScriptedDep-user mindmajix -pw mindmajix -domain mindmajix




  • Deploy the Application

AppManage -deploy -ear E:\scriptedDep.ear -deployconfig E:\scripteddeploymentdocument\scriptedDep.xml -app ScriptedDep43 -domain mindmajix -user mindmajix -pw mindmajix




  •  To extract ear and configuration file from a application

Appmanage -export -out E:\Z\scriptedDep.xml -genEar -ear E:\Z\A.ear -app ScriptedDep  -domain mindmajix -user mindmajix -pw mindmajix



  •   To get all the possible tag in configuration (.xml) file from ear

AppManage -export -ear E:\scriptedDep.ear -out E:\scripteddeploymentdocument\scriptedDep1.xml –max





Thursday, August 8, 2013

TIBCO EMS Bridges and Routes

                                         TIBCO EMS Bridges and Routes

Brief Introduction

TIBCO Enterprise for JMS allows sending messages across applications. Java Message Service is a Java framework specification for messaging between applications. Using a message service allows you to integrate the existing as well as the new   publications within an enterprise.

JMS follows the two messaging paradigms namely Publish/Subscribe and Point to Point

Point-to-point messaging has one producer sending message to the destination and one consumer subscribing per message. Queue follows such kind of point to point messaging to store messages until they are received. The producer sends the message to the queue and the message consumer retrieves the messages from the queue and sends acknowledgement that the message was received. We can have more than one producer and consumer sending and receiving different messages on the same queue.

In a publish and subscribe messaging model the producer i.e. the publisher publishes(sends) the message to the destination and the same message  can be subscribed (retrieved)by multiple subscribers unlike a queue where only one subscriber can subscribe per message. Topic follows such kind of publish/subscribe messaging.
This type of messaging can also be called as “broadcast messaging” because messages are sent over the network and it is received by all subscribers who are active when the message is published.

One of the interesting features in JMS is that we can copy messages from one destination where they are being published to yet another destination where there is a newly defined interest in consuming that message. This can be achieved by the ability of bridges and routes.

2.  Bridges

First, let us understand the concept of Bridge and then let us navigate towards routes.

Bridges can be created between one destination and one or more other destinations
of the same or of different types i.e. you can create a bridge from a topic to a
queue or from a queue to a topic. You can also create a bridge between one
destination and multiple destinations. For example, you can create a bridge from
topic A to queue B and topic C.

In the figure below, we can see a bridge being created between a topic “TopicA” and a queue “QueueB”. The messages published on TopicA will flow to the queue QueueQ with the same JMS server.



1. Bridges can be configured between one or more destinations within the same JMS server.

2. Bridges can be between topic to queue, topic to topic etc.

3. Bridges are non-transitive i.e. bridge from For example, topic A  has a bridge to queue B .Queue B has a bridge to topic C. Messages delivered to topic A  are also delivered to queue B, but not to topic C.

4. A message published on one destination is available on other destinations also so that many receivers can get the same message.

5. It is a pure Java client.

6. When a message producer sends a message within a transaction, all messages sent across a bridge are part of the transaction. Therefore, if the transaction succeeds, all messages are delivered to all bridged destinations. If the transaction fails, no consumers for bridged destinations receive the messages.

If a message cannot be delivered to a bridged destination because the message consumer does not have the correct permissions for the bridged destination, the transaction cannot complete, and therefore fails and is rolled back.

7. By default, all the messages are sent to the destination with a bridge are sent to all bridged destinations.  The selectors can be used to filter the messages. Selectors are filters at the server side. The subscribing application only gets the messages it needs. This helps in preserving bandwidth. Before sending the messages the selector is checked. The subscriber specifies the selector.

8. Publisher on the source destination should have the permissions to publish on target destination.

9. Bridges are configured manually and the JMS server has to be restarted.

10. Bridges can also exist between Tibco based JMS destination and Vitria based channels.

11. The server needs to be restarted only for the bridge configuration within JMS server and not between Tibco based JMS destination and Vitria based channels.

12. Bridges are configured in the bridges.conf configuration file. You specify a
bridge using the following syntax:

[<destinationType>:<destinationName>]
<destinationType>=<destinationToBridgeTo> selector="<messageSelector>"
where <destinationType> is the type of the destination (either topic or queue),
<destinationName> is the name of the destination from which you wish to create a
bridge, <destinationToBridgeTo> is the name of the destination you wish to create a
bridge to, and selector="<messsgeSelector>" is an optional message selector to
specify the subset of messages the destination should receive.
Each <destinationName> can specify wildcards, and therefore any destination
matching the pattern will have the specified bridge. Each <destinationName> can
specify more than one <destinationToBridgeTo>.

For example, the bridge illustrated in Figure above would be specified as
the following in bridges.conf:

[topic:TopicA]
queue=QueueB

3. Routes

The route is similar to that of bridges. However, the bridge is configured between destinations within the same server whereas the route is configured between different servers.


1. Routing happens between destinations across different JMS servers. It’s a replication process.

2. The destination names should be the same in both the servers.

3. The destination properties in both should be set to global. This facilitates two way messaging. You would just need to publish on one and it will be replicated on the second one. Communication on the route is bidirectional.

4. The process also supports filtering via selectors. But selectors are not supported in queue routing.

5. Routes can be transitive in case of topics but non-transitive in case of queues.

6. No cyclic loops allowed for routing. Routes for topics can be multi-hop, but must be acyclic. Routes for queues can only be single hop, and must also be acyclic.

7. When a bridge configuration is changed the entire server needs to be restarted whereas in routing it is not needed.

8. To create a route using the administration tool, use the create route command
with the following syntax:
create route <name> url=<URL> [<properties ...>]
where name is the name of the server you wish to route to, URL is the URL for the
remote server, and properties are a space-separated list of connection properties for
the route.

In this example, we have two servers: ServerA and ServerB. ServerA creates a
route to ServerB by issuing the following command in the administration tool:

create route ServerB url=tcp://serverB:7454

You can display this route using the “show routes” command in the administrator
tool:

Eg:
Routing between topic on Server A and topic on Server B

1) Make both topics Global
2) Grant permission for server A on Server B
3) Grant permission for server B on Server A
4) Configure Route
5) Check Logs.


Monday, August 5, 2013

Fault Tolerance in TIBCO Businessworks

                               Fault tolerance configuration in tibco bw

fault tolerance is a procedure to provide continuous service of a component even in case of unexpected failures. in fault tolerant systems, backup systems are ready to serve in case of failure of a running system. fault tolerance is also known as graceful degradation. in this document we will clearly see how to go about fault tolerance of bw process. this document explains the steps in deploying the bw process in fault tolerant mode and testing the same.

fault tolerance can be achieved by deploying different instances of the same ear in same/different systems.

fault tolerance parameters

o    ft weight – a parameter available in the tibco administrator during deployment of any engine in fault tolerant mode. this defines the relationship between the fault tolerant engines. it can be set to ‘peer’ or ‘primary/secondary’.

o    ft weight – peer – if all the engines of the fault tolerant group are peers then when the machine containing the currently active process engine fails, another peer process engine resumes processing for the first engine, and continues processing until its machine fails.

o    ft weight – primary / secondary – if the engines are configured as primary (master) and secondary, the secondary engine resumes processing when the master fails. the secondary engine continues processing until the master recovers. once the master recovers, the secondary engine shuts down and the master takes over processing again. 

configuring fault tolerance in tibco administrator

after the ear is ready, it has to be deployed in tibco administrator.

1.    in administrator save the ear that has to be deployed. for detailed explanation on deploying in administrator refer to appendix – section 4.

2.    click on the application name from the right panel in case global variables needs to be changed before deployment. on the next screen click advanced for the display of global variables.


figure 1 – configuration builder

3.    to set the application in fault tolerant mode click on the process archive.


figure 2 – process archive

4.    under the general tab, click on ‘add to additional machines’.


figure 3 – add to additional machines

5.    all the available machines in the domain will be listed down. select the machine on which fault tolerant process needs to run [can be same or different machine]. click ok. below figure shows fault tolerant engine being added to the same machine.


figure 4 – bind to container

6.    repeat steps 3 to 5 incase more fault tolerant process should run on additional machines. here we will use 2 instances of bw process in fault tolerant mode.

7.    select the ft weight and ensure the ‘run fault tolerant’ check box is enabled. the figure shows engines being deployed with ft weight as ‘peer’. click save.


figure 5 – edit service configuration

note: ft weigh can also be set to primary for one service instance and secondary for the other engine. refer section 2.2 for explanations different ft weights.

8.    the configuration now shows 2 instances under the process archive. after all configuration are done click on ‘deploy’ button.


figure 6 – deploy

9.    from the left panel select ‘service instance’.


figure 7 – service instance

10. on clicking the ‘service instance’, initially the right panel shows that both the service instance with its state as ‘starting up’.


figure 8 – service starting up

11. after sometime the state changes from ‘starting up’ to ‘standing by’ for both the instances as shown below.


figure 9 – service standing by

12. after sometime the state of one of the instances changes from ‘starting up’ to ‘running’ as shown below. the other will remain in ‘standing by’. now fault tolerant engines have been set up. incase of failure of the running instance, the ‘standing by’ instance will get activated thus providing no loss of service.


figure 10 – service running

13. ensure that the ear is deployed without errors and is in ‘running’ state. [for detailed explanations on this refer appendix – section 4]

14. for the running instance, the details under tracing tab will show that the instance was first started off in back-up mode and then has been activated as shown in the below figure. this will also be available in its log file.


figure 11 – tracing - running instance
         
15. for the standing by instance, the details under tracing tab will show that the instance is in back-up as shown in the below figure. this will also be available in its log file.


figure 12 – tracing – standing by instance

now the ear is deployed in fault tolerant mode.

2.1   testing fault tolerance

 here we will be testing if the deployed service instances are able to manage in case of failures.

1.    in fault tolerant mode, all the files/input messages will be processed by the running instances.

2.    select the running instance and stop it.


figure 13 – stop instance

3.    the state will be changed from ‘running’ to ‘shutting down’


figure 14 – shutting down

4.    after sometime, the state from ‘shutting down’ will be changed to ‘stopped’. also, the ‘standing by’ instance will get activated. the state of ‘standing by’ engine will be changed to ‘running’.


figure 15 – activation of standing by instance

TIBCO Businessworks deployment

TIBCO BW Deployment

To create the EAR from BW process, follow the steps shown below.

EAR File contains
        Process Archive
        Adapter Archive
        Shared Archive

EAR File Creation using TIBCO Designer :
1.   Open the Enterprise Archive created for the BW process. It will comprise of Shared Archive and   Process Archive as shown in the figure.
2.     Specify the exact location along with the ear name in the ‘File Location’ text box.
3.     Check if “Include all service level global variables” check box is checked.

4.     Click on the ‘Build Archive’ button. EAR will be created on the location specified.


Sunday, July 28, 2013

Monitoring Performance of Tibco Components

Performance test  TIBCO BW

The scope of Stress/Performance testing primarily included monitoring the behavior of Tibco Components while processing peak volume data. The data transfer was across RVRD


The main aim of  the stress tests was to
ü  Monitor the Memory usage of each Tibco Component.
Measure the Processor time consumed by each Tibco Component

Capturing Performance Parameters

This is achieved by capturing the data in Performance Logs. Tibco online training deals with the creation of Performance Logs is explained in the steps below.

 Step 1:-

The first step involves creation of counter logs. Counter logs can be accessed from below path.
 

           Control Panel à Administrative Tools à Performance


Step 2:-  Start adding the counters to the counter logs.

Step 3:-  To gather the details of the processor id add Process as the performance object and counter as ID Process .  Include all the adbagents, bwengines, adr3 processes running on the server. 

Step 4:-  For capturing the percentage processor time consumed by the component add Processor Time as
a counter. Apply this counter to all the Tibco Components which need to be monitored.

Step 5:-  Memory usage of the components can be captured by including Working Set from the counter list.
Please note that the above counters need to be added to all the Tibco Component instances running on the server.


Step 6:- After inclusion of all the counters configure Performance log file in to which all the information needs to be logged in to. The below snapshots give an idea for confirmation of the file.





Step 7:- We can select the time limit during which the components need to be monitored by configuring various scheduling options available.







Wednesday, July 24, 2013

TIBCO Businessworks File alias Creation

USING LIBRARY –THROUGH ALIASES

1. Aliases are used to manage access to LibraryBuilder resources. The aliases created are saved in user profiles and available to all projects are created on a machine. Other developers can export aliases to LibraryBuilder resources, so they can be imported into other projects.
2. n you add a LibraryBuilder resource to a project you can create an alias to it when loading the library, or pick an alias and load the corresponding library.
3.  LibraryBuilder resource allows you to share resources you have defined in a project with other project developers. This allows you to create shareable resources once, then allow other project developers to use them in their projects


         
   In tibco online training you can have the topic called creating a File Alias (Through Preferences)

       The following screen shots help in understanding in creating file aliases.
       1. Open the designer and go to Preferences in the Edit tab.



2. Go to the File Aliases tab and click on the new tab to add an alias.



3. Add an alias name and browse the file path for the location of libraries (Eg: -    C:\Projects\Lib) and select the required library.


4. The alias is added, click OK.
 The alias to the library is added to the project.

Adding the library to the repo
             The library can be added to the repo in the following way-
1.    Select the top-most folder which is the project name. In the right panel, three tabs appear.
            2. In the “Design Time Libraries” tab, click on the ‘+’ icon and browse for the library.


3. The Alias is added to the designer as seen below.



Creating File Alias from Resource





To create a file alias from resource,
1.    Open the palettes window.
2.    Select the AliasLibrary palette from the general palettes.
·         In the configuration tab add the name and the description as required.

·         In the aliases tab, use the ‘+’ to browse the aliases, the second button to select a previously defined Alias entry to add to the library and the bin button to delete any added aliases.



Resources that reference an AliasLibrary as above, will package all the referenced files when their enterprise archive file is built. Because AliasLibraries reference files via a reference, it must be ensured that the machine where the enterprise archive file is generated can access all externally referenced files.

                    The resources added in the library are grayed out because they cannot be modified. AliasLibrary resource is crucial for resources that depend on external files, such as the Java Activity in TIBCO Business Works. Resources in your project can reference aliases in the AliasLibrary to resolve external file dependencies that they may have at runtime or debug time.