AMIS Oracle and Java Blog » Wouter van Reeven https://technology.amis.nl Friends of Oracle and Java Fri, 03 Jul 2015 10:51:23 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.2 Getting started with PrimeFaces on GlassFish v3 https://technology.amis.nl/2010/01/07/getting-started-with-primefaces-on-glassfish-v3/ https://technology.amis.nl/2010/01/07/getting-started-with-primefaces-on-glassfish-v3/#comments Wed, 06 Jan 2010 23:38:46 +0000 http://technology.amis.nl/blog/?p=6817 Share this on .. According to the PrimeFaces website, “PrimeFaces is an open source component suite for Java Server Faces featuring 70+ Ajax powered rich set of JSF components. Additional TouchFaces module features a UI kit for developing mobile web applications.“. Since it is an OpenSource JSF implementation that is very close to releasing JSF [...]

The post Getting started with PrimeFaces on GlassFish v3 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

According to the PrimeFaces website, “PrimeFaces is an open source component suite for Java Server Faces featuring 70+ Ajax powered rich set of JSF components. Additional TouchFaces module features a UI kit for developing mobile web applications.“. Since it is an OpenSource JSF implementation that is very close to releasing JSF 2.0 compliant components, I figured it was time to try it out on GlassFish v3.

A very easy and powerful way of creating Java EE 6 compliant applications, is to use NetBeans 6.8, which comes with great GlassFish v3 and Maven support. The first thing to do is to create a new Maven Web Application. The wizard that helps you create it allows you to specify the Java EE version, which in this case should be 6. In order to make sure the PrimeFaces libraries are included in your project, add the next dependency to your pom.xml file

<dependency>
 <groupId>org.primefaces</groupId>
 <artifactId>primefaces</artifactId>
 <version>2.0.0.RC</version>
</dependency>

Since the PrimeFaces jars are hosted on the PrimeFaces Maven repository, you’ll need to add the repository as well:

<repository>
 <id>prime-repo</id>
 <name>Prime Technology Maven Repository</name>
 <url>http://repository.prime.com.tr/</url>
 <layout>default</layout>
</repository>

PrimeFaces makes use of a servlet to get hold of resources, like css and JavaScript. Therefore, you need to register the Resource Servlet in web.xml like this

