Tuesday Mar 01, 2011

CDI support in GlassFish 3.1

GlassFish 3.1

A new release of GlassFish, GlassFish 3.1, is here, and there is enhanced support for the dependency injection and contextual lifecycle management capabilities offered by the Contexts and Dependency Injection specification in it.

As you would know, GlassFish integrates the reference implementation of the CDI specification, Weld, to support CDI. GlassFish 3.1 integrates the latest release of Weld, Weld 1.1.0. Weld 1.1.0 was released a month ago and its main focus was on making "significant improvements in memory usage, boot-time and runtime performance" compared to the earlier release. More details on the release may be found here.

One of the major themes in the GlassFish 3.1 release is improved support for clustering and high-availability. With GlassFish 3.1's support for persisting session state (HTTP) using in-memory session replication, it is now possible to have an application's ConversationScoped and SessionScoped Beans highly-available, thereby minimizing disruption for users of the application when a server instance fails.

In addition to this integration, we have worked on better tooling support and streamlining the integration process. So, please try the new release and share your feedback with us.

Tuesday Nov 23, 2010

Typesafe injection of dynamic OSGi services in hybrid Java EE applications

Update: Alexis, posted an excellent screencast/walkthrough of this demo here.

During this year's San Francisco JavaOne, Sahoo and I presented  a hybrid approach to enterprise Java application development [slides: here] where applications could use Java EE and OSGi capabilities in the same application. With hybrid applications, as we discussed in the talk and the hands-on-lab , developers can continue to build standard and familiar enterprise application components, such as Java Servlets and EJBs, and take full advantage of:
  • Features such as modularity/dependency management, declarative services, service dynamism, and more provided by OSGi
  • Infrastructure services such as transaction management, security, persistence, and more offered by Java EE.
One of the most interesting features in the OSGi environment is "Service Dynamism". The OSGi Service layer defines a dynamic, collaborative model that is highly integrated with the lifecycle layer of osgi. The OSGi service model is basically a publish-find-and-bind model. A Service is a normal Java Object that is registered under one or more Java interfaces with an OSGi Service Registry. Bundles can register services, search for them or receive notifications when their registration state changes. Key characteristics of the Service layer is that it encourage collaboration and dynamism of services in a secure manner.

When it came to consuming such dynamic services in a Java EE application component, a developer had to write standard boiler-plate, verbose, complex code to find, bind and track service references in the service registry(for example see here and here). The Java EE platform had already simplified injection of resources and depedencies through @Resource, CDI (JSR 299) etc. So, this boilerplate, error-prone code seemed out-of-place :) Other approaches such as OSGi Blueprint Service provide a verbose XML based, non-type-safe mechanisms for specifying dependencies and wiring between services and makes it tedious for a Java EE 6 developer who works with type-safe dependency injection technologies in the platform.

With GlassFish 3.1, application components can express their dependency on an OSGi Service, and have the container handle the discovery and binding of OSGi Services and inject them, by providing an additional Qualifier, @OSGiService, in the injection point. So instead of all the verbose service discovery and binding code,  the application developer states the requirement for an OSGi Service as follows:
    @Inject @OSGiService
    StockQuoteService sqs;

Note that the specification of the OSGi service type in the injection point is type-safe. The developer specifies that the injected service must implement the StockQuoteService interface using the field's type. Type-safety usually implies lesser runtime errors/easier debugging, refactoring etc.

Since the injection is specified through standard @Inject coupled with a custom OSGiService Qualifier, all standard CDI injection capabilities are available (constructor, field, setter method injection, programmatic lookup etc). The container automatically manages service references and ungets them when the component scope is completed.

