Examples of MyDefault


Examples of org.apache.webbeans.samples.tomcat.MyDefault

    @Override
    @SuppressWarnings("unchecked")
    public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2) throws IOException, ServletException
    {
        Set<Bean<?>> beans = manager.getBeans(CurrentDateProvider.class, new Annotation[]{new MyDefault()});       
        System.out.println("Total found beans : " + beans.size());
        Bean<CurrentDateProvider> provider = (Bean<CurrentDateProvider>)beans.iterator().next();
        CurrentDateProvider instance = (CurrentDateProvider) manager.getReference(provider, CurrentDateProvider.class, manager.createCreationalContext(provider));
       
        System.out.println("Current time is : " + instance.getCurrentDate());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.