use of javax.annotation.PostConstruct in project wildfly by wildfly.
the class ObjectStoreBrowserService method start.
@PostConstruct
public void start() {
rsb = new RecoveryStoreBean();
rsb.start();
}
use of javax.annotation.PostConstruct in project wildfly by wildfly.
the class BeanTwo method postConstruct.
@PostConstruct
public void postConstruct() {
try {
new InitialContext().lookup(TestResults.SHARED_BINDING_NAME_ONE);
new InitialContext().rebind(TestResults.SHARED_BINDING_NAME_TWO, "");
testResults.setPostContructTwo(true);
} catch (Throwable e) {
e.printStackTrace();
testResults.setPostContructTwo(false);
}
}
use of javax.annotation.PostConstruct in project wildfly by wildfly.
the class DatabaseCreatorBean method initDatabase.
@PostConstruct
public void initDatabase() throws Exception {
InitialContext iniCtx = new InitialContext();
ds = (DataSource) iniCtx.lookup(DS_JNDI);
final Connection conn = ds.getConnection();
executeUpdate(conn, "CREATE TABLE " + TABLE_NAME_ROLES + "(" + COLUMN_USER + " Varchar(50), " + COLUMN_ROLE + " Varchar(50), " + COLUMN_ROLE_GROUP + " Varchar(50))");
executeUpdate(conn, "INSERT INTO " + TABLE_NAME_ROLES + " VALUES ('anil','" + SimpleSecuredServlet.ALLOWED_ROLE + "','Roles')");
executeUpdate(conn, "INSERT INTO " + TABLE_NAME_ROLES + " VALUES ('marcus','superuser','Roles')");
executeUpdate(conn, "CREATE TABLE " + TABLE_NAME_USERS + "(" + COLUMN_USER + " Varchar(50), " + COLUMN_PASSWORD + " Varchar(50))");
executeUpdate(conn, "INSERT INTO " + TABLE_NAME_USERS + " VALUES ('anil','anil')");
executeUpdate(conn, "INSERT INTO " + TABLE_NAME_USERS + " VALUES ('marcus','marcus')");
conn.close();
}
use of javax.annotation.PostConstruct in project wildfly by wildfly.
the class CommonStatefulSBImpl method init.
@PostConstruct
private void init() {
bean = new SerialBean();
log.tracef("New SFSB created: %s.", this);
}
use of javax.annotation.PostConstruct in project wildfly by wildfly.
the class TestPassivationBean method postConstruct.
@PostConstruct
public void postConstruct() {
Random r = new Random();
this.identificator = new Integer(r.nextInt(999)).toString();
log.trace("Bean [" + this.identificator + "] created");
}
Aggregations