mercredi 13 mai 2015

What is the name of the design pattern used

I am struggling to identify the name of the design pattern I used to bridge between the spring container and CDI container. This is the class I wrote to use the spring beans in my CDI container:

   @ApplicationScoped
public class CDIFactory {

ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring/context/application-context.xml");

@Produces
public ServiceManager facadeServices(){
    return (ServiceManager) applicationContext.getBean("ServiceManager");   
}

Your help would be appreciated.

Aucun commentaire:

Enregistrer un commentaire