Click here to Skip to main content
15,881,380 members
Articles / Programming Languages / Java / Java SE / J2EE

Modular J2EE, Using Spring DM, Zk and EclipseLink

Rate me:
Please Sign up or sign in to vote.
4.92/5 (9 votes)
21 Apr 2011CPOL15 min read 52.6K   8  
This article describes how to create a basic modular Java Enterprise Application, by using these Open Source frameworks
package javax.validation;

/**
 * Validation factory proxy, for can be used everywhere in application
 * as a OSGi service.
 * 
 * @author ADRABI Abderrahim (z3vil)
 *
 */
public class ValidatorFactoryProxy implements ValidatorFactory
{
	private ValidatorFactory factory = null;
	
	public ValidatorFactoryProxy()
	{
		this.factory = Validation.buildDefaultValidatorFactory();
	}

	@Override
	public Validator getValidator()
	{
		return this.factory.getValidator();
	}

	@Override
	public ValidatorContext usingContext()
	{
		return this.factory.usingContext();
	}

	@Override
	public MessageInterpolator getMessageInterpolator()
	{
		return this.factory.getMessageInterpolator();
	}

	@Override
	public TraversableResolver getTraversableResolver()
	{
		return this.factory.getTraversableResolver();
	}

	@Override
	public ConstraintValidatorFactory getConstraintValidatorFactory()
	{
		return this.factory.getConstraintValidatorFactory();
	}

	@Override
	public <T> T unwrap(Class<T> type)
	{
		return this.factory.unwrap(type);
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
Morocco Morocco
Adrabi!, Just another Ghost in the Shell =)

Comments and Discussions