A standard CDI portable extension (org.glassfish.osgi-cdi) comes pre-installed with GlassFish 3.1, that intercepts deployment of hybrid applications that has components who have expressed dependencies on OSGi services as shown above. The portable extension takes care of discovering the Service from the service registry using the criteria specified in the injection point, bind and track the service and inject the Service. Additional service discovery and injection related metadata could also be specified through annotation elements in the OSGiService Qualifier.For example, here are the current metadata attributes that could be specified:
  • Service Discovery criteria: the standard Filter syntax specified in the OSGi Core Specification can be used to narrow down choices for the Service type in the Service registry
  • Wait timeouts: Waits for the specified amount of time for at least one service that matches the criteria specified to be available in the OSGi Service registry.
  • Dynamic binding: used to handle service-dynamism. Since OSGi services are dynamic, they may not match the lifecycle of the application component that has injected a reference to the service. The developer could indicate that a service reference can be obtained dynamically or not through this attribute. For stateless or idempotent services, a dynamic reference to a service implementation would be useful. The container then injects a proxy to the service and dynamically switches to an available implementation when the current service reference is invalid.
[GlassFish 3.1 is still a work in progress and so, please consider this interface as unstable. Please provide inputs/feedback]

Let us see a simple sample that demonstrates this feature. The sample has a bundle that registers a StockQuoteService implementation on bundle-startup. Then we have another web application bundle(WAB) use the StockQuoteService, by having the container inject the service implementation using the @OSGiService qualifier. The servlet then finds all the symbols for which stock quotes are available, and print their current quotes.

To try out this sample
  • Extract the archive to a temporary location (say /tmp). This is a maven project that uses the JavaOne hands-on-lab template. It uses the maven bundle plugin to create the maven bundles and the maven war plugin to create the WAB. More details on the organization of the maven project structure is available in the docs archive here.
  • Extract the attached zip file and execute "mvn install" to create the two artifacts (a service implementation bundle and the WAB that uses the service) discussed below

  • A StockQuoteService API and implementation is in the stockquote_service project. The service interface is as follows:
