[jboss-user] [JBoss Seam] - Automatically run a method after constructor and injection i
nemya
do-not-reply at jboss.com
Thu Aug 30 12:42:29 EDT 2007
Hi,
I'm using Jboss Seam 1.2.1.GA + JBoss Server 4.0.5.GA.
In a StateLess Session Bean I'd like to run a method automatically after the constructor invocation. This method uses an injected variable. I tried to invoke it in the constructor but this causes a NullPointerException. The exception is due to the fact that the injection isn't done yet.
| @In(create = true)
| private CollaborateurHome collaborateurHome;
| //My method
| public void init() {
| selectedCollaborateur = collaborateurHome.getDefinedInstance();
| remplirLignes();
| boiteNoire = ContratService.getSaisieActivite(lignes, dateDebut,dateFin);
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079696#4079696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079696
More information about the jboss-user
mailing list