Steve Liem, GlassFish, Glassfish ESB, JCaps, java | Tags: , , , , , , , , , , , ,

JCAPS 6 uses the JBI runtime environment of OpenESB, which runs on Glassfish.
On the other side JCAPS 6 also uses design time tools inside Netbeans.
All JCaps projects are managed inside a JCaps repository. Netbeans gives support
regarding the JCaps repository and Service environments, where all the integration magic happens.

OpenESB is the umbrella project that takes the core runtime in Glassfish, the design time tooling in Netbeans, and many of the JBI components from OpenJBI and packages them into a single installer which you’re able to download.

First let’s map out the differences between OpenESB and CAPS 6

OpenESB JCAPS 6
JBI runtime JBI runtime and JCAPS 5.1 runtime
Glassfish v2 AS Glassfish v2 Enterprise AS
Full collection of OpenESB components Selection of OpenESB components
Netbeans 6 tooling Netbeans 6.1 tooling and enterprise designer components

Glassfish v2 Enterprise AS has extra admin monitoring abilities plus user persistance storage capabilities for high availability.

In CAPS 5 applications were deployed to an integration server (IS). Connectivity information was embedded in repository-based EAR files. There was no connectivity information in the IS. Any change in configuration required a regeneration of the EAR file. A workaround was to use LDAP. However LDAP connectivity information is stored in the EAR file, which means that when the LDAP server is changed, the EAR file must be regenerated.

In CAPS 6 applications are deployed on Glassfish. CAPS 6 includes a new concept called Environment Objects, which represents connection information to an external system. This info is stored in the AS, where it is serialized in the domain.xml. When the EAR is deployed on the AS, environment configuration is overriden with the info stored inside the Environment Objects. You are able to use environment objects in combination with environment variables stored inside LDAP. (OpenDS for instance)


Steve Liem, GlassFish | Tags: , , , ,

Say we have a web service using JAX-WS on Glassfish v2.1, and we have an operation using a XMLGregorianCalendar type. When this operation is called, an exception can be thrown:

java.lang.ClassNotFoundException: org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl

In the {glassfish install map}/lib location we have a launcher.xml and a launcher.properties file. Inside the XML there is a reference

<sysproperty key=”javax.xml.parsers.SAXParserFactory” value=”com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl” />

assuming Xerces is already available inside the server shared libraries map. By installing Xerces the exception problem is solved.


Steve Liem, GlassFish, java | Tags: , , , , , , , , , , , , , , , , ,

The best news is that Java is safe. Nothing will change negatively. Oracle want’s to even invest more money to extend and innovate all Java standards. Oracle also announced there will be a JavaOne conference this year. (being co-located with Oracle Open World Se 19-23, 2010) They also announced additional JavaOne tours across Brazil, Russia, India, and China. Oracle will give full support on the existing Open Source model.

Java SE 7

Oracle announced that a new Java runtime is a top priority. A JDK 7 release is planned for 2010.

Java EE 6 will be evolved to address modularity, facilitating development productivity, toolprint optimizing profiles, support dynamic scripting, higher performance, deployment, and multi-core processor support. Oracle also plans to unify the Java SE and Java ME programming models and APIs. Mobile devices running on Java will use Oracle ADF as platform for enterprise applications.

Oracle plans to integrate Sun’s Hotspot (used inside Glassfish) with JRockit (used by WebLogic). This will be a part of the next JVM. This will result in higher performance, faster deployment and much better heap space memory management. (say goodbye to perm gem space problems)

Java development tools

When Oracle tells about Productivity With Choice, it now means literally as developer you are not bounded which IDE to choose to develop for certain applications. JDeveloper, Netbeans and Eclipse will be the main focus and all these IDE’s will get full support from the community, like characterized in the next picture.

If you are a Netbeans developer, you will still develop in Netbeans after the acquisition. The same for Eclipse and JDeveloper. Full stack support on all IDE’s.

