in our case we have a multi layered architecture, and one of its parts is the storage.
I don't want to lose trunsactions, but if i need to insert a new customer via webservice, and i have a customer service together with its schema definition, that can be auto generated.
Also to be noted, BPEL 2.0 to my knowledge, supports transactions, so these data service could be transaction aware, ie. participate in a distributed transaction.
Create new BLOG entry is an operation that COULD be executed in dedicated transactions. There are a lot of other cases in our project (almost for every table), and we DO need to expose them to external systems. Why write this by hand 100 times.
As the author of ANTLR says, if you can do something manually in 5 days, why not spend 5 years to automate it.
I dont want to spend 5 years, and looking for a ready solution. Currently we have
semi-automated the task, which includes code generation, and the biggest problem was that JaxWS doesn't work well with generic interfaces.
This artichecture has its advantages, since you can do a lot of cool things, like:
- Have a set of annotations on top of your entity classes, to check ROLE permissions. This checks will occure, no matter how you access your entity, webservice or direct java call. Also u can once define hooks, like generating an RSS/Atom feed for all the operations on particular table.
- There are a lot of gui tools support for entity types described in XSD, for automatic form creation. I dont want to generate all the forms, but at least have a default implementation, which can be substituted.
What i am looking for, is actually a data access abstraction protocol, which could be backended by a database or something else, end export itself as web services (soap/restful/json whatever)
There is this Apache incubation project, EmpireDB, the cool thing about them is they dont use annotations and javaclasses to define the model, so that metadata could be used easier to create XSDs and Forms. I dont have the leasure to use a non industry standard project, so am looking for a ready solution based on standard technologies: JPA(hibernate for example), JaxWS