container/components/components/src/main/java/org/mobicents/slee/container/component/deployment/DeployableUnitBuilderImpl.java
private void loadAndSetNonGeneratedComponentClasses(
			AbstractSleeComponent sleeComponent) throws DeploymentException {

		if (logger.isDebugEnabled()) {
			logger.debug("Loading classes for component " + sleeComponent);
		}
		ClassLoader oldClassLoader = Thread.currentThread()
				.getContextClassLoader();
		try {
			ComponentClassLoaderImpl componentClassLoader = sleeComponent
					.getClassLoader();
			if (componentClassLoader != null) {
				// change class loader
				Thread.currentThread().setContextClassLoader(
						componentClassLoader);
				// load and set non generated component classes
				if (sleeComponent instanceof EventTypeComponentImpl) {
					EventTypeComponentImpl component = (EventTypeComponentImpl) sleeComponent;
					Class<?> eventTypeClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getEventClassName());
					component.setEventTypeClass(eventTypeClass);
				} else if (sleeComponent instanceof ProfileSpecificationComponentImpl) {
					ProfileSpecificationComponentImpl component = (ProfileSpecificationComponentImpl) sleeComponent;
					Class<?> profileCmpInterfaceClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getProfileCMPInterface()
									.getProfileCmpInterfaceName());
					component
							.setProfileCmpInterfaceClass(profileCmpInterfaceClass);
					if (component.getDescriptor()
							.getProfileLocalInterface() != null) {
						Class<?> profileLocalInterfaceClass = componentClassLoader
								.loadClass(component.getDescriptor()
										.getProfileLocalInterface()
										.getProfileLocalInterfaceName());
						component
								.setProfileLocalInterfaceClass(profileLocalInterfaceClass);
					}
					if (component.getDescriptor()
							.getProfileManagementInterface() != null) {
						Class<?> profileManagementInterfaceClass = componentClassLoader
								.loadClass(component.getDescriptor()
										.getProfileManagementInterface());
						component
								.setProfileManagementInterfaceClass(profileManagementInterfaceClass);
					}
					if (component.getDescriptor()
							.getProfileAbstractClass() != null) {
						boolean decoratedClass = new ProfileAbstractClassDecorator(component).decorateAbstractClass();
						Class<?> profileAbstractClass = null;
						if (decoratedClass) {
							// need to ensure we load the class from disk, not one coming from SLEE shared class loading domain
							profileAbstractClass = componentClassLoader
							.loadClassLocally(component.getDescriptor()
									.getProfileAbstractClass()
									.getProfileAbstractClassName());
						}
						else {
							profileAbstractClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getProfileAbstractClass()
									.getProfileAbstractClassName());
						}
						component.setProfileAbstractClass(profileAbstractClass);
					}
					String mProfileTableInterface = component
							.getDescriptor()
							.getProfileTableInterface();
					if (mProfileTableInterface != null) {
						component
								.setProfileTableInterfaceClass(componentClassLoader
										.loadClass(mProfileTableInterface));
					}
					UsageParametersInterfaceDescriptor mUsageParametersInterface = component
							.getDescriptor()
							.getProfileUsageParameterInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				} else if (sleeComponent instanceof ResourceAdaptorComponentImpl) {
					ResourceAdaptorComponentImpl component = (ResourceAdaptorComponentImpl) sleeComponent;
					Class<?> resourceAdaptorClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getResourceAdaptorClassName());
					component.setResourceAdaptorClass(resourceAdaptorClass);
					MUsageParametersInterface mUsageParametersInterface = component
							.getDescriptor()
							.getResourceAdaptorUsageParametersInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				} else if (sleeComponent instanceof ResourceAdaptorTypeComponentImpl) {
					ResourceAdaptorTypeComponentImpl component = (ResourceAdaptorTypeComponentImpl) sleeComponent;
					if (component.getDescriptor()
							.getActivityContextInterfaceFactoryInterface() != null) {
						Class<?> activityContextInterfaceFactoryInterface = componentClassLoader
								.loadClass(component
										.getDescriptor()
										.getActivityContextInterfaceFactoryInterface());
						component
								.setActivityContextInterfaceFactoryInterface(activityContextInterfaceFactoryInterface);
					}
				} else if (sleeComponent instanceof SbbComponentImpl) {
					SbbComponentImpl component = (SbbComponentImpl) sleeComponent;
					// before loading the abstract class, we may have to decorate it
					boolean decoratedClass = new SbbAbstractClassDecorator(component).decorateAbstractSbb();
					Class<?> abstractSbbClass = null;
					if (decoratedClass) {
						// need to ensure we load the class from disk, not one coming from SLEE shared class loading domain
						 abstractSbbClass = componentClassLoader
							.loadClassLocally(component.getDescriptor()
									.getSbbAbstractClass()
									.getSbbAbstractClassName());
					}
					else {
						 abstractSbbClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getSbbAbstractClass()
									.getSbbAbstractClassName());
					}
					component.setAbstractSbbClass(abstractSbbClass);
					SbbLocalInterfaceDescriptor mSbbLocalInterface = component
							.getDescriptor()
							.getSbbLocalInterface();
					if (mSbbLocalInterface != null) {
						component
								.setSbbLocalInterfaceClass(componentClassLoader
										.loadClass(mSbbLocalInterface
												.getSbbLocalInterfaceName()));
					}
					String mSbbActivityContextInterface = component
							.getDescriptor()
							.getSbbActivityContextInterface();
					if (mSbbActivityContextInterface != null) {
						component
								.setActivityContextInterface(componentClassLoader
										.loadClass(mSbbActivityContextInterface));
					}
					UsageParametersInterfaceDescriptor mUsageParametersInterface = component
							.getDescriptor()
							.getSbbUsageParametersInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				}
			}
		} catch (NoClassDefFoundError e) {
			throw new DeploymentException("Component "
					+ sleeComponent.getComponentID()
					+ " requires a class that was not found", e);
		} catch (ClassNotFoundException e) {
			throw new DeploymentException("Component "
					+ sleeComponent.getComponentID()
					+ " requires a class that was not found", e);
		} finally {
			Thread.currentThread().setContextClassLoader(oldClassLoader);
		}
	}