Specifically, Oracle wants to improve NetBeans’ support for scripting, dynamic languages, and mobile development. JDeveloper will continue to be Oracle’s strategic IDE for enterprise Java development. They also offer an Enterprise Pack for Eclipse (OEPE) as a third option.

Licenses

Oracle says there will be no license changes to any of the Java developer tools.

Application Server Strategy

The key success on a high quality Java EE application server is

  • measurability
  • flexibility
  • manageability

For the enterprise level WebLogic provides all this thanks to coherence and clustering / grid control. Also Glassfish will stay the number one blueprint reference on Java EE, and stays open source. The goal is to have one web-tier where WebLogic and Glassfish are integrated. Oracle strives for a total integrated solution where on the one side we have WebLogic and Glassfish supporting the web-tier, and on the other side Toxedo, linked together with Oracle Coherence, all running on Java JVM / JRockit / Hotspot.


Steve Liem, GlassFish, Glassfish ESB, JCaps, JCaps SOA Suite Bridge, Oracle SOA, java | Tags: , , , , , , , , ,

Oracle’s strategy is to offer the industry’s most powerful SOA products by combining the best features and areas of strength from Sun’s SOA products into Oracle’s respective SOA products. Customers benefit from increased R&D investment, rapid innovation, increased support for open standards, and a much larger ecosystem of partners and users. Oracle is committed to ensuring that the investments of Sun customers in Java Composite Application Platform Suite (JCAPS) and GlassFish ESB products are protected and migrations are not forced, while facilitating a smooth transition to the converged product line over time.

On the statement that Oracle will offer best of breed with the strength from Sun’s SOA products, Oracle was clear about using all key functionalities from Glassfish ESB into major future Oracle SOA Suite releases. Also if Sun customers are planning a transition to Oracle SOA Suite, they are not forced to rebuild their existing Sun SOA system. Oracle offers the JCAPS SOA Suite Bridge, where it is possible to integrate Sun SOA ESB systems with Oracle SOA.

In summary, the combination of Oracle SOA and Sun means:

  • Oracle will continue to support and maintain Sun SOA products for a long time.
  • Oracle will support collaboration between Sun JCAPS and Oracle SOA Suite through bridge technology

OpenESB stays open source, only Oracle wasn’t clear about future innovations on OpenESB. Although several Sun people talked about forming open source development teams with ex. Sun developers for further innovations. But there is still a big questionmark on that issue.

For more resources on Oracle SOA please visit http://www.oracle.com/soa.


Steve Liem, GlassFish, java | Tags: , , ,

If you’re building an Enterprise Java Bean, a web application or some kind of component that uses references to different (for instance) web service URL’s, then system variables come in handy. These situations can particularly appear inside DTAP environments.

Inside the Glassfish admin console open the configurations node. Depending on if you’re using a cluster configuration or not, you’ll see a couple of nodes like server-config, xxx-cluster-config, and so on. If you’re building software that is running on the xxx-cluster, you have to open the xxx-cluster-config and go to the “System properties” page.

You can do “Add Property” and fill

  • Instance Variable Name : your.webservice.url
  • Default Value : http://development.your.webservice/hello?WSDL

Inside the admin console of the test, acceptance and production you can do the same, but then with different URL’s.

Inside Java it is very simple to get the value of the system property.

String webserviceURL = System.getProperty(“your.webservice.url”) ;

It keeps your code cleaner, and free it from all kinds of system value strings spread all over your application(s). Don’t forget to make an installation documentation for maintenance purposes. Thes kind of system configurations can easily be forgotton. Especially when you’re dealing with many web component systems.


Steve Liem, Uncategorized | Tags: , , , , , , , , , , , ,

Actually it’s the other way around. The new Glassfish application server model is all about OSGi modules. There is an Apache Felix base container (OSGi container), and in there we have a whole collection of modules deployed on Felix. The servlet container module, the JBI ESB module, and so on. It is possible to maintain Glassfish in the traditional way through the admin console. But it’s also possible to reach the Felix engine through the command line. Both ways are usefull, when maintaining a production environment.