<servlet>
 <servlet-name>Resource Servlet</servlet-name>
 <servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
 <servlet-name>Resource Servlet</servlet-name>
 <url-pattern>/primefaces_resource/*</url-pattern>
</servlet-mapping>

A split pane

A simple index.xhtml file with a split pane may then look like this

<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:p="http://primefaces.prime.com.tr/ui">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>PrimeFaces Test</title>
   <p:resources />
  </head>
  <body>
   <p>
    <p:layout style="width:400px;height:200px;">
     <p:layoutUnit position="west" size="100">Left Pane</p:layoutUnit>
     <p:layoutUnit position="center">Right Pane</p:layoutUnit>
    </p:layout>
   </p>
  </body>
 </html>

which looks like this

The left bar is the one being dragged by the mouse.

File upload

Another nice PrimeFaces component is the fileUpload component. It supports single and multiple file uploads. To be able to use the fileUpload component, a few Apache Commons dependencies need to be added:

<dependency>
 <groupId>commons-fileupload</groupId>
 <artifactId>commons-fileupload</artifactId>
 <version>1.2.1</version>
</dependency>
<dependency>
 <groupId>org.apache.commons</groupId>
 <artifactId>commons-io</artifactId>
 <version>1.3.2</version>
</dependency>

Next, a filter needs to be added to web.xml and the JavaServer Faces state saving method should be set to server. So, add these lines to web.xml

<context-param>
 <param-name>javax.faces.PROJECT_STAGE</param-name>
 <param-value>Development</param-value>
</context-param>
<context-param>
 <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
 <param-value>server</param-value>
</context-param>
<filter>
 <filter-name>PrimeFaces FileUpload Filter</filter-name>
 <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
 <init-param>
  <param-name>thresholdSize</param-name>
  <param-value>51200</param-value>
 </init-param>
 <init-param>
  <param-name>uploadDirectory</param-name>
  <param-value>/tmp</param-value>
 </init-param>
</filter>
<filter-mapping>
 <filter-name>PrimeFaces FileUpload Filter</filter-name>
 <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

Then a JSF ManagedBean is needed to handle the file uploads. A very simple one, that doesn’t do anything with the uploaded files at all, may look like this

@ManagedBean(name = "fileUploadController")
@RequestScoped
public class FileUploadController implements FileUploadListener {
 @Override
 public void processFileUpload(FileUploadEvent event) throws AbortProcessingException {
  System.out.println("Uploaded: " + event.getFile().getFileName());
  FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");
  FacesContext.getCurrentInstance().addMessage(null, msg);
 }
}

Finally, change index.xhtml to this

<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:p="http://primefaces.prime.com.tr/ui">
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
   <title>PrimeFaces Test</title>
   <p:resources />
  </head>
  <body>
   <p>
    <h:form id="form" enctype="multipart/form-data" prependId="false">
     <p:growl id="messages" />
     <p:layout style="width:400px;height:200px;">
      <p:layoutUnit position="west" size="100">Left Pane</p:layoutUnit>
      <p:layoutUnit position="center">Right Pane</p:layoutUnit>
     </p:layout>
     <p:fileUpload fileUploadListener="#{fileUploadController.processFileUpload}" id="documentToUpload"
                   allowTypes="*.jpg;*.png;*.gif;" description="Images" update="messages"/>
    </h:form>
   </p>
  </body>
 </html>

Redeploy and the result looks like this

Conclusion

It is quite easy to get started with PrimeFaces using Maven and GlassFish. Please bear in mind that the fileUpload component is quite picky concerning the order in which the filters are specified in web.xml in case there is more than one. Please see this forum thread for more info.

In case you’re having troubles following the instructions in this blog, here is my NetBeans project. Since it is a Maven project you should be able to open it in Eclipse or any other IDE.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Getting started with PrimeFaces on GlassFish v3 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2010/01/07/getting-started-with-primefaces-on-glassfish-v3/feed/ 15
Java EE 6 and GlassFish 3.0 released! https://technology.amis.nl/2009/12/10/glassfish-30-released/ https://technology.amis.nl/2009/12/10/glassfish-30-released/#comments Thu, 10 Dec 2009 13:59:41 +0000 http://technology.amis.nl/blog/?p=6645 Share this on .. In the past few month several Java EE 6 related JSRs (Java Specification Requests) have been finalized. The final ballot for them ended on November 30 and all were approved. Today, December 10, 2009, Java EE 6 and GlassFish v3, THE reference implementation of Java EE6, are released.   Four and [...]

The post Java EE 6 and GlassFish 3.0 released! appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

In the past few month several Java EE 6 related JSRs (Java Specification Requests) have been finalized. The final ballot for them ended on November 30 and all were approved. Today, December 10, 2009, Java EE 6 and GlassFish v3, THE reference implementation of Java EE6, are released.

 

Four and a half year after the release of Java EE 5 we enter the next Java EE era. GlassFish v3 is the first application server that fully supports all Java EE 6 technologies. The list of supported technologies includes, but is not limited, by

  • Servlet 3.0
  • JSF 2.0
  • WebBeans
  • CDI (Contexts and Dependency Injection)
  • Bean Validation
  • EJB 3.1
  • JPA 2.0
  • JAX-RS

GlassFish v3 can be downloaded in two flavours. The first one contains all of the Java EE 6 technologies, the second one contains all technologies that are specified in the Java EE 6 Web Profile specification.

If there was only one GlassFish v3/Java EE 6 thing I’d like to mention then it would be that Java EE has become more powerful than ever before. Now we can do with annotations instead of XML configuration, we can do without ear files because war files are sufficient, Ajax has been standardized, and asynchronous calls are supported all the way from the client almost down to the database. And now you can do all that with GlassFish v3. A reason to celebrate? You bet it is!

 

For those wanting to know all there is to know about GlassFish v3, please attend the Virtual Conference on December 15. For more info, see the conference flyer. You may also want to visit the GlassFish Community Home-page and the GlassFish Enterprise Home-page (should be live any moment now). Finally, you can download the Java EE 6 SDK and find even more info at the Java EE 6 homepage.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Java EE 6 and GlassFish 3.0 released! appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/12/10/glassfish-30-released/feed/ 1
Migrating your web applications from JEE5 to JEE6 https://technology.amis.nl/2009/11/15/migrating-your-web-applications-from-jee5-to-jee6/ https://technology.amis.nl/2009/11/15/migrating-your-web-applications-from-jee5-to-jee6/#comments Sun, 15 Nov 2009 16:05:04 +0000 http://technology.amis.nl/blog/?p=6539 Share this on .. On Wednesday, November 11, the Netherlands Java Users Group (NL-JUG) organized the JFall 2009 Java conference. At the conference I had the pleasure of doing a presentation with a live demo about what steps can be taken to migrate an existing JEE5 web application to JEE6. The application ran on GlassFish [...]

The post Migrating your web applications from JEE5 to JEE6 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

On Wednesday, November 11, the Netherlands Java Users Group (NL-JUG) organized the JFall 2009 Java conference. At the conference I had the pleasure of doing a presentation with a live demo about what steps can be taken to migrate an existing JEE5 web application to JEE6. The application ran on GlassFish v2 and I migrated it to GlassFish v3 using NetBeans 6.8 Beta. This article describes my experiences with GlassFish v3 and NetBeans 6.8 Beta and it explains what steps I took to migrate from JEE5 to JEE6.

The demo application

The application I used for the presentation is a simple web application I wrote. It displays the contents of an astronomical database called the SAC (Saguaro Astronomy Club) database. The database contains over 10,000 so called Deep Sky Objects. These are objetcs in space outside our solar system that are not stars, e.g. gaseous nebulae, star clusters and galaxies.

Screen shot of the demo application.

From left to right columns are shown for the name and aleternate name of the object, it's position in the sky (R.A. = Right Ascension, dec = Declination) and its brightness (Magnitude). On the top of the table select boxes are shown that allows the user to filter the data. At the bottom of the page is a button to add a new object.

The application was built using NetBeans 6.7.1 on top of GlassFish v2. The pages are JSP pages with JSF tags in them. There is a JSF Managed Bean that communicates with a Local Session Bean. The Local Session Bean, finally, uses TopLink Essentials JPA to communicate with the database.

Both the Object Type (Star Cluster, Nebula, Galaxy etc.) and the Constellation of a Deep Sky Object are stored in separate tables and are connected to the Deep Sky Object by means of OneToMany associations. In order to deal correctly with these associations, I introduced two Converters. One Converter converts a Constellation to a String and back, the other does that for a DeepSkyType.

First steps to migrate to JEE6

During the presentation I showed what steps were needed to run the application on GlassFish v3. The short answer is: none! JEE6 is fully backward compatible with JEE5. Simply deploying the EAR on GlassFish v3 did the trick. However, since I wanted to use some new features of JEE6 in my application, I had to migrate parts of my application to JEE6.

First of all, TopLink Essentials no longer is used in GlassFish v3 as JPA layer. The reference implementation of JPA 2.0 is called EclipseLink. This essentially is an open source version of TopLink. The EclipseLink project is hosted under the Eclipse foundation and that is why TopLink was renamed to EclipseLink. Secondly, JSP no longer is the default view layer in JEE6. It has been replaced with Facelets. Facelets has been available for JEE5 for a long time now. Using the final build version of Facelets (version 1.1.14) would have worked on GlassFish v2. However, it does NOT work on GlassFish v3. The reason is that Facelets now is incorporated in JSF 2.0 while it was a separate technology with JSF 1.2. So, in order to migrate to Facelets, I had to migrate to JSF 2.0 as well.

The steps that were necessary to do so were

  • create xhtml files for each jsp file, copy the contents over and make sure they are proper xhtml files
  • modify faces-config: make sure the version used is 2.0 instead of 1.2 and also make sure all references to jsp files are replaced by xhtml files
  • modify web.xml and make sure to configure it to use Facelets.

The last step means adding this bit to web.xml

<!-- Facelets pages will use the .xhtml extension -->
<context-param>
    <param-name>javax.faces.FACELETS_VIEW_MAPPINGS</param-name>
    <param-value>*.xhtml</param-value>
</context-param>

Deploying the new EAR file showed the application to be working ok.

Introducing JEE6 stuff

In JEE5 an application with both a web part (in a WAR) and an EJB part (in a JAR) needed to be deployed in an EAR (WAR + JAR) file. One of the changes that comes with JEE6 is that EAR files no longer are needed. Now it suffices to have a WAR that contains both the web part and the EJB part. There are two ways to accomplish this. One way is to add all EJB classes in a separate JAR and place that in the lib dir within WEB-INF. Another way is to have all EJB classes in the same class structure as the web classes (Managed Beans, Converters etc.) and deploy all of it in a single WAR. I chose the latter way.

To do so, I created a new Web Application project in NetBeans 6.8 Beta and chose JEE6 as Java EE version.


Then I copied over all pages, sources, style sheets and configuration files to the new project. Undeploying the old project and deploying the new showed the new application to work totally fine.

The next step was to get rid of faces-config.xml. In JSF 2.0 it is no longer necessary to define all Managed Bean and Converters in faces-config. Instead, they can be annotated with the @ManagedBean and @FacesConverter annotations. Navigation is implicidly done depending of the outcome of an Action. I, for instance, the addAction returns a String "add", then JSF will try to find the view named "add" and navigate to it. In my case it means that JSF will navigate to add.xhtml to add a new Deep Sky Object to the database.

Without any content in faces-config, the file may be deleted. Doing so, however, resulted in a FileNotFoundException thrown by GlassFish over and over again. The bug that was reported for this already has been resolved.

Finally, I was able to show the functionality of the Bean Validation framework. This new JEE specification looks a lot like the Hibernate Validation framework. There are annotations like @NotNull, @Size, @Min, @Max, @DecimalMin, @DecimalMax and @Pattern to validate the data in, e.g., Entity classes before they are persisted in the database. One thing to be aware of is that @NotNull doesn't really work on String members. The reason is, that JSF will always submit an empty String in a form and "" != null! So beware to use the @Size annotation on String members.

Stuff prepared but not shown

Regrettably time went rather quickly during the presentation. I had prepared a fair bit about the new Metamodel and Criteria APIs in JPA 2.0 but I didn't have enough time to show more of it that just a quick code example. This was the only part of my preparations in which I encountered incomplete APIs. According to the Proposed Final Draft of the JPA 2.0 specifications there should be a @TypeSafeMetamodel annotation that indicates that a class is a Metamodel class for an Entity. The annotation, however, doesn't exist in the current version of EclipseLink 2. Apart form that I found the example code in the JPA 2.0 specification to slightly differ from the implementation in EclipseLink. With some puzzling, however, I was able to create a working example of the Criteria API. That is very good news indeed. A few months ago we hosted a session on JPA 2.0 at AMIS and then the Criteria API wasn't even available yet.

Conclusions

All in all I am very much impressed by the state of the reference implementationsof the forthcoming JEE specs. I hardly encountered any problems at all. If I encountered a problem, like one I had with my Converters suddenly stopping working when I switched to JSF 2.0, it turned out to be an error in my code. Both NetBeans 6.8 Beta and GlassFish v3 proved to be very stable and very pleasant to work with. If you have a chance to check out JEE6 stuff, I suggest you do it now!

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Migrating your web applications from JEE5 to JEE6 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/11/15/migrating-your-web-applications-from-jee5-to-jee6/feed/ 1
Making GlassFish v3 available using Apache2 and mod_jk https://technology.amis.nl/2009/08/14/making-glassfish-v3-available-using-apache2-and-mod_jk/ https://technology.amis.nl/2009/08/14/making-glassfish-v3-available-using-apache2-and-mod_jk/#comments Fri, 14 Aug 2009 09:55:23 +0000 http://technology.amis.nl/blog/?p=5973 Share this on .. The upcoming release of JEE 6 means that the next release of GlassFish, version 3, still is under development. However, it is stable enough to try out many features of JEE 6 already. apart from support for JEE 6, the integration with mod_jk has significantly improved recently. Earlier this week I [...]

The post Making GlassFish v3 available using Apache2 and mod_jk appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The upcoming release of JEE 6 means that the next release of GlassFish, version 3, still is under development. However, it is stable enough to try out many features of JEE 6 already. apart from support for JEE 6, the integration with mod_jk has significantly improved recently. Earlier this week I followed the steps in this blog of Amy Roh to make GlassFish v3 available on port 80 using Apache2 and mod_jk. The steps described here are for Debian Lenny, but may equally well be followed for other Linux distributions or Windows.

Installing and configure Apache2 and mod_jk

Let’s start with installing Apache2 and mod_jk. On Debian Lenny, mod_jk is dependend on apache2-mpm. Fortunately, both apt-get and dselect will resolve all dependencies for you if you select mod_jk, so install everything you need for instance with

apt-get install libapache2-mod-jk

Installing mod_jk this way will ensure that the mod_jk module is enabled for Apache2. You can check and verify that with

$ ls -l /etc/apache2/mods-enabled/jk.load
lrwxrwxrwx 1 root root 25 2009-08-12 14:18 /etc/apache2/mods-enabled/jk.load -> ../mods-available/jk.load

In case the module is missing from the monds-enabled directory, you can enable it with

a2enmod jk

Once everything is installed you need to configure Apache and mod_jk. To keep my installation clean I created a directory called jk under the Apache2 config directory /etc/apache2. In this directory I placed my workers.properties file, which reads

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

A minimum workers.properteis file should have worker.list, worker.worker1.type, worker.worker1.host and worker.worker1.port. That’s all for mod_jk.

As for Apache2, I had to do two things. first of all, I needed to add the configuration settings to enable mod_jk in the Apache2 httpd.conf file. On Debian, however, this file is empty and apache2.conf is used instead. This file gets overwritten when you upgrade Apache2, so the best way to include the mod_jk config is to create a new file under the /etc/apach2/conf.d directory and put everything in there.

So I created a file called /etc/apache2/conf.d/jk and put this in there:

# Where to find workers.properties
JkWorkersFile /etc/apache2/jk/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache2/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Locattion of shm file
JkShmFile /etc/apache2/jk/jk.shm

The only other thing to do is to specify which URL paths should be redirected to mod_jk. Debian by default uses Virtual Hosts and Apache2 requires that each Virtual Host has their own settings for which URL path to redirect. So I added these lines to /etc/apache2/sites-enabled/default within the <VirtualHost></VirtualHost> tags:

# Send everything for context /examples to worker named worker1 (ajp13)
JkMount /GFTest/* worker1

That’s it for Apache2.

Installing and configuring GlassFish v3

GlassFish v3 can be downloaded from this URL. I used promoted build 57 (which probably will be the next preview release) but build 53 or later will do. Since I set up everything on a server with no graphical UI I downloaded the zip, but the Windows or UNIX/Linux installer will also do. I unzipped the zip in /usr/local/glassfish.

After starting up GlassFish with

/usr/local/glassfish/glassfihv3/bin/asadmin start-domain

I had to create an HTTP listeren on port 8009 and enable jk on it. This can be done with these two commands

asadmin create-http-listener --listenerport 8009 --listeneraddress 0.0.0.0 --defaultvs server jk-connector
asadmin set configs.config.server-config.network-config.network-listeners.network-listener.jk-connector.jk-enabled=true

Running a netstat afterwards to see if port 8009 was up revealed … no port 8009! The reason is that GlassFish v3 is OSGi enabled and only will start the Web container if a web application is deployed. So, I deployed a test application and port 8009 was taken as well! The result shows a count of rows in a table in my database displayed in a JSF 2.0 page based on this blog by Ed Burns (hence the similar text and colors):

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Making GlassFish v3 available using Apache2 and mod_jk appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/08/14/making-glassfish-v3-available-using-apache2-and-mod_jk/feed/ 2
More impressions of JavaOne 2009 https://technology.amis.nl/2009/06/14/more-impressions-of-javaone-2009/ https://technology.amis.nl/2009/06/14/more-impressions-of-javaone-2009/#comments Sun, 14 Jun 2009 14:41:42 +0000 http://technology.amis.nl/blog/?p=5583 Share this on .. Like my colleague Lucas I attended JavaOne 2009. This post will describe my impressions of JavaOne 2009. The event turned out to be a mix of great things. I attended loads of great sessions, I met many great people and I had an awesome time in San Francisco. By the way, [...]

The post More impressions of JavaOne 2009 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

Like my colleague Lucas I attended JavaOne 2009. This post will describe my impressions of JavaOne 2009. The event turned out to be a mix of great things. I attended loads of great sessions, I met many great people and I had an awesome time in San Francisco.

By the way, did you already hear of our upcoming session "Our JavaOne report" that we will hold on Tuesday, June 16 at Amis? For more info and how to register see this link.

Pardon me for that shameless plug. Please read on for the rest of the article

Great sessions

Most of the sessions I attended were about JEE 5 and JEE 6. The JEE 5 ones were about performance optimizing existing code. I attended a session about optimizing JPA which provided some great tips and tricks for optimizing the JPA layer of your app. I didn’t learn many new things there, which indicates that my knowledge about this topic is quite accurate. Another performance session I attended was about optimizing Ajax requests and page loads. This one turned out to be quite informative with a few very nice tips. Some of them are

– dereference JavaScript variables when you leave a page to free up memory
– break up variable calls like divs[i].style.color into separate variables. Apparently that’s a LOT faster!
– make fewer HTTP requests, e.g. by combining small images into one larger an and only display that image partly
– put stylesheets in the HEAD and JavaScript at the bootom of a page

Apart form these JEE 5 sessions I attended quite a few JEE 6 sessions. One session deeply dove into using EJB 3.1 Embeddable containers in JSE apps. The embeddalble EJB container will be part of the EJB 3.1 spec so it’s good to know about it.

Then there was a "Meet the JPA Expert Group session" which turned out to be very nice. Linda DeMichiels let the audience ask questions and when we ran out of them, she started asking questions at us! Anyone who’s sceptic about expert groups not listening to the community should have attended that session. I have never been sceptic about that, and the session has proved me right.

The sessions AMIS hosted

This year AMIS hosted no less than three sessions at JavaOne. Lucas presented about SaaS enabling JavaServer Faces applications. I got to present about FishCAT, the GlassFish Community Acceptance Test that I participate in, and about automatic integration testing web applications with Ant (or Maven), Selenium and TestNG. I didn’t attend Lucas’ session, but I got the impression that my sessions were received pretty well. Here’s an image of Lucas and I at JavaOne.

 Lucas and I at JavaOne 2009

Meeting great people

JavaOne typically is a conference where all kinds of people can be found. There are simple developers and end users like myself, which are most of the people. But there also are many developers of well known frameworks, like Seam, IceFaces, HtmlUnit etc. Then there are the Expert Group members : the great minds that participate in the Java Community Process (JCP) and that create the specifications for JPA, EJB, JSF and the like.

Since I presented the session on FishCAT at CommunityOne on Monday, I got to meet many of the people behind GlassFish. First and foremost the GlassFish Quality Team members, lead by Judy Tang whom I did my session with. And Adam Bien, who’s got a great blog on JEE and who also participates in FishCAT, was there too. Here’s an image of Judy, Homer, Adam and myself.

From right to left Adam, Homer, Judy and myself.

 

Then I got to meet Doug Clarke, who’s technical lead of EclipseLink. On July 7 we will host a session on JPA 2.0 at AMIS and I talked to Doug about that session. Doug kindly made his slides available for us and suggested I talk to Mike Keith for exercises. I did but unfortunately Mike didn’t have any JPA 2.0 exercises ready yet. I promised I will send him our exercises which we’ll do

Awesome time

In summary, JavaOne 2009 was great. I learned a lot and met many great people. If you never have been to JavaOne, please consider doing so. Well, that is if there’s another JavaOne next year. With the Sun acquisition of Oracle, which Lucas wrote about, anything may be possible. In any case, hope to see you at JavaOne next year!

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post More impressions of JavaOne 2009 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/06/14/more-impressions-of-javaone-2009/feed/ 0
RichFaces plugin for NetBeans updated https://technology.amis.nl/2009/04/12/richfaces-plugin-for-netbeans-updated/ https://technology.amis.nl/2009/04/12/richfaces-plugin-for-netbeans-updated/#comments Sun, 12 Apr 2009 12:49:57 +0000 http://technology.amis.nl/blog/?p=5216 Share this on .. About a year ago, during JavaOne 2008, Geertjan Wielenga and I created NetBeans modules for JBoss RichFaces support. Last week we updated the modules so now version 3.3.0.GA of RichFaces is supported. I updated the components palette with the newest a4j and rich tags. Geertjan introduced some new images for the [...]

The post RichFaces plugin for NetBeans updated appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

About a year ago, during JavaOne 2008, Geertjan Wielenga and I created NetBeans modules for JBoss RichFaces support. Last week we updated the modules so now version 3.3.0.GA of RichFaces is supported. I updated the components palette with the newest a4j and rich tags. Geertjan introduced some new images for the palette entries, which now look like this

Even better, Geertjan produced a quick start turorial. Check out Geertjans weblog article for where to download the modules.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post RichFaces plugin for NetBeans updated appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/04/12/richfaces-plugin-for-netbeans-updated/feed/ 0
Testing seam-gen in Seam 2.1.2-SNAPSHOT with GlassFish v2 https://technology.amis.nl/2009/03/31/testing-seam-gen-in-seam-212-snapshot-with-glassfish-v2/ https://technology.amis.nl/2009/03/31/testing-seam-gen-in-seam-212-snapshot-with-glassfish-v2/#comments Tue, 31 Mar 2009 19:33:20 +0000 http://technology.amis.nl/blog/?p=5168 Share this on .. On March 15 I read on The Aquarium that JBoss’ Dan Allen added JBoss AS 5 and GlassFish support to seam-gen. I had the pleasure to have met with Dan Allen at Devoxx 2008 (we hosted a BOFF on GlassFish and Seam) and there he already mentioned thinking about adding support [...]

The post Testing seam-gen in Seam 2.1.2-SNAPSHOT with GlassFish v2 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

On March 15 I read on The Aquarium that JBoss’ Dan Allen added JBoss AS 5 and GlassFish support to seam-gen. I had the pleasure to have met with Dan Allen at Devoxx 2008 (we hosted a BOFF on GlassFish and Seam) and there he already mentioned thinking about adding support for GlassFish to seam-gen. Tonight I downloaded Seam 2.1.2-SNAPSHOT and tried out the GlassFish support in seam-gen that Dan recently added.

My goal for this test was to find out how seam-gen can be used to generate the kind projects AMIS usually develops: web based applications that use an Oracle database underneath. Only now I would like to generate a project that can be deployed to GlassFish. So, I started seam-gen:

$ ./seam-gen

First check: specifying the GlassFish install directory

Call me hasty, a bad reader, impatient or just out of luck, but having read Dans blog article I had the impression that I could specify the GlassFish install directory in the questionaire presented by seam-gen. However, I was a bit disappointed to find out that I still need to provide a JBoss AS install dir. Reading Dans blog article more carefully provided me with the info I missed the first time: “As before, the seam-gen project build supports JBoss AS by default”“All of the targets that pertain to GlassFish reside in the file glassfish-build.xml at the root of the project”.OK, so I have to specify a JBoss AS home at seam-gen time and the I’ll be able to deploy to GlassFish once I am done generating? That’s definately cool and enough for me!

Next check: hibernate-gen

One of the first things I checked was if a nasty bug in hibernate-gen is still there. In the process of setting up your project, seam-gen uses hibernate-gen: the Hibernate generation tool that generates Entity classes based on database connection parameters. The older version I used a few months ago didn’t handle Oracle database schemas well. Instead of only generating Entity classes for the schema of the provided database user, it would scan the entire database and attempt to generate Entity classes for all database tables and views that it encountered. The workaround for it was to specify hibernate.default_schema in hibernate-console.properties and then generate the Entity classes.

Fortunately, even without specifying this parameter hibernate now does a great job. It simply scans the database schema for the provided user and that’s it. Excellent!

Managing GlassFish from within ant

As can be read in glassfish-readme.txt in the project home, GlassFish can be started, restarted and stopped using ant. Also, deploying, redeploying and undeploying projects and datasource definitions all can be done with ant. Pretty neat Dan! Unfortunately I am not a very exprienced ant user, so it took a while before I found out I had to specify the glassfish.home directory in the build.properties file. Once I did, I could start and stop GlassFish without any problems.

Despite the little annoyances described above so far I was *VERY* much impressed with the excellent job that seam-gen does! Remember: this is SNAPSHOT software and so far it has done a really great job! No crashes, no exceptions, no stack traces but only comprehensive messages on my screen whenever something wasn’t configuered correctly. So, here’s:

The final test: deploying my project to GlassFish

A project that uses JPA should, by GlassFish terms, be deployed as an EAR. However, by Seam standards it’s perfectly ok to deploy it as a WAR file. So, I followed the Seam standards and tried for the WAS option. Here I ran into a few problems.

Let me start by describing my efforts to deploy an exploded archive: this goes without any problems whatsoever! The ant script totally kicks ass at this task. It doesn’t need to first create an exploded archive (task: gf-stage) or deploy a datasource (task: gf-gf-deploy-datasource). If it needs to, it will do it by itself!

However, deploying a WAR file gave me quite a headache. The first error I encountered was

Deployment Error -- Could not resolve a persistence unit corresponding to the persistence-unit-ref-name [SeamGenTest/pu] in scope of the module called
[.../glassfish-v2ur2/domains/domain1/applications/j2ee-modules/SeamGenTest]. Please verify your application.

As it turns out, the build.xml script removes the persistence.xml file in case of a WAR file. However, deploying an exploded WAR goes fine, so it *HAS* a persistence.xml file. This seems inconsistent to me.

Apart from that I had to replace these variables in resources/WEB-INF/component.xml

@debug@
@jndiPattern@
@seamEmfRef@

with the values I found in the components.xml file in the exploded war directory. It looks like ant doesn’t succesfully replace these placeholders with their correct values. Once I did that, the WAR would deploy without any problems.

Conclusion

GlassFish support for seam-gen is getting there and looking very, very promising. A great big thanks to Dan Allen for working on this! I will send him my comments and I hope he will be able to resolve the issues I mentioned here.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Testing seam-gen in Seam 2.1.2-SNAPSHOT with GlassFish v2 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/03/31/testing-seam-gen-in-seam-212-snapshot-with-glassfish-v2/feed/ 4
Multi select in RichFaces trees https://technology.amis.nl/2009/01/29/multi-select-in-richfaces-trees/ https://technology.amis.nl/2009/01/29/multi-select-in-richfaces-trees/#comments Thu, 29 Jan 2009 19:46:14 +0000 http://technology.amis.nl/blog/?p=4710 Share this on .. In the past few months I have been involved in a development project where we are using Hibernate, Seam and RichFaces. One of the requirements of our customer is to have a hierarchical data structure represented in a tree structure. We found that the RichFaces rich:tree component meets all the requirements [...]

The post Multi select in RichFaces trees appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

In the past few months I have been involved in a development project where we are using Hibernate, Seam and RichFaces. One of the requirements of our customer is to have a hierarchical data structure represented in a tree structure. We found that the RichFaces rich:tree component meets all the requirements we have. Well, all but one: rich:tree is single select only, not multi select. Or is it?

Some theory behind the rich:tree component

The RichFaces rich:tree component is a component that can display hierachical data in two ways. The first way is to display a org.richfaces.model.TreeNode with its children. The RichFaces API also provides a default implementation of the org.richfaces.model.TreeNode interface, which is the org.richfaces.model.TreeNodeImpl class.

The second way is to use a RichFaces rich:recursiveTreeNodesAdaptor to display a java.util.List or array of any kind of object, as long as it has some member that holds a java.util.List or array of child objects. Due to some heavy preprocessing of the data that is displayed in the tree, along with us feeling more comfortable with java.util.List we choose this approach in our project. In this article I’ll use the first approach to show that our solution also works in this case.

Building a simple rich:tree

To be able to display a rich:tree in a JSF page, you need few simple classes. The first class I used is called SelectionBean and it looks like this

import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.model.TreeNode;
import org.richfaces.model.TreeNodeImpl;

public class SelectionBean {

    private TreeNode rootNode = new TreeNodeImpl();

    public SelectionBean() {
        TreeNodeImpl childNode = new TreeNodeImpl();
        childNode.setData("childNode");
        childNode.setParent(rootNode);
        rootNode.addChild("1", childNode);

        TreeNodeImpl childChildNode1 = new TreeNodeImpl();
        childChildNode1.setData("childChildNode1");
        childChildNode1.setParent(childNode);
        childNode.addChild("1.1", childChildNode1);

        TreeNodeImpl childChildNode2 = new TreeNodeImpl();
        childChildNode2.setData("childChildNode2");
        childChildNode2.setParent(childNode);
        childNode.addChild("1.2", childChildNode2);
    }

    public void processTreeNodeImplSelection(final NodeSelectedEvent event) {
        System.out.println("Node selected : " + event);
    }

    public TreeNode getRootNode() {
        return rootNode;
    }
}

It creates a simple TreeNode hierarchy that can be displayed in a tree with the following Facelets JSF page:

&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"&gt;
    &lt;body&gt;
        &lt;h:form id="main"&gt;
            &lt;a4j:outputPanel ajaxRendered="true"&gt;
                &lt;rich:panel id="treePanel"&gt;
                    &lt;f:facet name="header"&gt;Tree&lt;/f:facet&gt;
                    &lt;rich:tree id="tree" ajaxSubmitSelection="true" switchType="ajax" value="#{selectionBean.rootNode}" var="node"&gt;
                        &lt;rich:treeNode&gt;
                            &lt;h:outputText value="#{node}"/&gt;
                        &lt;/rich:treeNode&gt;
                    &lt;/rich:tree&gt;
                &lt;/rich:panel&gt;
            &lt;/a4j:outputPanel&gt;
        &lt;/h:form&gt;
    &lt;/body&gt;
&lt;/html&gt;

The result looks like this:

Quite simple, like I said.

Multi select in the rich:tree

The SelectionBean class has been prepared to catch node selection events. If you modify the rich:tree line in the Facelets JSF page to read like this

&lt;rich:tree id="tree" ajaxSubmitSelection="true" switchType="ajax"
    value="#{selectionBean.rootNode}" var="node"
    nodeSelectListener="#{selectionBean.processTreeNodeImplSelection}"&gt;

you should see selection events being registered in the log of your application server:

Node selected : org.richfaces.event.AjaxSelectedEvent[source=org.richfaces.component.html.HtmlTree@19eaa86]

Not very helpful information, but at least we know that the node selection events are registered. Now, if you look at the taglib doc for rich:tree you’ll notice that there is no way to configure the tree to accept multiple selections. So let’s modify the SelectionBean to keep track of node selections itself.

We’ll need some Set to hold the selected tree nodes in. We could use a List, but that will create doubles if we click a node more than one time. Remember, rich:tree has no way of knowing if a node recently was selected or not. So everytime we click a node that rich:tree thinks not to be selected, it raises a selection event again! We only want to know which nodes are clicked and keep track of that. we don’t want to know how many times a node is selected. So therefore a Set will do nicely.

There’s one more thing to a rich:tree. Its backing UIComponent is a org.richfaces.component.html.HtmlTree and in the TreeModel of that tree, each node is uniquely identified by a RowKey Object. So, I’ll use a

private Map&lt;Object, TreeNode&gt; selectedNodes = new HashMap&lt;Object, TreeNode&gt;();

Now, everytime a node is selected I’ll add its TreeNode to the Map under the RowKey key. Assuming we have a global Map member as defined above, the processTreeNodeImplSelection method can now be modified to

    public void processNodeSelection(final NodeSelectedEvent event) {
        HtmlTree tree = (HtmlTree)event.getComponent();
        Object rowKey = tree.getRowKey();
        TreeNode selectedNode = tree.getModelTreeNode(rowKey);
        selectedNodes.put(rowKey, selectedNode);
        for (Object curRowKey : selectedNodes.keySet()) {
            System.out.println("Selected node : " + selectedNodes.get(curRowKey).getData());
        }
    }

If you click the three nodes in the tree in some random order, you’ll get this output:

Selected node : childChildNode1
Selected node : childNode
Selected node : childChildNode2

So, we are keeping track of all selected nodes!

Making the selected nodes visible in the tree

Now our bean knows that we have selected multiple nodes, but the tree still displays only one selected node at a time. Using e.g. FireBug it’s easy to determine the difference is CSS class between a selected node and a non-selected node. Using the default Blue skin for RichFaces, a non-selected node has style class

dr-tree-h-text rich-tree-node-text

while a selected node has style class

dr-tree-h-text rich-tree-node-text dr-tree-i-sel rich-tree-node-selected

The border around a selected node is there because of the dr-tree-i-sel style. We only need a way to make all selected nodes (that is, the ones that are stored in the Map in our bean) use that style. One way is to tell each TreeNode that is has been selected. But how can we do that? Well, for instance by introducing a class that holds both the text that will be displayed in the tree as well as a Boolean that holds the selection state of the node. Such a class could be like this

public class NodeData {
    private String nodeText;

    private Boolean selected = Boolean.FALSE;

    public NodeData(String nodeText) {
        this.nodeText = nodeText;
    }

    [getters and setters]}

With this class we need to make a few changes to our SelectionBean. First of all, when building the node hierarchy we need to use the NodeData class instead of a simple String. This means we’ll have to modify the constructor method so it looks like this

    public SelectionBean() {
        TreeNodeImpl childNode = new TreeNodeImpl();
        childNode.setData(new NodeData("childNode"));
        childNode.setParent(rootNode);
        rootNode.addChild("1", childNode);
        TreeNodeImpl childChildNode1 = new TreeNodeImpl();
        childChildNode1.setData(new NodeData("childChildNode1"));
        childChildNode1.setParent(childNode);
        childNode.addChild("1.1", childChildNode1);
        TreeNodeImpl childChildNode2 = new TreeNodeImpl();
        childChildNode2.setData(new NodeData("childChildNode2"));
        childChildNode2.setParent(childNode);
        childNode.addChild("1.2", childChildNode2);
    }

Next, the processNodeSelection method needs to tell a node that it is selected by setting the selected Boolean in NodeData to true. The method becomes

    public void processNodeSelection(final NodeSelectedEvent event) {
        HtmlTree tree = (HtmlTree)event.getComponent();
        Object rowKey = tree.getRowKey();
        TreeNode selectedNode = tree.getModelTreeNode(rowKey);
        ((NodeData)selectedNode.getData()).setSelected(Boolean.TRUE);
        selectedNodes.put(rowKey, selectedNode);
        for (Object curRowKey : selectedNodes.keySet()) {
            System.out.println("Selected node : " + ((NodeData)selectedNodes.get(curRowKey).getData()).getNodeText());
        }
    }

Finally, we need to modify our Facelets JSF page in two ways. The first one is to make sure the h:outputText element displays the nodeText of the NodeData. The second modification is to have the rich:treeNode set it’s nodeClass accordingly to the selected NodeData Boolean. The Facelets JSF page lines look like this

&lt;rich:treeNode nodeClass="#{node.selected?'dr-tree-i-sel':''}"&gt;
    &lt;h:outputText value="#{node.nodeText}"/&gt;
&lt;/rich:treeNode&gt;

Now, if you reload the application in your browser, all of a sudden you can “select” multiple nodes in the tree.

Future enhancements

The above scenario isn’t ideal. First of all, now single selection of nodes doesn’t work anymore. To fix this, you may want to add a checkbox that toggles the selection state from single to multiple and back. Another issue is that accidentically selected nodes cannot be deselected anymore. The selection state checkbox may partially solve that, however. Once you select a node that you didn’t want to select, toggle the checkbox, select a single node, then toggle the checkbox again and start selecting multiple nodes once more. Another way would be to have another checkbox that allows you to deselect any selected node. Finally, users may want to hold a key, e.g. the CTRL key, and then start selecting multiple nodes. I haven’t got a clue how to do that, so if you know please drop me an email :-)

Ideally the RichFaces rich:tree would have native multiple selection support. Perhaps this post will actually make that possible.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Multi select in RichFaces trees appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2009/01/29/multi-select-in-richfaces-trees/feed/ 15
Devoxx 2008: The major announcements https://technology.amis.nl/2008/12/11/devoxx-2008-the-major-announcements/ https://technology.amis.nl/2008/12/11/devoxx-2008-the-major-announcements/#comments Thu, 11 Dec 2008 16:20:36 +0000 http://technology.amis.nl/blog/?p=4361 Share this on .. At the time I’m writing this, Devoxx 2008 is well into it’s second day. Day one was quite interesting, with the major announcement being the release of JavaFX 1.0 last week. Apart from that, IBM presented their RFID technology, which has been incorporated into our access badges. Day two held another [...]

The post Devoxx 2008: The major announcements appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

At the time I’m writing this, Devoxx 2008 is well into it’s second day. Day one was quite interesting, with the major announcement being the release of JavaFX 1.0 last week. Apart from that, IBM presented their RFID technology, which has been incorporated into our access badges. Day two held another major announcement: all of Java will be made modular. That means not only the SDK, but also the JRE and even the JVM. Expected release date of JDK 7: somewhere in 2010…
Back to day one. JavaFX is here! It was announced a week ago and of course it’s the biggest thing this year at Devoxx. Remarkably enough, only one non-keynote presentation was about JavaFX! Flex is there as are Ajax and JSF. So, despite the big announcement there still was a balance in the presentations.

For some reason a major topic this year is security. No less than three presentations dealt with this topic, of which I attended two. Mike Wiesner talked us through his extensive knowledge on the topic of security in his presentation entitled “Security Patterns Reveiled”. One of the tips that were reveiled is that the Secure Base Action (coming from the Core Security Patterns book) isn’t always the best solution. The problem lies in the fact that the SecureBaseAction class needs to be extended. In Java, only single inheritance is allowed, so extending the SecureBaseAction class would disable your class to extend another class. The solution lies in using Bean Validation which is described in JSR 303.

The second security related presentation I attended was “The thread is out there! XML threads and DataPower” by Bill Hines. Bill’s presentation started out with a great overview of possible hacks that can be performed using XML. The most striking example he showed was a perfectly valid piece of XML with recursive namespace definitions. The result was a browser rapidly consuming more and more memory which eventually would lead to hangning his laptop. Imagine this happening to your ESB… Unfortunately the presentation ended up in a sales pitch for several of IBM’s products, despite Bill ensuring us several times he’s not a slaes person.

Next Scala was up. Bill Venners talked us through “The Feel Of Scala” which presented Bills view on Scala explained in the context of ScalaTest, a unit test project for Scala. As it turns out, Scala appears to be a very flexible language with many nice features that Java doesn’t have. When I was at JavaOne earlier this year I heard some people predict Scala to be the next Java. Now I understand why they clamied that. We will definately have a Knowledge Center evening at AMIS about Scala!

The final presentation I attended at day one was “Modularity In Java Using OSGi” by Peter Kriens. Peter gave us an excellent high leven introduction in the principles and concepts behind OSGi. Explaining why and how OSGi was first developerd and how it eveolved from there proved to be an excellent way of providing us with insights of OSGi. My next action on this matter will be to actually have a look in how to code with OSGi.

The rest of the day was filled with JBoss and Seam. First, my colleague Alan and I attended a BOF (Birds Of a Feather) on Seam, Hibernate and JBoss Tools lead by Pete Muir, Max Anderson and Dan Allen. The BOF was a relaxed and jolly Q&A mostly about Seam and WebBeans. It was interesting to see that Seam is quite popular and that JBoss is working hard on WebBeans. Pete predicted an alpha version of WebBeans to be available this or next week.

After the BOF we checked in at our hotel and then went to a JBoss Meetup. The Benelux JBoss Users Group had organized one in Café au Lait (which translates to coffee with milk). Unfortunately, the JBoss presenters of the BOF arrived after Alan and I had left the café.

Day two

Day two started off with Joshua Bloch doing a little promotion of his new book, Effective Java Programming Language 2. Joshua presented a bunch of very interesting cases for which he showed us how to improve Java code that people generally write. The examples he gave included a mnemonic about generics. The mnemonic is PECS. I will take no credit for this useful mnemonic, so google for Joshua Bloch and PECS to find out what I’m talking about. Thanks again to Joshua for signing his book I bought for AMIS later that day.

After this Mark Reinold was one. His presentation was originally titled “Java SE 7 Updated” but was renamed to “Modularity in Java SE”. When I was at JavaPolis (now Devoxx) last year there was a huge discussion between the audience and Roberto Cinicci about a Java Modularity JSR (JSR 277) and OSGi. A year later, Mark Reinold told us that JSR 277 is no more. Instead, JSR 294 is alive now and dealing with modularity in Java. Mark explained why OSGi just isn’t enough: you’d want modularity in all of Java, so also in the JVM, JRE and SDK, and not just on top of it. However, there are still big debates going on about how this should be put into the Java language specs as we speak.

Mark went on to tell about JDK 7 features that may be expected. Big ones to be expected by Sun include Modularization, VM support for dynamic languages (JRS 292), NIO2 (JSR 203) and the Swing Application Framework (JSR 296). There will most probably also be smaller features to be expected by Sun. Apart from that, non-Sun features to be expected include Annotatons Of Java Types (JSR 308) and some concurrency updates on top of JSR 166. Mark also told us that there are some features that we may NOT erxpect in JDK 7, being Closures and Beans Binding (JSR 295). Expected release date of JDK 7: somewhere in 2010!

So, day two still goes on. I’ll write about it and day three in a few days.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Devoxx 2008: The major announcements appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/12/11/devoxx-2008-the-major-announcements/feed/ 0
JDeveloper 11g on Linux https://technology.amis.nl/2008/10/07/jdeveloper-11g-on-linux/ https://technology.amis.nl/2008/10/07/jdeveloper-11g-on-linux/#comments Tue, 07 Oct 2008 09:23:25 +0000 http://technology.amis.nl/blog/?p=3571 Share this on .. It has been awaited for a long time. But now it’s finally there: JDeveloper 11g! At the time of this writing (Tuesday, October 7, 11:20 AM CEST), only the Linux download works. Fortunately I run Debian on my laptop. Here’s some screenshots of the installation. First of all prove of the [...]

The post JDeveloper 11g on Linux appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

It has been awaited for a long time. But now it’s finally there: JDeveloper 11g! At the time of this writing (Tuesday, October 7, 11:20 AM CEST), only the Linux download works. Fortunately I run Debian on my laptop. Here’s some screenshots of the installation.

....

First of all prove of the fact that I have the latest installation file: WebLogic is included.

Installation in progress:

 

The new QuickStart screen

And finally, there it is:

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post JDeveloper 11g on Linux appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/10/07/jdeveloper-11g-on-linux/feed/ 6
Providing RichFaces support for NetBeans: learning it from the master https://technology.amis.nl/2008/06/13/providing-richfaces-support-for-netbeans-learning-it-from-the-master/ https://technology.amis.nl/2008/06/13/providing-richfaces-support-for-netbeans-learning-it-from-the-master/#comments Fri, 13 Jun 2008 14:57:58 +0000 http://technology.amis.nl/blog/?p=3209 Share this on .. Earlier this week, Geertjan Wielenga asked me if he could come and visit me to watch the Netherlands beat France in the soccer match on Friday, June 13. Of course I said yes! So, Geertjan is visiting me right now in our AMIS office in Nieuwegein. While he is here, he [...]

The post Providing RichFaces support for NetBeans: learning it from the master appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

Earlier this week, Geertjan Wielenga asked me if he could come and visit me to watch the Netherlands beat France in the soccer match on Friday, June 13. Of course I said yes! So, Geertjan is visiting me right now in our AMIS office in Nieuwegein. While he is here, he has guided me through the code of the NetBeans RichFaces Support project. Thanks to Geertjan I now have contributed my first code to this project. In the next few weeks/months we should be able to get drag and drop support for RichFaces components in NetBeans.

Thanks for helping me out here Geertjan! For the curious, please visit Geertjan’s blog to see his prediction of tonight’s soccer match. And yes, the happy guy on the photo is me  Here’s an image of Geertjan in our office.

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Providing RichFaces support for NetBeans: learning it from the master appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/06/13/providing-richfaces-support-for-netbeans-learning-it-from-the-master/feed/ 1
JavaOne 2008 LAB: Dynamic Service Composition with OpenESB and NetBeans https://technology.amis.nl/2008/05/12/javaone-2008-lab-dynamic-service-composition-with-openesb-and-netbeans/ https://technology.amis.nl/2008/05/12/javaone-2008-lab-dynamic-service-composition-with-openesb-and-netbeans/#comments Mon, 12 May 2008 18:17:28 +0000 http://technology.amis.nl/blog/?p=3165 Share this on .. Apart from sessions in which an overview of a certain topic is presented, JavaOne also had a few sessions in which the audience got the chance to actually do some work theirselves. These so called labs typically took up two hours in contrast to "normal" sessions that took up one hour. [...]

The post JavaOne 2008 LAB: Dynamic Service Composition with OpenESB and NetBeans appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

Apart from sessions in which an overview of a certain topic is presented, JavaOne also had a few sessions in which the audience got the chance to actually do some work theirselves. These so called labs typically took up two hours in contrast to "normal" sessions that took up one hour. I attended two of the labs. In this article I will tell you all about "Dynamic Service Composition with OpenESB" that took place on the third day of JavaOne.

....

Line out of the lab 

Tuhin Kumar and Rupesh Ramachandran, both Sun Microsystems, hosted the lab aided by several other people. The lab started with a presentation about the basics of SOA and BPEL as well as a short overview of OpenESB. The use case presented in the lab was a full-functioning JavaOne conference survey/poll application. The idea was that the audience would create a Composite Application that connects to an existing MySQL database to push the results of a small survey. The lab presenters already prepared a Petaho application that would retrieve the survey results out of the MySQL database and show them in a few plots. The survey could be submitted in two ways. The first way was using the built in Composite Application tester, the second way was a prepared web application that calls the Composite Application via a web service call.

Creating the BPEL application

The Sun folks already prepared the whole infrastructure to do the lab. This means they had installed a central MySQL database with a "javaonedb" database on it. On the lab machines NetBeans 6.1 and GlassFish v2 with OpenESB were already installed and configured. Everything was setup for us to get going. The first exercise was to build a BPEL module that would take all the answers to the survey and return success. The second exercise was to enhance the BPEL module to store all survey answers in the MySQL database. At the end of the first exercise, the BPEL module was loaded into a new Composite Application that can be deployed to GlassFish.

Unfortunately the lab was done on pre-installed machines in the lab room. So I had to recreate the BPEL module to be able to add a screenshot of it to this article. Fortunately a CD was made available with all labs on it so I was able to use the prepared WSDL document that defines the web service on which the BPEL process is built. This is what my BPEL process looks like 

A simple BPEL process in NetBeans

 

The process doesn’t do much yet. It only consumes the input that was passed on with the web service call to the javaOnePoll web service. The assign in between the receive and reply only returns a pre-defined string as can be seen in this image

 The assign activity.

However, this still is a valid BPEL process! And it will run in a JBI compliant esb, like OpenESB, if deployed correctly.

Deploying to OpenESB

The module I created above is a Service Unit. This is the smallest deployable unit for JBI containers. In order to deploy it, the Service Unit must be encapsulated in a Service Assembly. Basically, a Service Assembly is a zip file containing Service Units and a deployment descriptor. In NetBeans, such a Service Unit is also refered to as a Composite Application or as a Composite Application Service Assemble (a.k.a. CASA or C.A.S.A.). So, the steps to deploy the BPEL process created a bove is to create a CASA project, add the BPEL module to it and deploy to e.g. OpenESB. These steps result in yet another graphical representation shown in this image:

03-netbeans-bpel-exercise1-casa.jpg

 

The graph indicates that whenever the javaOnePoll web service is called, the request is passed on to the CaptureJ1Polls BPEL module. Building and deploying the Composite Application to OpenESB results in the following output in the NetBeans log:

run-jbi-deploy:<br />[deploy-service-assembly]<br />&nbsp;&nbsp;&nbsp; Deploying a service assembly...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host=localhost<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port=4848<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file=/home/wouter/NetBeansProjects/J1PollCASA/dist/J1PollCASA.zip<br />[start-service-assembly]<br />&nbsp;&nbsp;&nbsp; Starting a service assembly...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; host=localhost<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port=4848<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name=J1PollCASA<br />run:<br />BUILD SUCCESSFUL (total time: 14 seconds)

Testing the Composite Application

Now the Composite Application is deployed we can test it with the testing facilities that NetBeans provides. Creating such a test case can be done by right clicking the Test node under the Composite Application  tree in NetBeans and it involves three steps. The first step is to provide a name for the test case. I chose JavaOnePollTest. The next step is to select the WSDL file that the test will be based on. Here the WSDL file that was provided for the lab needs to be chosen. The final step is to choose the web service operation that needs to be tested. In this case the JavaOnePollOperation needs to be selected.

NetBeans will now create an input.xml file based on the WSDL. The values in this file can be adjusted to your needs. Here’s the one I used to test my Composite Application:

&lt;soapenv:Envelope <br />&nbsp;&nbsp;&nbsp; xsi:schemaLocation=&quot;http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/&quot;<br />&nbsp;&nbsp;&nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; <br />&nbsp;&nbsp;&nbsp; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; <br />&nbsp;&nbsp;&nbsp; xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; <br />&nbsp;&nbsp;&nbsp; xmlns:jav=&quot;http://j2ee.netbeans.org/wsdl/javaOnePoll&quot;&gt;<br />&nbsp; &lt;soapenv:Body&gt;<br />&nbsp;&nbsp;&nbsp; &lt;jav:javaOnePoll&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:PersonalInfo&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:Name&gt;Wouter van Reeven&lt;/jav:Name&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:Continent&gt;Europe&lt;/jav:Continent&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:Industry&gt;ICT&lt;/jav:Industry&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:TechnicalBackground&gt;JavaSE&lt;/jav:TechnicalBackground&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:SOAExpertiseLevel&gt;2&lt;/jav:SOAExpertiseLevel&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/jav:PersonalInfo&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:JavaOneOpinionPoll&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:JavaOneTechnicalInterest&gt;SOA&lt;/jav:JavaOneTechnicalInterest&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:TechnicalContentRating&gt;3&lt;/jav:TechnicalContentRating&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:VenueRating&gt;3&lt;/jav:VenueRating&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:WeatherRating&gt;2&lt;/jav:WeatherRating&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;jav:PreferredVenue&gt;San Francisco&lt;/jav:PreferredVenue&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/jav:JavaOneOpinionPoll&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/jav:javaOnePoll&gt;<br />&nbsp; &lt;/soapenv:Body&gt;<br />&lt;/soapenv:Envelope&gt;

The rating values range from 1 (bad) to 3 (excellent). Right clicking the
test case
and selecting Run generated this output

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; <br />&nbsp;&nbsp;&nbsp; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; <br />&nbsp;&nbsp;&nbsp; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; <br />&nbsp;&nbsp;&nbsp; xsi:schemaLocation=&quot;http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;<br />&nbsp; &lt;SOAP-ENV:Body&gt;<br />&nbsp;&nbsp;&nbsp; &lt;ns1:javaOnePollResponse xmlns:msgns=&quot;http://j2ee.netbeans.org/wsdl/javaOnePoll&quot; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:ns1=&quot;http://j2ee.netbeans.org/wsdl/javaOnePoll&quot;&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Success<br />&nbsp;&nbsp;&nbsp; &lt;/ns1:javaOnePollResponse&gt;<br />&nbsp; &lt;/SOAP-ENV:Body&gt;<br />&lt;/SOAP-ENV:Envelope&gt;

Great!

Connecting to a database

The next exercise was to store the input values of the web service call into a database. During the lab, MySQL was used (of course, Sun recently acquired MySQL) but it should make no difference what database is used. To prove that, I will try to store the data in an Oracle XE database. The first steps involve creating the database schema and making a connection from GlassFish to that schema. This is very trivial stuff and I will not show you how to do that. If you have troubles making the connection from GlassFish to a database, check out one of my previous blog entries.

In order to be able to store the data to the database, we need to setup a partner link to the database. Every partner link is based on WSDL so we need to create a WSDL based on the database. NetBeans has a nice wizard for this. To start the wizard, go to the CaptureJ1Polls project and choose File -> New File -> SOA -> WSDL From Database

Create WSDL from database

 

Follow the steps in the wizard to create the WSDL. There is one tricky part to it. In the final screen you need to provide the JNDI name of the GlassFish datasource that connects to the database by yourself. I hope the NetBeans team will extend this screen in the future so the available JNDI names are presented in a drop down list and the possibility to create a new data source will be available too. This is all possible in Java EE project wizards so it shouldn’t be too hard to create that here too.

With the newly created WSDL it’s not hard to create a partner link in our BPEL module. Reopen the CaptureJ1Polls BPEL diagram if closed and drag and drop the JavaOnePollsTable WSDL file to the partner link lane to the right (or left) of the BPEL diagram. Next, an Assign activity needs to be added before the Invoke so the data that was passed on to the web service can be passed on to the database. The final BPEL diagram looks like this

The updated BPEL process

 

The mapDataToDB Assign activity is shown with warnings due to a namespace mismatch that can safely be ignored. The new Assign activity itself looks like this

The new Assign activity

 

After recompiling both the CaptureJ1Polls and the J1PollCASA projects, the J1PollCASA project looks like this

 The updated Composite Application

 

 Testing the Composite Application again goes ok and using SQL Developer I can now see the data in the database

08-netbeans-bpel-exercise2-sqldeveloper.jpg

 

Conclusion

NetBeans provides a very good graphical editor for orchestration of Business Process Modeling and for creating Composite Applications. The facilities for laying out BPEL diagrams, Assign activities and XSTL mappings are very easy to use and provide powerfull (BPEL related) tools. I will need to do a LOT more investigation, though, to find out all the details.

By the way, on May 22, Alexis Moussine-Pouchkine from Sun in Paris will come over to our company to do a presentation about OpenESB. After that I will do a presentation on NetBeans and BPEL and Composite Applications. If you are interested to attend this event and live in (or close by) the Netherlands, then please visit our agenda for more info and how to subscribe.

 

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post JavaOne 2008 LAB: Dynamic Service Composition with OpenESB and NetBeans appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/05/12/javaone-2008-lab-dynamic-service-composition-with-openesb-and-netbeans/feed/ 4
JavaOne 2008: day 2 https://technology.amis.nl/2008/05/09/javaone-2008-day-2/ https://technology.amis.nl/2008/05/09/javaone-2008-day-2/#comments Fri, 09 May 2008 04:15:21 +0000 http://technology.amis.nl/blog/?p=3153 Share this on .. The second day of JavaOne 2008 started with a key note by Oracle. After that I attended a presentation about the Swing Application Framework and WebBeans. Next I hung around at the Pavilion and then attended a presentation with THE BEST AND COOLEST demo I have ever seen. Curious? Read on. [...]

The post JavaOne 2008: day 2 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The second day of JavaOne 2008 started with a key note by Oracle. After that I attended a presentation about the Swing Application Framework and WebBeans. Next I hung around at the Pavilion and then attended a presentation with THE BEST AND COOLEST demo I have ever seen. Curious? Read on.

 

Key note

So, Oracle kicked off day 2. In a presentation that lasted 45 minutes Thomas Kurian, Senior Vice President for Oracle Server Technologies Development, took us through a nice overview of the features of Oracle JDeveloper 11g. Preview 4 has just been released so it was time to show it to the audience. Using JDeveloper, Thomas and his people showed how to create and modify RIA web pages, orchestrate business processes, manage database schema’s and the like. Pretty impressive stuff, especially the fact that you only need one, yes ONE, IDE to do this!

 

JSR 296: the Swing Framework

Having programmed a Swing app or two, I usually try to attend at least one Swing related presentation when I attend a conference. Hans Muller and Thomas Pavek, both Sun Microsystems, guided us trough all the new and exciting features that Swing will bring us. The first thing is a new lifecycle for Swing apps. Swing apps now will go through six stages from startup to shutdown. Each stage by default does its thing necessary for the app. The startup stage needs to be set up by the developer to build and show the GUI.

Another pretty cool feature are the ResourceBundle extensions for Swing. Using ResourceMaps, developers can tweak many many settings in the Swing app, from prompts and labels to colors and fonts. The cool thing is that the ResourceMap will return Java Objects. If, for instance, you declare aColor to have the value #FF0000; then a Color class instance will be returned!

Next Actions have been wrapped in @Action annotations on class methods getting rid of a whole pile of plumbing code and problems with previous implementations. Defining an Action once this way allows for reuse by calling a getAction method with the name of the method. The actual retrieval of the action is done internally through Reflection.

In the area of multi-threading, the SwingWorker class has been warpped into an @Task annotation. Besides that, Tasks also are Futures from the concurrency framework. Combining Tasks and Actions now allows for asynchronous Actions in Swing. Before, this was quite hard to do and control.

Introduction to Web Beans

Gavin King, JBoss, guided us through an overview of Web Beans. The goal of Web Beans is to provide a unifying component model for Java EE. If you’re a Seam user you may recognise many of the features of Web Beans. No wonder Gavin was presenting. The main feature of Web Beans is to provide a framework that allows for loose coupling with string typing. Strong typing in the terms of EJBs that are and can be used anywhere, from the database tier to the web tier. Loose coupling is achieved by decoupling server and client tiers through “binding types” (more later), by decoupling the lifecycle of collaborating components (one can be in request scope while creating another component in session scope), by decoupling orthonogal concerns (e.g. model layer vs. transactions and security) and by decoupling message producers from consumers.

Binding types are annotations that specify which implementation to inject into other components. If, for instance, there is a Person and a Customer (which sub classes Person), then defining an @Person and an @Customer annotation allows to bind a Person injection to either a Person or a Customer by using the corresponding annotation at the injection point.

Deployment types are annotations that specify in which deployment environment a certain component can and should be used. In a test deploymnet certain components may be made available that are not needed or wanted in a production environment.

Like Seam, Web Beans defines different scopes in which components can be available, e.g. RequestScope, ConversationScope, SessionScope and ApplicationScope. ConversationScope is new and is longer lived than RequestScope and shorter lived than SessionScope.

Apart from all this, Web Beans specifies Producer methods (that control the production of components), interceptors (also available in JEE5 but redesigned), StereoTypes and Events.

THE BEST AND COOLEST demo I have ever seen

The biggest hobby in my life is astronomy. It has been for a long time and I even have a degree in it. Seeing that the science wasn’t as much fun as the hobby, I persued a carreer in ICT. My colleague Lucas told me there was going to be a presentation about porting a planetarium program called Stellarium from C++ to Java using Java OpenGL, or JOGL. Getting a real good overview of what problems you get when trying to port an application from C++ to Java, the demos simply kicked ass! If you have some time, check out Stellarium for Java. It runs fast and smoothly, at least on modern computers. At one point Jerome Beau and Frederic Simon showed a star map and then opened up the Location selector map. While having pressed down the left mouse button and dragging the mouse pointer all over the Earth, the star map in the background got redrawn almost instantaneously. Another pretty cool feature was the fading in and out of constellation lines, azimuth and equatorial grid, etc etc. These guys really have done a tremendously good job with this application. After the presentation I gave them my cards and asked them to contact me. They are in need of astronomers and/or Java coders so if you like, go and help them.

 

The Pavilion

I guess the biggest hit for me so far has been the Pavilion. Walking around the booths of Oracle and Sun has put me into contact with many interesting people. The most notable thing was that everyone is really happy to hear we actually use the products they create. If you value your frameworks, IDEs, application servers, database or any software you use, go out to the Pavilion next year and tell the people that create them. They really are appreciative of it and listen to any request or compliments you’ll have for them!

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post JavaOne 2008: day 2 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/05/09/javaone-2008-day-2/feed/ 1
AMIS presents at JavaOne 2008 https://technology.amis.nl/2008/05/08/amis-presents-at-javaone-2008/ https://technology.amis.nl/2008/05/08/amis-presents-at-javaone-2008/#comments Thu, 08 May 2008 17:39:17 +0000 http://technology.amis.nl/blog/?p=3150 Share this on .. On day 2 of JavaOne 2008, Lucas Jellema and Peter Ebell did a presentation about enabling company and user level customizations of JSF applications. Using the title "Did We Spoil The End User? Building Personalization into JavaServer Faces Technology-Based Applications" they entertained the public in a role playing presentation. Lucas played [...]

The post AMIS presents at JavaOne 2008 appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

On day 2 of JavaOne 2008, Lucas Jellema and Peter Ebell did a presentation about enabling company and user level customizations of JSF applications. Using the title "Did We Spoil The End User? Building Personalization into JavaServer Faces Technology-Based Applications" they entertained the public in a role playing presentation. Lucas played the role of a sales person, Peter the role of developer.

 The announcement at JavaOne

 

Due to the late hour at which the presentation was scheduled (8:30 p.m.) the audience only had about 40 people. Some people left during the presentation, so they ended up with just over 25 people. Not bad considering the time.

 Live action at JavaOne!

 

Some people had some questions after the presentation which to me is an indication that more people would have attended and have been interested if the presentation were held at an earlier time. By the way,  the presentation will be made available through the JavaOne web site later on. Anyway, congratulations to Lucas and Peter for a job well done! 

 

 

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post AMIS presents at JavaOne 2008 appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/05/08/amis-presents-at-javaone-2008/feed/ 0
Web Synergy: Sun and Liferay bundle their forces https://technology.amis.nl/2008/05/08/web-synergy-sun-and-liferay-bundle-their-forces/ https://technology.amis.nl/2008/05/08/web-synergy-sun-and-liferay-bundle-their-forces/#comments Thu, 08 May 2008 01:26:03 +0000 http://technology.amis.nl/blog/?p=3144 Share this on .. On day 2 of JavaOne 2008 I visited the Sun booth at the Pavilion to ask some questions about the Open Portal project. There I got word that Sun and Liferay have bundled their forces in a project called Web Synergy. I received a USB stick with lotsa software on it, [...]

The post Web Synergy: Sun and Liferay bundle their forces appeared first on AMIS Oracle and Java Blog.

]]>
Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

On day 2 of JavaOne 2008 I visited the Sun booth at the Pavilion to ask some questions about the Open Portal project. There I got word that Sun and Liferay have bundled their forces in a project called Web Synergy. I received a USB stick with lotsa software on it, including a zip file containing a pre-installed GlassFish with a WebSynergy jar in it. If you’re not at JavaOne, or if you didn’t pick up the USB stick, you can download Web Synergy from here.

....

Installing Web Synergy is really easy. Simply extract the zip file to a directory on your hard disk. Next, start GlassFish using the asadmin command as described on the download page. After a while you can navigate to http://localhost:8585 and see that your server is running.

Web Synergy is running!

 

Next, as is described on the download page, you can login with a few users and play around.  I chose to login as Ed since he has the shortest password Smiley

Logged in as Ed

 

 

For an encore I tried to modify some of the colors in the portal site, by choosing the Manage Pages option in the popup menu you get when hovering the user name in the upper right:

 The popup menu

 

and I ended up with the orange color theme from the classis Liferay theme:

The Orange Color Theme

 

Of course the real challenge lies in developing Portlets that can be ran inside Web Synergy. But I think this out of the box installation really shows the power of GlassFish and Liferay. Congratulations! 

Share this on .. Tweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Email this to someoneShare on TumblrBuffer this page

The post Web Synergy: Sun and Liferay bundle their forces appeared first on AMIS Oracle and Java Blog.

]]>
https://technology.amis.nl/2008/05/08/web-synergy-sun-and-liferay-bundle-their-forces/feed/ 1