Search in sources :

Example 61 with PostConstruct

use of javax.annotation.PostConstruct in project wildfly by wildfly.

the class ObjectStoreBrowserService method start.

@PostConstruct
public void start() {
    rsb = new RecoveryStoreBean();
    rsb.start();
}
Also used : RecoveryStoreBean(com.arjuna.ats.arjuna.tools.osb.api.mbeans.RecoveryStoreBean) PostConstruct(javax.annotation.PostConstruct)

Example 62 with PostConstruct

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);
    }
}
Also used : InitialContext(javax.naming.InitialContext) PostConstruct(javax.annotation.PostConstruct)

Example 63 with PostConstruct

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();
}
Also used : Connection(java.sql.Connection) InitialContext(javax.naming.InitialContext) PostConstruct(javax.annotation.PostConstruct)

Example 64 with PostConstruct

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);
}
Also used : SerialBean(org.jboss.as.test.clustering.twoclusters.bean.SerialBean) PostConstruct(javax.annotation.PostConstruct)

Example 65 with PostConstruct

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");
}
Also used : Random(java.util.Random) PostConstruct(javax.annotation.PostConstruct)

Aggregations

PostConstruct (javax.annotation.PostConstruct)248 IOException (java.io.IOException)28 File (java.io.File)18 SamlRegisteredService (org.apereo.cas.support.saml.services.SamlRegisteredService)17 Map (java.util.Map)15 ArrayList (java.util.ArrayList)12 ExternalResource (com.vaadin.server.ExternalResource)11 HashMap (java.util.HashMap)10 InitialContext (javax.naming.InitialContext)9 Label (com.vaadin.ui.Label)8 VerticalLayout (com.vaadin.ui.VerticalLayout)8 Request (com.nabalive.framework.web.Request)7 Response (com.nabalive.framework.web.Response)7 Route (com.nabalive.framework.web.Route)7 Link (com.vaadin.ui.Link)7 Properties (java.util.Properties)7 Method (java.lang.reflect.Method)5 InputStream (java.io.InputStream)4 URISyntaxException (java.net.URISyntaxException)4 Path (java.nio.file.Path)4