Two talks at JavaOne this year:
S313580 - "Swinglabs Dev Update" with Karl and Alex ... I hope guys will do most of the talking :D
S314239 - "Building Content Management solutions based on Java Content Repository" together with Greg
BTW for those wondering what is happening with the swinglabs.org, server have been recently moved around yet again. It is now in so...
The Bean Validation specification went final around the same time that the Java EE 6 specifications went final. The Java Persistence 2.0 specification allows for Managed classes (entities, mapped superclasses and embeddable classes) to be configured with Bean Validation constraints.
In this example we are going to use Eclipse Galileo which you can download and then install from here. You will...
Content available at: http://blogs.sun.com/arungupta/entry/totd_133_jpa2_jpql_criteria
Last week's kickoff of FESI's research program went very well. There are a number of folks (>500) who are now following this blog on Java.net, and a number who have gotten involved. While we wait for more folks, we'll be researching new technologies, the first being NOSQL databases.
If the kind of topics we're research interests you, please feel free to join the project;...
If you wonder whether the style of use with JDBC API has an impact of performance, you might like to read my latest blog entry on Head Crashing Informatics. While the entry mostly is about tuning SQL Anywhere's BLOB handling performance, it contains an interesting aspect: There are three ways to deal with BLOBs in JDBC, and the performance difference is tremendous. While obvious for the JDBC...
I'v just published an integration module for using GridGain with Spring Batch. Using this module you can distribute Spring Batch processing inside a GridGain grid with the implementation of remote chunking.
What I realized shortly after we put out Magnolia 4.3 is that while we tried to explain new multisite support for example in this screencast there are still plenty of grey areas and lot of confusion when people actually get to use the multisite support. And I think I wrote and talked about this topic earlier as well.
Of course as with any new functionality, there are still...
Content available at: http://blogs.sun.com/arungupta/entry/totd_128_ejbcontainer_createejbcontainer_embedded
In this post I will share my recent findings about Container Dependency Injection in Java EE 6, in particular how to decouple the processing threads of event producers and event consumers.
Java EE 6 introduces a very nice dependency injection framework (CDI) that has superb support for the Observer pattern in the form of event broadcasting.
An Event in CDI is just a regular POJO:
Creating an email authentication provider in Grails with Acegi plugin. This will allow you to login with the user email and not only with the username.
In which our hero makes Jersey dance in ways that probably make the Jersey authors take to their sick beds with a headache.
FESI Research Program Overview
FESI is the Free and open source software Enterprise Solutions Institute. We are a research program designed to study tomorrow's internet technologies as a means to teach folks in the local workforce how to use technologies our customers will likely want to implement. We also perform this research to prepare local engineers with the knowledge and...
On April 28th, 2010, we will be kicking off the first phase of FESI's research. This where we set up the project, and start to get our hands dirty. Attached is the flyer we will use to promote FESI and what we're trying to accomplish. Hopefully it will help us get the word out to the local community.
Also as the kickoff, we'll be participating with a networking group that meets...
This article introduces GlassFish CLI or command line administration console. GlassFish provides several administration channels; one of them is the command line administration interface or CLI from now on. The CLI has many unique features which make it very convenient for command line advocates and new administrators which like to get familiar with CLI and use it in the daily basis. The CLI allows us to manage, administrate, and monitor any resources which application server exposes to the administrators.
Here is an example of OSGi/JMS/MDB comprising of two OSGi bundles deployed in GlassFish:
a) A JMS message producer bundle
b) A JMS message consumer bundle
I will wrap up my experience at eclipsecon. I will also point to my slides and sample source code that shows how to develop EJBs as OSGi service.
I'm excited to show you all one of the things I've been working on since I joined Palm.
Palm Hot Apps
Today we launched a new microsite called Palm Hot Apps. This is a leader board for our Hot Apps promotion, where the top selling & downloaded apps compete to earn bonuses between $1,000 and $100,000 dollars. Since this is a competition we wanted to have a constantly updated site that shows...
Web Services and XML
Recently a user in GlassFish forum asked about developing JAX-WS web service in an OSGi bundle. Here is a complete sample demonstrating the same. You can download it from here.
As the above diagram shows, we have three components, viz:
1) osgi-service.jar: This is an OSGi bundle which provides a service to other bundles. It contains two POJOs, viz:
a) an interface called sahoo.hybridapp.jaxws1.service.Watch
b) an implementation of the same interface called sahoo.hybridapp.jaxws1.service.WatchImpl.
This bundle also contains a bundle activator called sahoo.hybridapp.jaxws1.service.Activator, which is responsible for registering an instance of WatchImpl in OSGi service registry.
2) web-service.war: This is a Web Application Bundle. A Web Application Bundle is a hybrid application - it's both a Java EE archive as well as an OSGi bundle. In this case, it is a war file as well as an OSGi bundle. It's a war file, because it contains a Servlet based JAX-WS end point. It's an OSGi bundle, because we want to make use of OSGi service in the implementation of our web service. It contains a single class called sahoo.hybridapp.jaxws1.webservice.WatchWebService which is defined like this:
The MANIFEST.MF of web-service.war looks like this:
3) web-service-client.jar: This is a plain jar file which makes use of JAX-WS stack of Java SE environment to invoke our web service. It has a single class called sahoo.hybridapp.jaxws1.webserviceclient.Main. The rest of the classes that are part of this jar are generated by wsdl compiler as part of build.
How to build, deploy and test:
Step 1: Start GlassFish
Step 2: Build and deploy the service bundles
mvn clean install
This will produce two OSGi bundles called osgi-service/target/osgi-service.jar and web-service/target/web-service.war. Deploy these two OSGi bundles to GlassFish by simply copying them to domain1/autodeploy/bundles/ dir as shown below:
cp osgi-service/target/osgi-service.jar web-service/target/web-service.war $glassfish.home/domains/domain1/autodeploy/bundles/
GlassFish will automatically detect that web-service.war is a WAB and will perform necessary deployment of EE artifacts as a result of which a web service end point will be available. You can see something like this appearing in server.log:
WS00018: Webservice Endpoint deployed
WatchWebService listening at address at http://localhost:8080/hybridapp.jaxws1.web-service/WatchWebServiceService
Step 3: Build and run the client
Once the web service is available, run
mvn -f web-service-client/pom.xml
to build web-service-client.jar. This is because the WSDL url, as specified in web-service-client/pom.xml, is not available until the web service is deployed.
To test, simple run:
java -jar web-service-client.jar
You shall see it will print the current time as obtained from the web service which in turn obtrains it from the OSGi service.
Enjoy developing OSGi enabled Java EE applications in GlassFish.
In this entry we discuss what Application Server Management Extension (AMX) and Java Management Extensions (JMX) are, how we can use them to develop custom administration, management and monitoring solutions for GlassFish v3. The article contains tens of diagrams and samples.
Have you ever got into the situation where you feel like you need to stretch the limits of HTTP form processing?
Sometimes when developing complex web applications you end up with a form that has just too many features on it. This situation is particularly common when the application uses Ajax forms, as these forms often end up accumulating an enormous amount of funcionality - different actions...