com.mysoft.b2b.event.util.MysoftDataSource.java Source code

Java tutorial

Introduction

Here is the source code for com.mysoft.b2b.event.util.MysoftDataSource.java

Source

/**
 * Copyright mysoft Limited (c) 2014. All rights reserved.
 * This software is proprietary to and embodies the confidential
 * technology of mysoft Limited. Possession, use, or copying
 * of this software and media is authorized only pursuant to a
 * valid written license from mysoft or an authorized sublicensor.
 */
package com.mysoft.b2b.event.util;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.InitializingBean;

import com.jolbox.bonecp.BoneCPDataSource;

/**
 * chengp: Change to the actual description of this class
 * @version   Revision History
 * <pre>
 * Author     Version       Date        Changes
 * chengp    1.0           2014825     Created
 *
 * </pre>
 * @since b2b 2.0.0
 */

@SuppressWarnings("serial")
public class MysoftDataSource extends BoneCPDataSource implements InitializingBean {

    private static final Logger logger = Logger.getLogger(MysoftDataSource.class);

    /**
     * ???????? 
     * ????
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        try {
            super.getConnection();
        } catch (Exception e) {
            logger.error("??" + e.getMessage(), e.getCause());
            System.exit(1);
        }
    }

}