Hi,
I am developing a web site with GIS functionality. A couple of tables in my database contain GIS data that is only understood by the GIS software (ArcSDE in this case). Currently, as a prototype, I have created a few POJO that inserts, accesses, and updates these tables via the ArdSDE Java API. I am planning to use Hibernate as the persistence method for all other tables. Consequently, I would have a layer of DAOs, some of them use Hibernate and some of them use the customized GIS DAOs.
Some session beans would call both kinds of DAOs to update both GIS and non-GIS tables, supposingly, within one transaction.
I am new to Hibernate, and at first, I was hoping that I could somehow "plug" my GIS DAOs into Hibernate so that Hibernate can take care of concurrency and transaction issues. However, after reading the manual and quite a few of articles, I have the impression that this can't be (at least not easily or cleanly) done. (Am I right?) Besides, although ArcSDE does provide 'beginTransaction' and 'commitTransaction' methods, it does not seem like I can make or request the GIS updates/inserts to join the main transaction.
So I am back to my original design of having some session beans accessing both kinds of GIS DAOs. As far as transaction control goes, I assume I have to somehow to use bean-managed transaction control and do the work myself. (Still have no clues how I am going to do this cleanly though.)
Has anyone encountered similar design issues before?
Do you think I am doing the right thing?
I appreciate your opinions or advices.
Thanks
Carlos
|