![]() |
|
Consider the following example of a bank application:
BankDesk.ear available at <install_dir>\server\samples\ejb11\BankDesk\ear\. Click Deploy to deploy the application.http://127.0.0.1:8181/bankWeb/bank.jsp. Create two accounts, 1111 and 2222 with initial balances of Rs. 5,000 each using the New Account tab. Then, using the Transfer tab, transfer Rs.1,000 from account number 1111 to 2222.Select Transactions. It displays the corresponding details. You can check for the nature and details of transactions. Click on the MBean to view the following details:
Table 1: Method descriptions for Transaction MBean
| Method Name | Description |
|---|---|
| Transaction Commit | Implies that a transaction has been committed. |
| Transaction Heuristic Mixed | Implies that the transaction was not committed because of data corruption. |
| Total Transaction | Indicates the total number of transactions that have occurred. |
| Transaction Rollback | Implies that a transaction has rolled back. |
| Transaction Heuristic Rollback | Implies that the transaction was not committed because of some network problem. The database or resource is not affected by this rollback. |
| Transaction Set Rollback | Implies that the transaction was not committed because of a logic specified in the code. |
You can select the Transaction Commit method from the list and study the drill down on the following page.
Table 2: Datasource details
| Field | Options | Description |
|---|---|---|
| Module Name | - | Refers to the name of the deployed module. |
| JDBC Datasource | - | Displays the JDBC datasource details. |
| - | Datasources | Displays the JDBC datasource name. |
| - | Total wait time to obtain connection (ms) | Displays the total time required to get connected. |
Click on a datasource name to view the following details:
Table 3: Datasource Diagnostics
| Method | This value indicates the |
|---|---|
| wait Time To Obtain Conn | Time taken to obtain a connection from the resource pool. |
| waiting Thread Time | Time taken to wait for a connection from the pool. A requestor may need to wait for a connection because a new connection cannot be created due to the limitation of the pool size. Then, the requestor has to wait for one currently used connection to become available. |
| prep Stmt Obtained From Cache | Number of prepared statements that are retrieved from the cache. |
| new Conn Creation Freq | Number of times a new connection is created. |
| prep Stmt Created Afresh | Number of prepared statements that are created afresh. The ratio of this value and the prepStmtObtainedFromCache value can give you an indication if you need to change the value of the number-of-cached-prepared-statement tag in the server-config.xml file. |
| connection Use Time | Duration for which the connection is in use. |
| conn Available In Thread Context | Number of times an existing connection is made available to the requestor from the same transaction. |
Selecting a method, for example, the connectionUseTime, displays a histogram for it.
Table 4: Application Diagnostic Details
| Field | Options | Description |
|---|---|---|
| Type | - | Refers to the type of the deployed application. For example, J2EE application. |
| Components | - | Displays the wars and jars for the application. |
| - | Wars | Displays the Web modules for the selected application. For example, bankWeb. |
| - | Jars | Displays the Java modules for the selected application. For example, bankEJB.jar. |
Reading Web Modules
Selecting the Web module displays the following details:
Table 5: Web Module Details
| Field | Description |
|---|---|
| Module Name | Refers to the name of the selected Web module. Say, bankWeb. |
| Servlet | Displays the list of servlets for the module, along with the total time taken for the method. |
Reading jar Modules
Selecting the jar module displays the following details:
Table 6: jar module details
| Field | Options | Description |
|---|---|---|
| Module Name | - | The name of the selected jar module, say bankEJB.jar. |
| Entity Bean | - | The details for the entity beans. |
| - | Beans | The name of the entity bean. |
| - | Total Activation Time (ms) | The total activation time for the entity bean in milliseconds. |
| - | Total Passivation Time (ms) | The total passivation time for the entity bean in milliseconds. |
| - | Total Load Time (ms) | The total load time for the entity bean in milliseconds. |
| - | Total Store Time (ms) | The total store time for the entity bean in milliseconds. |
| - | Total Locking Time (ms) | The total locking time for the entity bean in milliseconds. |
| Stateful Session Bean | - | The details for the stateful session beans. |
| - | Beans | The name of the stateful session beans. |
| - | Total Activation Time (ms) | The total activation time for the stateful session bean in milliseconds. |
| - | Total Passivation Time (ms) | The total passivation time for the stateful session bean in milliseconds. |
| Stateless Session Bean | - | The details for the stateless session beans. |
| - | Beans | The name of the stateless session beans. |
| Message Driven Bean | - | The details for the message driven beans. |
| - | Beans | The name of the message driven bean. |
| - | Time taken for MDBeans onMessage method call | The time taken for MDBs onMessage method call. |
Reading Entity Beans
Selecting an entity bean name displays the following details:
Table 7: Reading Entity Beans
| Task name | Time taken |
|---|---|
| create:java.lang.Long;double;java.lang.String;(BusinessMethod) | To execute the applications business method. |
| findByID:long;(BusinessMethod) | To execute the applications business method. |
| findAllAccounts:(BusinessMethod) | To execute the applications business method. |
| lockingTime | To obtain and release a lock by the bean. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| storeTime | To store data. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| getCustomer_name:(BusinessMethod) | To execute the applications business method. |
| loadTime | To load data. |
| activationTime | For activation. |
| riLockingTime | To lock a remote bean instance. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| ejbActivateTime | To call the ejbActivate method. |
| beanGetTime | To get a bean from the bean pool. |
| creatingTime | To create a bean instance. |
| lockRowTime | To lock a row. |
| onCacheWaitingTime | To wait for getting a bean from the cache. |
| debit:double;(BusinessMethod) | To execute the applications business method. |
| getAccount_number:(BusinessMethod) | To execute the applications business method. |
| credit:double;(BusinessMethod) | To execute the applications business method. |
| getBalance:(BusinessMethod) | To execute the applications business method. |
| verifiedUpdateTime | Verify the updation of the bean. |
| activateLoadTime | To activate the load. |
| rollbackLoadTime | To rollback the load. |
| lockWaitingTime | To obtain a lock for the bean. |
| passivationTime | For passivation. |
Selecting the task name displays a histogram for the activity on the same, if there is sufficient data available.
Reading Stateful Session Beans
Selecting a stateful session bean name displays the following details:
Table 8: Reading Stateful Session Beans
| Task name | Time taken |
|---|---|
| createEntry:long;java.lang.String;double;(BusinessMethod) | To execute the applications business method. |
| createEntry:long;java.lang.String;double;(ActualMethod) | To execute the applications actual method. |
| create:(BusinessMethod) | To execute the applications business method. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| getLedgerRows:(BusinessMethod) | To execute the applications business method. |
| getLedgerRows:(ActualMethod) | To execute the applications actual method. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| beanGetTime | To get a bean from the bean pool. |
| aliveTime | For which the bean is in existence. |
| creatingTime | To create a bean instance. |
| ejbActivateTime | To call the ejbActivate method. |
| activationTime | For activation. |
| riLockingTime | To lock a remote bean instance. |
| passivationTime | For passivation. |
Selecting the task name displays a histogram for the activity on the same, if there is sufficient data available.
Reading Stateless Session Beans
Selecting a stateless session bean name displays the following details:
Table 9: Reading Stateless Session Beans
| Task Name | Time taken |
|---|---|
| transfer:long;long;double;(BusinessMethod) | To execute the applications business method. |
| transfer:long;long;double;(ActualMethod) | To execute the applications actual method. |
| preProcessingTime | To complete the tasks that are done prior to processing the actual business methods in the bean. |
| beanGetTime | To get a bean from the bean pool. |
| onPoolWaitingTime | To wait for getting a bean from the bean pool. |
| create:(BusinessMethod) | To execute the applications business method. |
| postProcesingTime | To complete the tasks that are done after processing the actual business methods in the bean. |
| creatingTime | To create a bean instance. |
| riLockingTime | To lock a remote bean instance. |
To save and store diagnostic data in the local server:
Related Topics:
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |