01
Feb
09

Future updates to the JCA tutorial

This week I had a conf-call with a developer from a JavaEE server vendor to figure out what was happening with one of our JCA adaptors when a failure was reported in the underlying system and to my surprise “connectionErrorOccurred” method may not be called as I felt when I read the specs. One of the points that came up in the conf-call were the missing parts of the spec. This became clear when we discussed that on two other containers the adapter that caused the discussion worked fine and was giving problems only on this particular container. The developer argued (and he is right, spec does not cover this) that this vendor chose to disallow “connectionErrorOccurred” calls while connection is not in use (as the developer referred “our connections”, or, connections that are being held by the container in the connection pool). He also argued that this assumption (the one made by the container) was motivated to increase performance as it could reduce synchronization code. So, after these discoveries I’ll be updating the posts related to JCA and in the further weeks, after I have some time to do some updates to my FooJCA connector (this connector was useful to reproduce the bug inside the vendor lab) I’ll release it here for download so anyone willing to see a working example of a JCA connector will have a quick start code.

Complete post series

Outbound connector related posts:

Outbound JCA connectors introduction
Connection request flow on outbound JCA connector
matchManagedConnections short tip
Java Connector Architecture (JCA)

Inbound connector related posts:

Inbound JCA Connectors Introduction
Anatomy of an inbound JCA connector


5 Responses to “Future updates to the JCA tutorial”


  1. July 31, 2009 at 10:13 am

    Hi Rafael,

    I was wondering if your FooJCA is downloadable anywhere?

    Thanks,
    Rosco

    • August 1, 2009 at 11:08 pm

      Hi Rosco,

      In fact there was a FooJCA but only for solving the issue I mentioned in the Future Updates post (the one related to purging connections).
      The reason I did not post any code or sample for download is somehow related to how I thought to share/discuss ideas on this blog, but is there any particular thing you’d like to know about JCA adapters? Are you trying to roll one and are facing difficulties?

      regards!

    • August 1, 2009 at 11:18 pm

      Hi Rosco,

      If you have any doubts, feel free to leave a comment!

      regards!

  2. 4 Loka
    February 8, 2010 at 6:11 am

    Hi,

    I wanted to know, On What basis I need to implement matchManagedConnection() method in ManagedConnection class. I don’t have any connection specific parameters that comes with ConnectionRequestInfo.

    Though I have saved the ConnectionRequestInfo object ManagedConnectionFactory’s createManagedConnection class as you suggested. I don’t understand on what ManagedConnection object should I match with the ManagedConnection Set given by the Application Server?

    Many thanks.

    • February 9, 2010 at 12:23 am

      Hi,

      Imagine this as implementing an equals and hashCode on a Hibernate entity. It is not simple equality as == and not also simple as comparing an ID field (that you should also never do on Hibernate but this doesn’t have anything to do with this post) but this has to be a business rule equality.
      For example, if it is a pool to a legacy subsystem it’d probably include host, port and type of service (imagining you could have two or three hosts with different ports and different services each).
      The purpose of this method is to provide means for the application server to check if one of the connections available in the pool fit the request just being passed (in this case, instead of creating a new one container will lend one to the application).

      Hope this helped.
      regards,
      Rafael Ribeiro


Leave a comment


ClustrMaps

Blog Stats

  • 384,666 hits since aug'08