public interface StockQuoteService {
    public Double getQuote(String symbol);
    public Set<String> getSymbols();
and the service implementation is at org/acme/stockquoteservice/impl/SimpleStockQuoteServiceImpl.java and has a list of a fixed list of symbols and quotes. The service implementation is registered in the start() method in the BundleActivator.
public class SimpleServiceActivator implements BundleActivator {
    public void start(BundleContext context) throws Exception {
        context.registerService(StockQuoteService.class.getName(), new SimpleStockQuoteServiceImpl(), null);
  • Install the stock quote service implementation bundle Let use the Apache Felix Gogo shell  to deploy the bundle. Apache Gogo comes with GlassFish 3.1. So telnet localhost 6666 to access it. If the demo archive was exploded is in /tmp, Install the bundle by executing install file:///tmp/stockquote_service/target/stockquote_service.jar
The shell provides a Bundle Id for the installed bundle as follows
Bundle ID: 275
Start the bundle by executing "start 275". Replace 275 in this command with the bundle id provided by the shell above. The Stock Quote service implementation is initialized during bundle start and registered in the OSGi Service Registry. An entry similar to the following must appear in the gogo shell.
Registered:[IBM, MSFT, HPQ, ORCL]

  • The stockquoteweb application bundle: references and uses the StockQuote service
public class StockQuoteServlet extends HttpServlet {
    @OSGiService(/\* wait for 1 min \*/ waitTimeout=60\*1000)
    StockQuoteService sqs;
Note that this WAR is a normal web application bundle [OSGi RFC 66 support in GlassFish], with an empty beans.xml descriptor to indicate that it is a CDI bean archive. The context root is specified as "stock_quote", using the Web-ContextPath manifest header
Web-ContextPath                         /stockquote                             
For simplicity, the service API and one implementation of that service was bundled in the stockquote_servic bundle.
  • Install the stock quote WAB bundle using the shell.  If the demo archive was exploded is in /tmp, Install the bundle by executing install file:///tmp/ stockquote_cdi_wab/target/stockquote_cdi_wab.war in the shell. Start the WAB bundle using the identifier provided by the shell.  For example, here is the sequence of steps:
g! install file:///tmp/stockquote_cdi_wab/target/stockquote_cdi_wab.war
Bundle ID: 276
g! start 276
  • Visit http://localhost:8080/stockquote/list to see the stock quotes provided by the stock quote service. The web application uses the StockQuote service implementation to get the quotes for a set of stock symbols.
  • Now, let us see how service dynamism is handled. Stop the service bundle by executing "stop 275" in the gogo shell. This stops the service bundle and the registered service implementaiton is removed from the service registry and is now unavailable for use. Hit the http://localhost:8080/stockquote/list URL now. Since we have a wait timeout of 30 seconds, the OSGi CDI extension waits for 30 seconds before it bails out and the web application prints "service unavailable". However within the 30 seconds, if you execute "start 275" to start the service bundle, the service bundle would register the service implementation again and the container would get the latest service implementation and provide it to the Servlet.
g! stop 275
SimpleServiceActivator stopped
g! start 275
SimpleStockQuoteServiceImpl::Initializing quotes
Registered:[IBM, MSFT, HPQ, ORCL]
SimpleServiceActivator::registration of Stock quote service successful

Through this sample, we have seen how easy it to consume OSGi services in a hybrid Java EE application in a dynamic, type-safe manner using the OSGi CDI extension in GlassFish 3.1.

Thursday Feb 14, 2008

GlassFish presentation at Open Source India Week in Bangalore

OSIW logo

A technical developer track was organized in Bangalore as part of Open Source India Week (erstwhile LinuxAsia )
earlier this week and I presented a technical session on GlassFish. Some members in the audience wanted 
access to the slides and I have made them available here. 

It was an interactive presentation followed by a Q&A session. I have tried to record the questions, posed by the members in the audience, below. 

Thursday Aug 16, 2007

Will code for ... freedom!

code for freedom logo

You might have seen the announcement yesterday in the media or read it via Sun blog posts.

As the contest website says: "... Sun Microsystems is happy to announce the Code For Freedom contest where students across India contribute to the technologies that are empowering the participation age. Participating in this contest will provide you with precious industry experience while still learning in college. And there is more. We in turn reward you for your valuable contribution in taking the first steps towards the open source movement."

Sun's history indicates how a university could help in fostering innovation. One of our founder's engineering skills while at university is well known too.

So if you are a student in India this is a wonderful opportunity to learn , participate and win.

GlassFish is a participating project as well and instructions on how to contribute are available here.

Tuesday Nov 21, 2006

GlassFish at foss.in 2006

FOSS.in logo

Moinak and Joe has already written about the upcoming foss.in 2006 at IISc, Bangalore and how Sun is participating in the event this year as well. foss.in, like last year, promises to be an interesting meeting place for FOSS contributors in and around Bangalore and from across the world.

The GlassFish engineering team would have a presence this year too at the event, with Prasad's talk on Project GlassFish as well as having a neat GlassFish/NetBeans demo at the Sun booth area. A lot of really interesting activities has happened around GlassFish in the last few months. So, if you are interested in GlassFish and would be attending foss.in 2006, please drop by the booth area and talk to us!!

Update: A related post from Binod, Prasad mentions his talk and Sahoo shares the demo

Update 2: The GlassFish Talk, as per the foss.in latest event schedule, is on Saturday 2pm afternoon [25th Nov] in Hall A/120

Monday Nov 13, 2006

OpenJDK !!!!

Jag, Tim Bray, Mark Reinhold, Danny Coward, Eduardo at the Aquarium about GlassFish, Peter von der ahe, Joshua Marinacci has already written about it. This is a tremendous achievement and I for one, am very happy that duke is out too :)!!

Friday Jul 28, 2006

Generic RA for JMS project updates

... for those who haven't noticed, some changes to the HEAD now have message redelivery feature we had hinted earlier and we also have a new document that shows how to integrate Sonic MQ with GlassFish/Sun Java System Application Server, thanks to my colleague Ramesh Parthasarathy.

ClassLoaders in GlassFish - a FAQ

Visual Complexity

We have had occasional queries in the forums and mailing lists about the GlassFish classloader hierarchy and/or how to limit visibility of custom library classes to certain components in GlassFish/Sun Java System Application Server. So here is an FAQ we came up with .. Let me know if this is useful and esp if you have a question that is not answered here.

Image on the left via MaisonBisson

Beware of bugs in the above code; I have only proved it correct, not tried it - Donald Knuth

Note: Sun Java System Application Server and GlassFish is referred to
as "application server" through-out this post. Except for some sections
where it is explicitly indicated as valid only for Standard Edition/Enterprise Edition,
the rest of the FAQ is valid for GlassFish v1/Sun Java System Application Server
Platform Edition 9.0

Where do I learn about ClassLoaders in general?
There are a lot of documents available off the web that could help you
understand about ClassLoaders.
ClassLoader JavaDoc
Understanding Network Class Loaders
Loading, Linking and Initialization of the The Java Virtual Machine Specification
Blogs by Sundar on ClassLoading: Part 1, Part 2
The definitive paper: Dynamic Class Loading in the Java Virtual Machine (1998) - well explained and yet readable!

Where could I learn more about working with ClassLoaders of GlassFish/Sun Java
System Application Server?
The ClassLoaders chapter in the application server developer's guide is a
good place to begin.

How do I use a different xml parser with my application?

The application server by default uses the XML parser that comes with
the JDK (Tiger). You could also use a different JAXP compatible
implementation for an application. An application can be configured to
use a different JAXP implementation than the one bundled with the JDK,
by using the --libraries attribute while deploying the application.
This works due to JAXP's use of the Jar Service Provider discovery
specified in the Jar File Specification to determine the
concrete class to instantiate. More on how this works in a future blog entry :)

How do I control visibility scope of my libraries? [ie how do I control my libraries/
library classes to be available

o only to an application
o only to a cluster/config
o for the whole domain
The --libraries deploy time attribute for an application [as explained
in the "Application specific Class Loading" section of the classloader
] can be used to specify runtime dependencies of an
application. There are two ways to refer to a library in the
--libraries list. When a relative path is specified [ie only the jar
name], the application server attempts to find the specified library
in domain-dir/lib/applibs.

For a library to be made available to the whole domain, you could
place the jar in domain-dir/lib or domain-dir/lib/classes, as
explained in the "Using the Common ClassLoader" section of the
classloader chapter. This is usally the case for JDBC drivers and
other utility libraries that are shared by all applicatins in the

For cluster wide use, copy the jars into the domains/domain1/config/xyz-config/lib directory.
Then add the jars in classpath-suffix or classpath-prefix element of xyz-config.
This will synchronize the jars for all server instances using xyz-config.

To summarize,
\* domains/domain1/lib - domain wide scope, common classloader add the jars automatically
\* domains/domain1/config/cluster1-config/lib - config wide, update classpath-prefix or classpath-suffix
\* domains/domain1/lib/applibs - application scope, added to application class loader automatically
\* domains/domain1/config/cluster1-config/lib/ext - adds to java.ext.dirs automatically

What is the preferred way to use a library jar with an
application (bundle with application vs. instance/lib/applibs,
instance/lib, install/lib, classpath-prefix, classpath-suffix,
instance/lib/ext, instance/lib/classes)?
Application Scoping
Use --libraries [domain-dir/lib/applibs] for the following usecases
+ The dependency needs to be resolved at deploy time
+ The dependency is specific to one or more applications alone in the
+ Sharing a dependency for reducing memory footprint/sharing static
state etc.

Please remember that this is non-portable and it's usage is
GlassFish/Sun application server specific

Bundling with the application is useful when the dependent library
needs to be scoped to the application and no sharing is required.

Global Sharing
Place libraries in domain-dir/lib and domain-dir/lib/classes to add
libraries to the common classloader. This is commonly used for
libraries like JDBC drivers that used by multiple applications.
Requires an AS restart.

Code Patches and bundled library overrides
Use classpath-prefix when you want your libraries to be placed ahead of
application server implementation classes in the shared chain. Again
this is ideally used for placing application server
development/diagnostic patches.

Use classpath-suffix when you want libraries to be placed after of
application server implementation classes in the shared chain.

Optional Packages
domain-dir/lib/ext is a java.ext.dirs directory and is the location
for installing optional packages.

How do I use different JDBC drivers? Where should I copy the jar(s)?
It is recommended to place JDBC drivers, that are used by all the
applications in the domain, in domain-dir/lib or
domain-dir/lib/classes. A restart of the application server instance
is required today so that the JDBC drivers are visible to applications
deployed in the domain.

How do I call an EJB in a stand alone module from another stand
alone web app?
Please refer to the section titled "Packaging the Client JAR for One
Application in Another Application
" in the classloaders glassfish

When do I need to restart the application server to use a library jar?
Adding new jars to the following directories require an application
server restart
- domain-dir/lib and domain-dir/lib/classes
- classpath-prefix, classpath-suffix elements in domain.xml
- domain-dir/lib/ext

I see an access control error message when I am trying to use my
library? Help! OR When do I need to grant permission to the library in the
server.policy file?
This usually indicates that the default permissions granted to
applications are not sufficient, and additional permissions are
required for an application. For additional information on
server.policy and granting permission to applications, please refer to
the "Changing Permissions for an Application" section under "Securing
in the AS developer guide.

How do I have my application use libraries bundled with it against an equivalent library bundled in the application server [or] How do I have delegation inversion for specific libraries
This can be done for web applications alone. You can make the Web Classloader follow the delegation inversion model in the Servlet specification by setting delegate="false" in the class-loader element of the sun-web.xml file. It's safe to do this only for a web module that does not interact with any other modules. The default value for the delegate flag is true. Look at "ClassLoader Delegation" in the "Developing Web Applications" chapter for more information.

Update: There are some bugs in the ClassLoader chapter documentation available in the GlassFish site. So until the GlassFish docs are updated, please refer the ClassLoader chapter in the Sun Java System Application Server 9.1 documentation where the bugs have been fixed and is up-to-date. Thanks Rama for pointing this.

Technorati: , ,

Wednesday Jun 28, 2006

JavaOne BoF 0491 - Developing J2EE™ Connector Architecture Resource Adapters

Vintage microphones

As mentioned in an earlier entry Frank Kieviet and I spoke at a BoF titled "Developing J2EE™ Connector Architecture Resource Adapters" in this year's JavaOne. Though the presentations for the technical sessions are available now on the JavaOne site, slides for the BoFs are not available. Frank has made the slides [pdf] for our BoF and an (amateur) audio recording of the presentation and Q/A session available. Please let us know any comments you may have.

Update: ogg vorbis and mp3 versions available.

Technorati: , , ,

Sunday Jun 18, 2006

java.net community corner minitalk at JavaOne 2006

a community meeting

One of the interesting booths in the JavaOne pavilion is the java.net community corner where projects built at java.net were showcased. Last year and this year, this pavilion also hosted a series of minitalks where java.net developers could give presentations on their projects. Last year I had given an introduction to Generic RA for JMS and this year, since we had seen enough interest in the project mailing lists, we gave a presentation on the Availability features in Generic RA for JMS. Binod also has a good writeup about how Generic RA enables JMS provider pluggability in GlassFish and other J2EE application servers.

In addition to what MoM products provide in terms of availability and fault tolerance, there are a lot of interesting features a JMS resource adapter could add as well and this talk presents what Generic RA provides today in terms of availability. I arrived late as I was caught in a business meeting before my scheduled slot and hence had to give a rather hurried/abridged form of the talk :(. Apologies for that.

The slides are available here and an audio recording [this year the minitalks were podcast live from the show floor] is available here ... and thanks again to the gentleman in the audience who helped me with his USB key!!

Technorati: , , ,

Wednesday Jun 14, 2006

One year old .. Go OpenSolaris go!!

OpenSolaris 1 Year Anniversary

The OpenSolaris project is one year old today. Congratulations to everyone for making it happen.

Wednesday May 17, 2006

JavaOne 2006 Day 0: NetBeans Day

Here are some raw notes from two sessions I attended in NetBeans Day

NetBeans Day

NB 5.5 and Java EE 5 - Ludo and Martin Adamek

    Java EE 5 available today - SDK, Tools bundle beta AS/ESB/AM
    "This ain't your fathers J2EE" - Bill Shannon
    Declarative programming, EoD - Removing requirements - More powerful frameworks 
    Java EE 5 end to end development - JPA, web tier, ejb 3.0, web services and java EE SDK support
    web/j2ee applications integrated with the profiler pack

NetBeans 5.5 Java Persistence API support
    wizarsd to create entity classes, persistence units, persistence provider libraries, entity classes from database, jsf pages from entity classes, session facade from entity classes
    standalone persistence runtime from glassfish
    visual editor for persistence.xml

NetBeans 5.5 WebServices - Wizards for WS, clients, handlers and operations
    jax-ws 2.0 and jaxb 2.0
    drag and drop for WS operations, using WS clients from another prohect and annotations code completion
    glassfish tester capability

NetBeans 5.5 Web Tier suppport
    jsp/jsf el code completion
    visual security configuration
    palette, hyperlinks
    CRUD application generator

    entity classes from database, jsf page from entity classes, AVK integration, annotation codecompletion, persistence.xml gui/xml editing, hyperlinked editor
    webservice creation wizard, deploy, test WS

Project tango
    deliver WS technologies enabling first class interop between SJS products and WCF
    works with NB 5.5
    wizards to define WS attributes - secure WS- keystore/security bindings etc
    A secure WS being contacted by a webclient - xenc:CipherValue containing encrypted content - allows interoperability between WCF and SJS.
    NB 5.5 beta available today.

NetBeans enteprise pack - Todd Fast,Chris Webster and Mike Frisino

NB enterprise pack 
    enriching the circle of integrate tools
    changing the game - open source JSE into NB
    UML capabilities - SOA/BPEL orch at NB

    SOA - composite application building, BPEL, integration and rich visual XML tools
    Application lifecycle management - UML modelling, project mgmt and governance and automatic project documentation

Enterprise pack
    Integrated UML modelling - UML 2.0 - bidirectional model to code synchronization - markerless code generation
    Visual WS orchestration - BPEL 2.0 designer - roundtrip engg between visual diagram and BPEL source - deployment to SeeBeyond BPEL 2.0 engine hosted in JBI
    Visual XML tools - scalable visualization of schema documents - handle real world schemas like OTA, NRF, UBL, IRS - allows user to view schema with context - schema conceptualization - perform advanced queries with visualization. IRS schemas are really complex ! :)
    NB Enterprise pack Early Access available now!

    BPEL editor whirlwind tour - visual design environment, design and code views - one or more BPEL modules in a composite application - deploy BPEL artifacts to BPEL runtime is an implementation of BPEL which is embedded in a JBI engine(extensible service bus) [available within SJSAS] - new SOA samples available - Mapper XPath expression editor - Add JUnit testcases to exercise WSDL artifacts - debugging support at source code level (very similar to java debugger in NB) - adding WSDL's will result in obtaining transitive closure of all WSDLs into the project.
    visual XML schema generator - source, schema, instance and analysis views - OTA schema as an example of viewing and searching large schemas - show usages - 


.. and as usual the "Click and Hack - The Type-It Brothers." were am[us|az]ing. My wifi in my laptop is acting up and so my updates would be rather slow. Apologies for that. Anyway, for better/live coverage, there is a whole lot of sound-bytes appearing in the blogosphere.

My BoF is at Wednesday 05/17/2006 08:30 PM - 09:20 PM Argent Hotel Franciscan I. So if you are interested in connectors/resource adapter development, please do come.

Technorati: , , ,

Friday May 12, 2006

JavaOne 2006 - see you there

JavaOne 2006 is around the corner and this is the third year in a row I am participating. The JavaOne experience has always been amazing. JavaOne is not just a list of Technical Sessions that span through the entire day and BoFs/parties that continue till late in the night but is also about meeting people, gaining new insights, seeing cool technology in action and sharing ideas. There are loads of tips from others out there. After all it is still the best place to meet people anything and everything to do with Java. This year note that the PDFs for the technical session presentations would be available for download from May 15.

For those who are interested on resource adapter development/J2EE Connectors specification development, I co-present BoF-0491 with Frank Kievet, on Wednesday 05/17/2006 08:30 PM - 09:20 PM, Argent Hotel Franciscan I.

In the Generic RA for JMS project, we are presenting a talk titled "Availability features in the Generic RA for JMS" at the java.net community corner. This talk would discuss availability related features, in the RA, like connection auto-reconnect, message redelivery, connection validation etc and would be at 12:30PM on Thursday May 18, 2006 at pd # 532 in the JavaOne Pavilion area.I should place the presentation slides and an abstract in the next couple of days in the talks folder. So if you are planning on attending JavaOne, please do come by and let's meet.

.. and in Project GlassFish there is a bunch of sessions/BoFs we are part of.

This space hasn't been updated for quite a while and so, to fix that, I might blog(either live or delayed) from technical sessions/BoFs I attend. Well that is a hard promise for the madness that is those three-four days, however let's see how it goes. See you there! .. and I have to go get ready for the long flight from Bangalore to San Francisco

Technorati: , , ,

Monday Feb 27, 2006

Websphere MQ integration with Sun Java System Application Server using Generic RA

I just checked in a how-to style integration guide [co-authored with my colleague Sushmita Sharma] that shows how Generic RA for JMS could be used to integrate WebSphere MQ 6.0 (formerly MQ Series) with Sun Java System Application Server/Project GlassFish. Please use the users/dev mailing list at the project community site http://genericjmsra.dev.java.net for any questions/suggestions/improvements you might have.

An abstract from the article

"It has often been an enterprise application integration developer's nightmare to integrate disparate messaging products with transactional applications deployed in a Java EE application server. The preferred message provider pluggability mechanism in J2EE 1.4 and beyond is using the Connectors 1.5 architecture, but a lot of messaging providers do not bundle Connectors 1.5 compliant resource adapters to help in this integration.

The Generic resource adapter for JMS project helps in integrating messaging products with J2EE application servers by wrapping their JMS client library in a J2EE Connector Architecture 1.5 resource adapter. It has been used to integrate different messaging products like Tibco EMS and Sun Java System Message Queue with the Sun Java System Application Server. In this article we would guide you through the steps for using the Generic Resource Adapter for JMS [referred to as 'Generic RA' in the article going forward] to integrate IBM WebSphere MQ 6.0 [formerly MQ Series] with Sun Java System Application Server 8.2 and above

Instructions outlined in this article could also be used to integration WebSphere MQ 6.0 with Project GlassFish and the Java EE 5 SDK preview/Sun Java System Application Server PE 9 beta versions available today. "

We have seen a lot of interest in the Generic RA for JMS community lately and some of them have used the project to integrate different JMS providers with their application servers. If you have any success/experience in using Generic Resource Adapter for JMS in any application server to integrate with any JMS provider of your choice, please let the users alias/the project owners [binod AT dev DOT java dot NET (or) sivakumart AT dev DOT java dot NET] know and we would be glad to host your experiences in the community site.

Monday Feb 13, 2006

NetBeans Day at Sun Tech Days, Chennai

I participated as a speaker in NetBeans Day organized as part of Sun Tech Days at Chennai last week and it was a great experience.The audience started filling up early [where else have you seen the hall filling up 30 minutes before the event starts !!]

Tim Boudreau had two sessions [An introduction to NetBeans 5.0 and a session on plug-in development and building applications on the NetBeans platform]. Kiran Patel's session on Java ME support in NetBeans was well received as well.

My session, was on J2EE and Java EE support in NetBeans 5.0/5.5 respectively.

NetBeans 5.0, clearly provides great out-of-the-box support for J2EE development and here is the list of demos I showed up on stage

    J2EE 1.4 support in NetBeans 5.0
  • Showed how well the J2EE blueprints [now with AJAX blueprints] are available off the IDE. This, IMHO, is a great way to learn J2EE best-practices and try them out straight out of the IDE.
  • Demonstrated how easy it is to create, edit, build, deploy and run a J2EE 1.4 web application - Pointed out how the HTTP monitor could be used as a great debugging/testing tool
  • Demo'ed creation and consumption of a simple "Hello World" [We localized it to "Vanakkam Chennai" during the presentation :)] web-service
  • Java EE 5.0 support in NetBeans 5.5

    NetBeans 5.5 is currently a work in progress, and my demo was based off the previous day's NetBeans nightly [200602072300] and Project GlassFish Beta candidate b32b. Talk about bleeding edge ... and it worked, except for a minor typo I made [how dumb.], and the friendly Chennai audience spotted the typo [Thanks!] and we had the demo come out just fine.

  • Demo'ed how easy it is to create a simple EJB30 Stateless session bean, build and deploy in Project GlassFish and write a simple servlet to exercise the bean.

Update: The slides are now available.




« April 2014