
Hello
I’m newbie in Tamino and newbie in english, sorry about mistakes 
I’v developed persistence layer using Tamino API 4 Java.
It’s something like “automatic persistence”. It works very well.
So well, that I want to move this to EJB enviroment. I want to use Tamino Resource Adapter, JCA implementation. But I have some problems with this.
As everyone can read in Tamino documentation or in this forum Tamino doesn’t support contraint checking between documents. In current version of my persistence layer I’m using method showed in documentation (Taminio API 4 Java | All that Jazz | Testing for Unique Keys) for checking uniqueness of attributes of xml documents. It works, but I found some problems when I’v tried to do the same using Resource Adapter in EJB enviroment.
Documentation says “transaction first, connection second” in EJB env.
In other place documentation says, that changing isolation level inside pending transaction is impossible. How then implement “Insert Unique” example in EJB? To do this I need two connections with different isolation levels! Even if I change isolation level for some connection this connection will be returned to pool later. There can be many connections with different isolation levels in pool! How to obtain two connections with two diferent isolation levels using Resource Adapter?
Second problem is: how to rollback transaction ( ie. when constraint is violated ), or mark transaction to be “rollback only” without having access to the SessionContext of EJB? Is it possible to rollback EJB transaction from Resource Adapter (TaminoDataSource?) level? Passing SessionContext from EJB to the persistence layer is possible of course, but it vilolates OOP rules I think. I dont’t want my persistent layer to “see” EJB API. I want to use the same API in non-manged eviroments (for example).
It wouldn’t be a problem If I don’t need to implement checkig unique keys in my persistence layer…
By the way… do you plan to implement sth. like “JDO for Tamino”? I think it’s good idea. I think that XMLDB is better for storing objects then any RDBMS.
Thanks,
Stahoo
#webMethods#webMethods-Tamino-XML-Server-APIs#API-Management