Friday, October 14, 2011

Creating and configuring a MySQL DataSource in GlassFish Application Server.

Creating and configuring a MySQL DataSource in GlassFish Application Server.

Follow the below steps for creating and configuring a MySQL DataSource in GlassFish application server.
1. Download MySQL JDBC driver from http://dev.mysql.com/downloads/connector/j/3.1.html
2. Extract the contents of the zip file
3. Copy mysql-connector-java-x.x.x-bin.jar to GLASS_FISH_INSTALL_DIR\lib folder.
3. Start your GlassFish Application server by issuing the command ‘asadmin.bat start-domain domain1′ from GLASS_FISH_INSTALL_DIR\bin directory.
4. Login to GlassFish admin console. The default url for GlassFish admin console will be http://localhost:4848/login.jsf. The default username and password for accessing the admin console will be admin and adminadmin respectively.
5. From Common Task menu expand Resources menu by clicking on Resources menu.
6. Expand JDBC under resources.
7. Click on ‘Connection Pools’ under JDBC menu. The Connection Pools page will be displayed.


8. Click on New.
9. Enter a name for your JDBC Connection pool. Select javax.sql.ConnectionPoolDataSource as your ‘Resource Type’ and select MySQL as your ‘Database vendor’.


10. Click on Next.
11. Fill the details according to your need. Minimum you need to fill the following fields.

a. DatabaseName
b. Password
c. URL (The format will be jdbc:mysql://localhost:3306/test. Where test is your database name.)
d. Url (The format will be jdbc:mysql://localhost:3306/test. Where test is your database name.)
e. ServerName
f. User
12. Click on Finish. You will be taken back to the Connection Pools page.
13. Click on the Connection Pool you created. You will be taken to ‘Edit Connection Pool’ page.
14. Click on Ping. If your connection pool is setup correctly you will get a Ping Succeeded message.


15. Now click on JDBC Resorces under JDBC menu.
16. Click on New.
17. Enter a JNDI Name for your data source. Select the pool you created by following the above steps as your ‘Pool Name’.


18. Click on OK. You are done.To obtain a connection using the above DataSource, use the following code.

Source: http://www.albeesonline.com
http://www.albeesonline.com/blog/2008/08/06/creating-and-configuring-a-mysql-datasource-in-glassfish-application-server/

Wednesday, October 12, 2011

What is ISO8583

What is ISO8583? Of course we are familiar with the name of the ISO, which is an international organization dealing with the standardization of products. Well, related to ISO8583, is a messaging standard relating to financial data. Usually my friends working in the field of financial transactions, such as in areas of banking, data switching, ATM, EDC is no stranger to being on this one. I, incidentally, including those unfamiliar with this ISO8583. I first saw her message is full of examples of alpha-numeric characters long and can not be read as. Finally after reading some of the references, data contained on a row of characters.

ISO8583 structure

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

ISO8586 structure consists of three parts:

MTI (Message Type Indicator)

MTI explain what kind of message he sends, a message transaction or inquiry message (non transactional). MTI is composed of 4 digits.

- Digit 1: show version

- Figure 2: shows the message class

- Digit 3: The message sub class

BIT MAP

A bit map is an indexing technique in ISO 8583 are used to identify whether a data element at the specified index position there or not. There are two kinds of bit map,



The first primary and secondary bitmap bitmap. Primary bitmap memilikin indexs 1-64,

both secondary bitmap 65-128. If the secondary bitmap appears, then bit one must be active.

Data Element

The data elements indicate the data that will be sent in a transaction in the body of ISO 8583. Eg the example bit:

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4


Bit 2 contains information atm card number.
Bit 4 contains information the transaction amount.
Bit 32 contains the code bank.
Bit 18 contains the type of channel (sms / EDC / atm).
Etc ... .. up to 128.