Modules

As simple as possibly said, an OSGi module is an ordinary JAR file with some extra META data. When deployed on the OSGi container, it knows what kind of module it is, what dependencies there are, what version it is, and so on. There are several hands-on books explaining these basics. One book called “Modular Java” published by Pragmatic Bookshelf, is a good starting point to get well oriented inside the OSGi framework.

Hot redeployment

People who worked on Glassfish v2 or v2.1, know the problem when trying to update Glassfish. It doesn’t always go that smooth, and we always have to restart Glassfish for taking the changes into account. With Glassfish v3 this all will be history. Thanks to the new module architecture, it is possible to update modules without shutting down Glassfish. It is just Felix running on the background, and keeping hold on the list of all modules and versions. There is even a web application you have to deploy for yourself, that gives a list of all Modules installed on Felix including bundle number and so on. Only to move from Glassfish v2.1 to v3 will be a migration process, rather then an update.

Felix does support OSGi fragments

Most books on OSGi published this moment talk about Apache Felix not supporting OSGi Fragments. To publish web applications as modules, this is one of the things it needs. OSGi fragment support is also needed if you like to use the new Spring Dynamic Modules (Spring DM) framework. Most of the books promote Equinox as OSGi container, because Equinox does support fragments. It is true that Apache Felix version 1.4 does not support fragments, but fortunately Felix version 1.8 contains all the necessary fragment functionalities. And because Glassfish v3 is released on Felix 1.8, it is possible to incorporate fragments and Spring DM.

People still have the choice to use another OSGi container like Equinox or Knopflerfish.

Applications

Thanks to OSGi it is now possible to have a 24/7 runnable application server. There’s a dynamic classload management, that keeps hold on modules. On the simplest level it is possible to hot redeploy common libraries on the lowest level, keeping all dependencies wired. We have the full power IoC and DI concepts by Spring, combined with the dynamic classload abilities supported by the OSGi API.

For deploying and communicating with a Service on classlevel, it is not needed anymore to write seperate lookup code that references interfaces through JNDI. OSGi has an own build in lookup support. A service is deployed as module, and that module is registered in the list of active modules. As module registration name mostly the service interface name is used. With Spring DM it’s even not needed anymore to write explicit OSGi code to get all the common functionalities. These are all configuration issues, and can be implemented in a declarative way inside the Spring configuration.

Expectations

We expect Glassfish v3 released around december 2009. Also people from Glassfish ESB, WebSpace / Liferay, project Fuji, and so on, are preparing their deliverables as OSGi modules. Anyway there is a big impact going on to ensure upfront Java technology for the next coming years.


Steve Liem, Uncategorized | Tags: , , , , , , , , , , , , , , , , , , ,

Friday, 3 july 2009, Brussels / Belgium.

Secure Web Access (SWA)

In a usual situation we have the Gateway, what is a separate application running parallel besides the portal server, which does URL rewriting and supports Netlets, Netfiles and Proxylets. But now we don’t need a separate instance for the Gateway. The Web Space engineering team rethought the system by making Secure Web Access. A separate web application, what you can deploy on any application server, which only support URL rewriting. The original idea was deploying SWA on Web Space, but there are still things to reconsider like the place of SWA inside the architecture of a secure web environment. Maybe position it inside a WebDAV server. SWA still needs to be released. It’s expected around july 2009 (this month). It’s still not clear if it will be open source or a supported product add-on.

WebSpace Search Integration

