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.