Skip to content

Commit

Permalink
test @PostConstruct after injection
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@277 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
Gavin King authored and gavin.king@gmail.com committed Nov 7, 2008
1 parent 2743084 commit 3a5ff29
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 24 additions & 0 deletions webbeans-ri/src/test/java/org/jboss/webbeans/test/beans/Farm.java
@@ -0,0 +1,24 @@
package org.jboss.webbeans.test.beans;

import java.util.Date;

import javax.annotation.PostConstruct;
import javax.webbeans.Current;

public class Farm
{

public Date founded;
public int initialStaff;

@Current
FarmOffice farmOffice;

@PostConstruct
private void postConstruct()
{
founded = new Date();
initialStaff = farmOffice.noOfStaff;
}

}
@@ -1,11 +1,9 @@
package org.jboss.webbeans.test.beans;

import javax.webbeans.Current;

public class FarmOffice
{

@Current
public int noOfStaff;
public int noOfStaff = 20;

}

0 comments on commit 3a5ff29

Please sign in to comment.