Tags » Java EE

Announcement!

Major re-haul in personal development. Fully switching from “theory->practicetotrial and error“. Also trying to apply the Agile->Scrum to everything I do.

Enterprise Java Beans(EJB)

CDI freebies a.k.a built-in beans

Generally speaking,

The CDI programming model has pre-requisite requirements for beans which are lucky enough to leverage its services (DI, contextual state management etc.). This ranges from typical Java EE Managed Beans, EJB (session) beans etc. 131 more words

Java EE

How to Receive a Message from OpenStack Zaqar with JAX-RS

import static java.lang.System.out;
 
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
 
public final class OpenStackSample {

  public static void main(final String[] args) {
    final Client client = ClientBuilder.newClient();

    final MultivalueMap<String, Object> headers = new MultivaluedHashMap<String, Object>();

    headers.put("Client-ID", ...);

    headers.put("X-Auth-Token", ...);

    headers.put("X-Project-Id", ...);
 
    final Response res = client.target("http://localhost:8888/v1.1/queues/SampleQueue/claims").request().header(headers).post(Entity.json(""), MediaType.APPLICATION_JSON_TYPE);

    out.println(res.readEntity(String.class));
 
    client.close();
  }
 
}
Software

How to Send a Message to OpenStack Zaqar with JAX-RS

import static java.lang.System.out;
 
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
 
public final class OpenStackSample {

  public static void main(final String[] args) {
    final Client client = ClientBuilder.newClient();

    final MultivaluedMap<String, Object> headers = new MultivaluedHashMap<String, Object>();

    headers.put("Client-ID", ...);

    headers.put("X-Auth-Token", ...);

    headers.put("X-Project-Id", ...);
 
    final Response res = client.target("http://localhost:8888/v1.1/queues/SampleQueue/messages").request().headers(headers).post(Entity.json("{\"messages\": [{\"body\": \"Simples Assim\"}]}", MediaType.APPLICATION_JSON_TYPE));

    out.println(res.readEntity(String.class));
 
    client.close();
  }
 
}
Software

Databases for Java EE DAO integration testing

A good Agile approach in development is to do as much development unit testing as possible.

For Java EE unit testing you can use for example Arquillian to write your Junit 4 unit tests and make use of Java EE features like Dependency Injection. 358 more words

Java

Java EE 7 application servers

It looks that from all Java EE 7 application servers, JBoss Wildfly 8.x has the fastest start:

o-java-ee-7-application-servers-where-art-thou

Java

Building the JCache Java EE 8 bridge.. one brick at a time

Let’s quickly look at the Java EE 8-JCache bridge project. This is another concrete step as far as Java EE 8 integration efforts are concerned.. 325 more words

Java EE