The WebSpace search engine for a portal user is not based on web crawling but it is based on static indexing. That’s why WebSpace uses Apache Lucene as core implementation. WebSpace calls Lucine when a document or content is added to the portal. It is also possible to index content inside own developed portlets. There is some configuration and an API for doing indexing. (http://lucene.apache.org and http://www.opensearch.org for more information)

Import/Export

WebSpace is able to export the whole presentation layer of the portlet, including the communities, pages, portlet definitions, user preferences, and so on, in one zip file. Portlets themselves need to be deployed by yourself.

OpenSSO Plugin

WebSpace supports integration with OpenSSO. The OpenSSO part needs to be deployed as a WAR file on the WebSpace Glassfish container. After that configurate OpenSSO. Installing the plugin is an Ant build procedure. It is important that you have a good overview on the directory structure of the WebSpace environment. OpenSSO can be integrated with Identity Manager / LDAP / AD for doing real enterprise user management. Unfortunately this part is not fully supported by the WebSpace framework. But it does allow to be pluggable with various Enterprise components like LDAP and AD. To still give an idea, you can create some users inside the realm of OpenSSO. Edit each user and give them an email address, because this is required for WebSpace.

After restarting WebSpace, the security mechanism of the portal is hooked to OpenSSO. You are redirected to the OpenSSO login page, and after authorisation redirected to the portal homepage.

Expectations

I see a very fun product to work with. Considering what we’ve done in one week is a lot though. But still with the big picture in mind. I’m thinking about planning a good use case (1 or 2) to give a good impression to the outside world what the capabilities are of WebSpace. The main goal is to introduce it to the enterprise. The Australian government did an implementation in WebSpace, and it seems the first phase is a successful one. So the Public Sector is already a good branch to work on. Also the health care, university / high school and telecommunication market could be good candidates to implement WebSpace.


Steve Liem, Uncategorized | Tags: , , , , , , , , , , , , , , , , , , , , ,

Wednesday, 1 july 2009, Brussels / Belgium.

Development in Web Space

Netbeans 6.5.1 provides full support for developing all kinds of components for Web Space. There are plugins for developing Theme’s. (This used to be something that you only could do in Dreamweaver) Also there are several plugs for Portlets, CMS and so on.

Developing Java Portlets

Installing Netbeans together with Web Space is really easy. After installing Netbeans, and loading all plugins, one can add the Web Space server support through the Services tab in Netbeans. Now you’re able to develop and deploy JSR-286 portlets on the fly. Because the Web Space container supports WSRP 2.0, after deploying your portlet you instantly have a WSRP interface. This you can produce and consume in the Web Space admin portlet.

The Portlet 2.0 API can access all permission properties for making custom made permissions inside a portlet. There are some property files that need to be created, and the portlet role definitions need to be mapped with the Web Space role definition inside the liferay-portlet.xml.

Layouts

Layouts are used to devide a portal page in area’s. Making layouts is done with with Liferay pluginSDK. You can download it from the Liferay website. Be sure to have installed Ant 1.7 on your system. Unpack the plugin and edit the build.properties file for pointing to the Web Space environment. The layout is handled with the help of a tpl file. Over here you can do some divs and some more layout code. With Ant you can do a build and deploy with one command.

Themes

Themes are created like normal web application projects in Netbeans. Be sure to end the project name with -theme. Right-click project and go to New –> Import/Create new Theme to generate a theme template. Without making changes you can already build and deploy the Theme on Web Space. It will show up in the choices of selecting a Theme. To understand a little bit what happens one can check the source of a more extensive theme. With a good ability creating CSS scripts and graphics, one can create original custom made themes / styles.


Steve Liem, Uncategorized | Tags: , , , , , , , , , , , , , , , , , , , ,

Tuesday, 30 june 2009, Brussels / Belgium.

Another hot day in Brussels. Time to get on and discover more features inside Web Space.

Architecture

The morning began with a session that went deeper into the architecture of Web Space. The key argument is that everything inside Web Space is divided with well defined interfaces. So upgrading Webspace won’t give problems, because everything is component based.

We also had a little look at the lifecycle of a portal page, and what happens when a client sends a request. There are some nice features where one can introduce Hooks, and implement them into the sequence of a request lifecycle. Hooks behave somewhat like servlet filters. For instance one can make a Hook for filtering XSS scripting, or doing asynchronous calls.

Pages and Page Layouts

The look & feel of a portal on Web Space goes way ahead compared with a normal web application. There are several color, layer and theme settings one can configure. All these themes and layers are deployed as ordinary WAR files on the Glassfish container. So when some theme is broken, one can simply undeploy it from the server, and nothing goes down. Themes also have some META settings stored inside an XML file, where one can see if it is compatible with the current Liferay portal version.

The themes themselves are very impressive. One can make full fledged desktop views with context menu’s and windows, like a normal windows kernel. I don’t know if this would be applicable into a serious enterprise environment, but it looks really neat. And it gives a real feel on working with different applications integrated on one workspace.

Permissions

It’s extremely easy to setup a community page with a blog, with extra permissions. Permissions in the form of own defined roles, gives you extra options what a user is authorized to do inside a portlet. We can make separate roles for different authorizations.

For instance with VIEW only rights. Or with all permissions, or just a subset of available permissions. When defining a new page inside a community one can select the roles and attach users inside these roles. By testing out the different users one can instantly see the available functionalities in the portlet that is rendered on the page.

Content Management

Web Space has an own content management component based on JSR-170. It offers enough functionality for integrating content and documentation in the workflow. There are a number of portlets available for displaying content. One can also make their own content templates based on Velocity scripts. It’s fairly intuitive to consruct a portlet page with a CMS display portlet to get a hang on CMS.
Configuring a display portlet with a custom made template, one can configure the template by giving all the fields some value for presentation.


Steve Liem, Uncategorized | Tags: , , , , , , , , , , , , , , , , ,

Monday, 29 june 2009, Brussels / Belgium.

It was a warm day, and extremely bussy with several traffic jams in and around Brussels.
But that couldn’t stop me from arriving in time for attending a brand new training on Glassfish Web Space, internally organised by Sun.
This training is given by Allan Foster (USA), Sun Architect Web Space / OpenSSO / Glassfish.

The first impression was really cool. Webspace supports all kind of open standards like JSR-286, WSRP 2.0, JSR-170 (Content Management API), SAW API for workflows.
But it also supports Web 2.0, Wiki’s, Blogs, Fora. Building up a portal in Webspace is like having all required tools in one framework. It uses Liferay Portal as the core framework.

Around a year ago Oracle introduced WebCenter as their number one future Middleware stack. Web Space has a somewhat same kind of feel. The only difference is that Web Space is build around open standards, and it is 100% open source. The source code (around 1,3 Gigs) is also available for downloading through the Glassfish Update center.

It is possible to setup Web Space in 2 different ways:

- The easy way, is downloading the install file which contains Glassfish and Webspace, all setup together with some portlets, widgets and all kinds of ingredients to setup a demo application. This method is especially helpful when developers want to have a grip on the system, and do some proof of concepts.

- The other way is to deploy (with the help of an administration guide) the Web Space WAR file on an existing Glassfish server. This way is particularly for setting up a production environment. This way also gives you the freedom for hooking up Web Space with a custom database environment like Oracle 11g, OpenSSO with Active Directory, or an own LDAP system. The Web Space source code also contains custom SQL scripts for deploying a scheme on the database that is used for the user management build in Webspace. The user management itself is like a service module layer together with a persistence layer supporting 100% CRUD functionality.

Some little side effects. The Web Space development team suspects that a future 10.0.4 version will have a better behavior inside a Glassfish cluster environment. It is possible to setup Web Space in a cluster, but at some level the administrator still has a lot of work to do by hand. On the other side, everything is described inside the extensive Administration documentation.

The first day we did some install and update routines, and some administration setup routines like creating new users / groups / roles / communities, and some portal pages. (public and private) As a bonus we also setup a little workflow routine through the administration portlets.

That’s it for day one.