Hi

the issue comes from the particular handling of @New.

This has been rewritten on trunk and trunk doesn't have the issue.

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/7/23 Evan Yang <evanyang1...@163.com>

> User is my class:
>
> public class User{
>
>   private String name;
>   private String password;
>
>   public void say(){
>
>     // do your logic
>
>   }
>
> }
>
> I use TomEE, it has included the CDI jar, and I have create a beans.xml
> under WEB-INF.
>
> Sorry, getUser() method have annotation, following :
>
> @Inject
> @New(User.class)
> private User getUser(Instance<User> user){
>
>      return user.get();
> }
>
> because, I need multiple instances of User when the server started.
>
> the TomEE startup is OK, but it happend error when I access my project.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/There-is-a-problem-of-CDI-in-TomEE1-5-2-tp4664313p4664315.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Reply via email to