Tuesday, 17 August 2010

Different JSON formats

Found the following examples of different JSON formats here.
@XmlRootElement

public static class SimpleJaxbBean 
{

   public String name = "Franz";

   public String surname = "Kafka";

}
XML output:
<simpleJaxbBean>
  <name>Franz</name>
  <surname>Kafka</surname>
</simpleJaxbBean>
Badgerfish format:
{"simpleJaxbBean":{"name":{"$":"Franz"},
"surname":{"$":"Kafka"}}}
Mapped format (Jettison):
{"simpleJaxbBean":{"name":"Franz",
"surname":"Kafka"}}
and finally Jersey default format:
{"name":"Franz",
"surname":"Kafka"}

Monday, 16 August 2010

Installing And Configuring Glassfish on Linux

Installing and configuratin of Glassfish is fairly straightforward if you have some kind of package manager. And who hasn't nowadays?

However, after that the following points come forward:
  • put the logging in /glassfishv3/glassfish/domains/domain1/config/logging.properties in the proper sequence (most detailed first) otherwise, a previous entry may remove the settings of a more specific next entry.