GlassFish 4.0 released

GlassFish 4.0, the reference implementation and therefore the first application server for Java EE 7, has been released. The release was announced on Monday 06/11/2013 on the new and overworked website.

The site was launched obviously too early: at launch time, there was no NetBeans 7.3.1. with Java EE 7 support available, although it was linked on the IDE support page, and there was no Glassfish download on the Oracle Technology Network.

A new Java EE 7 example named “Your first Cup” using Glassfish 4.0 can be found here.

Veröffentlicht unter Java EE, Java Runtimes - VM, Appserver & Cloud | Verschlagwortet mit , , , , | Hinterlasse einen Kommentar

Using the context path of a web-app as log filename with Log4J

If you have a web application which you want to deploy more than once to a single servlet container you have the problem of separating your log files for the different web app instances. This is because the log configuration file is located in your WAR-file and it is not easy to change this file during the build process.

But there is a simple way of defining the log filename based on the context path of your web application. Simply set the contextPath as a system property in a ServletContextListener:

public class ContextDependentInitializer implements ServletContextListener {
	public void contextInitialized(ServletContextEvent event) {
		ServletContext context = event.getServletContext();
		String contextPath = context.getContextPath();
		System.setProperty("contextPath", contextPath);
	}
}

After that you have to declare the listener in your web.xml as follows:

<web-app>	
	<listener>
		<listener-class>de.oio.logging.ContextDependentInitializer</listener-class>
	</listener>
</web-app>

Then you are able to use the context path name to define the log filename in your Log4J configuration file. For example:

log4j.appender.LOG.file=${catalina.base}/logs/${contextPath}.log
Veröffentlicht unter Build, config and deploy | Verschlagwortet mit , , | Hinterlasse einen Kommentar

JPA 2.0 Criteria API – Join How To

Das JPA-Criteria API ermöglicht eine standardisierte und typsichere Erstellung von objektorientierten Abfragen in Java. Im folgenden soll die Umsetzung einer Join-Abfrage mit Hilfe der Criteria API etwas näher erläutert werden. Ausgangspunkt ist ein Beispiel einer unidirektionalen 1->n Beziehung zwischen zwei Entitätsklassen Person und Adresse. Eine einfache Verknüpfung dieser beiden Entitäten kann auf Basis der JPAQL untypisiert wie folgt ermittelt werden:

select p from Person p join p.adresses

Um die gleiche Join-Query durch das Criteria-API zu formulieren, ist folgende Objekthierarchie zu benutzen. Weiterlesen

Veröffentlicht unter Java EE, Java Persistence | Verschlagwortet mit , , | Hinterlasse einen Kommentar

Confluence Editor: Probleme mit Chrome 27

Der Chrome Browser zeigt in der aktuellen Version 27 den Confluence RichTextEditor nicht korrekt an: Es sind nur wenige Zeilen zu sehen und der Rest der Seite ist leer.

Das betrifft alle Confluence von 4.0 bis 5.1.3.

Mögliche Lösungen sind hier ausführlich beschrieben: Lösung: Confluence-Editor wird in Chrome 27 falsch dargestellt

Eine Anmerkung noch zu der CSS-Anpassung: Diese funktioniert nur dann, wenn in den einzelnen Bereichen kein anderes Layout (z.B. Dokumentation Theme) verwendet wird.
D.h., die CSS Formatierung muss zusätzlich in allen Bereichen vorgenommen werden, die nicht das global definierte Layout verwenden.

Veröffentlicht unter Atlassian Tools | Verschlagwortet mit , , , | Hinterlasse einen Kommentar

How to connect jprofiler with tomcat 7.0.27 running on IBM J9 64-Bit JDK(Linux)

Having trouble with performance and scalability issues is not so uncommon in my working environment as it should be. That is a shame – but there are a lot of pretty tools out there in this java developer world, that can rescue my reputation as a hardworking and serious software craftsman. (The sole existence of such tools gives me the impression that there must be other performance and scalability idiots out there in java world)
Weiterlesen

Veröffentlicht unter Java Runtimes - VM, Appserver & Cloud | Verschlagwortet mit , , , , , | Hinterlasse einen Kommentar

Vorsicht bei der Installation von Scaffolding- UND Reporting-Plugin in Confluence

Das Confluence Plugin Scaffolding der Firma CustomWare ist ein geniales Werzeug um formularbasierte Confluence Seiten zu erstellen. Im Gegensatz zu den Standard-Vorlagen  bleiben diese Seiten sogar “auf ewig” im Formularmodus.

Bei den speziellen “Live-Templates” bewirken Änderung an der Vorlage sogar noch nachträgliche Änderungen an den bereits erstellten Seiten.

Ein weiteres Feature von Scaffolding ist das “Vermetadaten” aller eingegebenen Informationen. Diese lassen sich dann über das Reporting-Plugin vom selben Hersteller zu beliebigen Informations-Übersichten zusammenstellen.

Und jetzt bitte Vorsicht:
Bei der Installation des Reporting-Plugins kommt es jedoch zu Fehlermeldungen auf allen Scaffolding-Seiten und ein Bearbeiten war ebenfalls nicht mehr möglich.
Eine kurze Recherche hat ergeben:
Das Aktivieren des Reporting-Plugins mittels Lizenz-Upload “zerstört” Scaffolding.
Eine händische Neuinstallation von Scaffolding behebt das Problem.

Hier habe ich die Information gefunden: Installation of Reporting plugin breaks Scaffolding

Veröffentlicht unter Atlassian Tools | Verschlagwortet mit , , , | Hinterlasse einen Kommentar

Atlassian releases JIRA 6

Atlassian just released JIRA 6 with a bunch of new features besides a new and simplified style. You can get a quick overview by visiting the “what’s new” pages or have a deeper look at the full release notes. In summary, JIRA 6 is about:

  • simpler and smarter style with automatic look and feel based on your logo
  • support for mobile devices
  • ease of use and efficiency (e.g. detail view of issues besides the filter result you came from)
  • many improvements for the administration (sharing of workflows, renaming usernames, …)

You can see JIRA 6 in action by visiting Atlassian’s public JIRA instance.

For plugin developers, JIRA 6 is a big change, but the “Preparing for JIRA 6.0″ guide will help you to make the necessary changes.

Veröffentlicht unter Atlassian Tools | Verschlagwortet mit , , , | Hinterlasse einen Kommentar