private void loadAndSetNonGeneratedComponentClasses(
			AbstractSleeComponent sleeComponent) throws DeploymentException {

		if (logger.isDebugEnabled()) {
			logger.debug("Loading classes for component " + sleeComponent);
		}
		ClassLoader oldClassLoader = Thread.currentThread()
				.getContextClassLoader();
		try {
			ComponentClassLoaderImpl componentClassLoader = sleeComponent
					.getClassLoader();
			if (componentClassLoader != null) {
				// change class loader
				Thread.currentThread().setContextClassLoader(
						componentClassLoader);
				// load and set non generated component classes
				if (sleeComponent instanceof EventTypeComponentImpl) {
					EventTypeComponentImpl component = (EventTypeComponentImpl) sleeComponent;
					Class<?> eventTypeClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getEventClassName());
					component.setEventTypeClass(eventTypeClass);
				} else if (sleeComponent instanceof ProfileSpecificationComponentImpl) {
					ProfileSpecificationComponentImpl component = (ProfileSpecificationComponentImpl) sleeComponent;
					Class<?> profileCmpInterfaceClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getProfileCMPInterface()
									.getProfileCmpInterfaceName());
					component
							.setProfileCmpInterfaceClass(profileCmpInterfaceClass);
					if (component.getDescriptor()
							.getProfileLocalInterface() != null) {
						Class<?> profileLocalInterfaceClass = componentClassLoader
								.loadClass(component.getDescriptor()
										.getProfileLocalInterface()
										.getProfileLocalInterfaceName());
						component
								.setProfileLocalInterfaceClass(profileLocalInterfaceClass);
					}
					if (component.getDescriptor()
							.getProfileManagementInterface() != null) {
						Class<?> profileManagementInterfaceClass = componentClassLoader
								.loadClass(component.getDescriptor()
										.getProfileManagementInterface());
						component
								.setProfileManagementInterfaceClass(profileManagementInterfaceClass);
					}
					if (component.getDescriptor()
							.getProfileAbstractClass() != null) {
						boolean decoratedClass = new ProfileAbstractClassDecorator(component).decorateAbstractClass();
						Class<?> profileAbstractClass = null;
						if (decoratedClass) {
							// need to ensure we load the class from disk, not one coming from SLEE shared class loading domain
							profileAbstractClass = componentClassLoader
							.loadClassLocally(component.getDescriptor()
									.getProfileAbstractClass()
									.getProfileAbstractClassName());
						}
						else {
							profileAbstractClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getProfileAbstractClass()
									.getProfileAbstractClassName());
						}
						component.setProfileAbstractClass(profileAbstractClass);
					}
					String mProfileTableInterface = component
							.getDescriptor()
							.getProfileTableInterface();
					if (mProfileTableInterface != null) {
						component
								.setProfileTableInterfaceClass(componentClassLoader
										.loadClass(mProfileTableInterface));
					}
					UsageParametersInterfaceDescriptor mUsageParametersInterface = component
							.getDescriptor()
							.getProfileUsageParameterInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				} else if (sleeComponent instanceof ResourceAdaptorComponentImpl) {
					ResourceAdaptorComponentImpl component = (ResourceAdaptorComponentImpl) sleeComponent;
					Class<?> resourceAdaptorClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getResourceAdaptorClassName());
					component.setResourceAdaptorClass(resourceAdaptorClass);
					MUsageParametersInterface mUsageParametersInterface = component
							.getDescriptor()
							.getResourceAdaptorUsageParametersInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				} else if (sleeComponent instanceof ResourceAdaptorTypeComponentImpl) {
					ResourceAdaptorTypeComponentImpl component = (ResourceAdaptorTypeComponentImpl) sleeComponent;
					if (component.getDescriptor()
							.getActivityContextInterfaceFactoryInterface() != null) {
						Class<?> activityContextInterfaceFactoryInterface = componentClassLoader
								.loadClass(component
										.getDescriptor()
										.getActivityContextInterfaceFactoryInterface());
						component
								.setActivityContextInterfaceFactoryInterface(activityContextInterfaceFactoryInterface);
					}
				} else if (sleeComponent instanceof SbbComponentImpl) {
					SbbComponentImpl component = (SbbComponentImpl) sleeComponent;
					// before loading the abstract class, we may have to decorate it
					boolean decoratedClass = new SbbAbstractClassDecorator(component).decorateAbstractSbb();
					Class<?> abstractSbbClass = null;
					if (decoratedClass) {
						// need to ensure we load the class from disk, not one coming from SLEE shared class loading domain
						 abstractSbbClass = componentClassLoader
							.loadClassLocally(component.getDescriptor()
									.getSbbAbstractClass()
									.getSbbAbstractClassName());
					}
					else {
						 abstractSbbClass = componentClassLoader
							.loadClass(component.getDescriptor()
									.getSbbAbstractClass()
									.getSbbAbstractClassName());
					}
					component.setAbstractSbbClass(abstractSbbClass);
					SbbLocalInterfaceDescriptor mSbbLocalInterface = component
							.getDescriptor()
							.getSbbLocalInterface();
					if (mSbbLocalInterface != null) {
						component
								.setSbbLocalInterfaceClass(componentClassLoader
										.loadClass(mSbbLocalInterface
												.getSbbLocalInterfaceName()));
					}
					String mSbbActivityContextInterface = component
							.getDescriptor()
							.getSbbActivityContextInterface();
					if (mSbbActivityContextInterface != null) {
						component
								.setActivityContextInterface(componentClassLoader
										.loadClass(mSbbActivityContextInterface));
					}
					UsageParametersInterfaceDescriptor mUsageParametersInterface = component
							.getDescriptor()
							.getSbbUsageParametersInterface();
					if (mUsageParametersInterface != null) {
						component
								.setUsageParametersInterface(componentClassLoader
										.loadClass(mUsageParametersInterface
												.getUsageParametersInterfaceName()));
					}
				}
			}
		} catch (NoClassDefFoundError e) {
			throw new DeploymentException("Component "
					+ sleeComponent.getComponentID()
					+ " requires a class that was not found", e);
		} catch (ClassNotFoundException e) {
			throw new DeploymentException("Component "
					+ sleeComponent.getComponentID()
					+ " requires a class that was not found", e);
		} finally {
			Thread.currentThread().setContextClassLoader(oldClassLoader);
		}
	}
Loads all non SLEE generated classes from the component class loader to
the component, those will be needed for validation or runtime purposes

@param sleeComponent
@throws DeploymentException