Search in sources :

Example 1 with IRiakClient

use of com.basho.riak.client.IRiakClient in project javaee7-samples by javaee-samples.

the class PersonSessionBean method initDB.

@PostConstruct
private void initDB() {
    try {
        IRiakClient client = RiakFactory.pbcClient("localhost", 8087);
        myBucket = client.fetchBucket("test").execute();
    } catch (RiakException ex) {
        Logger.getLogger(PersonSessionBean.class.getName()).log(Level.SEVERE, null, ex);
    }
}
Also used : IRiakClient(com.basho.riak.client.IRiakClient) RiakException(com.basho.riak.client.RiakException) PostConstruct(javax.annotation.PostConstruct)

Aggregations

IRiakClient (com.basho.riak.client.IRiakClient)1 RiakException (com.basho.riak.client.RiakException)1 PostConstruct (javax.annotation.PostConstruct)1