public String getCatalog() throws DataAccessException
	{
		if (catalog != null)
			return catalog;
		String dbName;

		try
		{
			if (con == null || con.isClosed())
				con = ConnectionManager.getConnection(url, driver, prop);
			dbName = con.getMetaData().getDatabaseProductName();
			if (dbName.trim().equalsIgnoreCase(DB_TYPE_MYSQL))
			{
				// log.info("DB Type:"+dbName);
				return (catalog = url.substring(url.lastIndexOf("/") + 1));
			}
			else if (dbName.trim().equalsIgnoreCase(DB_TYPE_ORACLE))
			{
				return (catalog = null);
			}
			else if (dbName.trim().equalsIgnoreCase(DB_TYPE_MSSQL))
			{
				int index = url.lastIndexOf("=");
				if (index != -1)
					return (catalog = url.substring(url.lastIndexOf("=") + 1));
				else
					return (catalog = url.substring(url.lastIndexOf("/") + 1));
			}
		}
		catch (SQLException e)
		{
			throw new DataAccessException(ErrorCode.ERR_GET_CONNECTION_METADATA, e, log);
		}
		return null;
	}