@SuppressWarnings({ "unchecked", "rawtypes" })
	private List createMBeanAttributes(MBeanServerConnection mbc, ObjectName mBeanName, String attributePattern)
			throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException {
		List attributes = new ArrayList();
		MBeanInfo mbi = mbc.getMBeanInfo(mBeanName);
		MBeanAttributeInfo[] attrInfo = mbi.getAttributes();

		for (MBeanAttributeInfo attr : attrInfo) {
			try {
				LOG.info(attr.getName() + "(" + attr.getType() + ")" + " matches " + attributePattern + " ?");
				if (isAttributeMatch(attr, attributePattern)) {
					LOG.info(attr.getName() + " matches " + attributePattern);
					Map attrMap = mBeanAttributeModel.createInstance();
					attrMap.put(Constants.ATTRIBUTE_NAME, attr.getName());
					attrMap.put(Constants.ATTRIBUTE_VALUE, mbc.getAttribute(mBeanName, attr.getName()).toString());
					attributes.add(attrMap);
				}
			} catch (MBeanException mbe) {
				LOG.severe("Could not access MBean instance " + mBeanName.toString() + ": "
						+ ExceptionToStacktraceString.toStacktrace(mbe));
			} catch (InstanceNotFoundException inf) {
				LOG.severe("Could not access MBean instance " + mBeanName.toString() + ": "
						+ ExceptionToStacktraceString.toStacktrace(inf));
			} catch (AttributeNotFoundException anf) {
				LOG.severe("Could not access attribute " + attr.getName() + " on MBean " + mBeanName.toString() + ": "
						+ ExceptionToStacktraceString.toStacktrace(anf));
			}
		}

		return attributes;
	}