Sun Web Space training (day 4)
Thursday, 2 july 2009, Brussels / Belgium.
WebSpace Services
A Service in WebSpace is like a complete application with a business layer, persistence Hibernate, and the required SQL scripts for deploying tables to a database. To make a service you can use ServiceBuilder in Netbeans. ServiceBuilder provides a visual editor where you can generate your database tables and java entity objects. You will get all generated classes needed for running the service.
The ways to use a Service is inside a Portlet, Hook (later on about this), Plugin, local client or publish it as a web service. When publishing as a web service, the generator picks out the remote methods for operation exposure.
Services are normally created, when there is need for a simple functionality, with 1 or more tables, and some business methods. In a normal situation in an enterprise environment you’ll never use ServiceBuilder for developing large complicated functionalities. All functionalities inside the admin console of WebSpace are actually services. To see all available services on WebSpace you can check http://localhost:8080/tunnel-web/axis. If you need a quickstart application, this is the way to setup something within 5 minutes.
Hooks
Hooks are deployable modules that you can use to modify WebSpace. For instance it is possible to make a Hook that catches a portal login event, or an action on some component like a BlogEntry. There are many variations on Hooks possible. In Netbeans there’s a Hook Plugin available. Just make a new empty web project with postfix ‘-hook’. After that create a new hook inside the app and deploy it on WebSpace.

Comments are closed.