1 2 Previous Next 28 Replies Latest reply on Aug 29, 2008 5:52 AM by Galder Zamarreño

    JBCLUSTER-206 - Extract HB/JBC integration layer from EJB3

    Galder Zamarreño Master

      re: https://jira.jboss.org/jira/browse/JBCLUSTER-206

      I've decided to have a go at this. Brian kindly provided with a set of steps of what he thinks needs doing:

      1) Decide on a name for binary and module in svn. I think for now it will live in repos/jbossas/projects/cluster. Only sucky thing is version #s in JIRA, since it doesn't really follow the ha-client and ha-server-api. But we can deal w/ that later; for now let's just get something to Prabhat.

      2) Setup maven project. Should be fairly straightforward.

      3) Copy classes from Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity

      4) Rename, repackage classes (no ejb3)

      5) The actual code change, which I *think* is pretty straightforward. Won't get into that here.


      1-5 has been done. I now have a separate project with 2nd level cache integration layer created for ejb3 entities separated and not dependant on ejb3.

      6) Give a binary to Prabhat, let him play. Sort out integration issues (e.g. they have their own CacheProvider impl that finds the cache in JMX; need to coordinate with that.)

      7) Testing. This is the painful part. I'm thinking maybe it's possible to just pull the tests from the ejb3 testsuite, and then make it a requirement that user sets a $JBOSS_HOME, and then we use that to figure out how to start a couple JBoss instances to run the tests. Not sure if the server launch stuff in the testsuite supports such a thing. Probably you know better after your adventures last week. Perhaps some tests could be pulled out of the Hibernate 3.3/JBC 2 integration as well.


      6 and 7 are left to do. I'd like to focus on 7 for the time being:

      On 7, Brian suggested pulling ejb3 tests and running them within two JBoss AS instances. I'm not sure whether Brian refers to unit tests for the module I've created (temporily called hibernate-cache-jbc) or you're refering to tests within portal. Personally, I'd like to have some unit tests in the standalone module and I'd like to avoid AS dependency. Could you start within a UT two instances of HB + corresponding JBC cache and share a database between them? I haven't looked at this yet (it's Friday eve and I'm about to go for a few drinks :p, no time for more digging troday), I'm just putting out there to see whether anyone's done this before (I suppose HB33/JBC2 has examples of this, need to investigate). If we managed to achieve this, we could easily port the EJB3 clustered entity tests and convert them to using HB Session instead of JPA entity manager.I agree with adding some HB33/JBC2 unit tests as well.

      Bottom line: I'd be a much happier person if I can avoid AS for tests for the hibernate-cache-jbc module.

        1 2 Previous Next