Like everything out there - PAT gives you a lot, but it also takes something.
Below, you will find debate on advantages, disadvantages, requirements.
package business.objects; /** * @@pat.bo */ public class MyBusinessObject { private Field field1; private Collection collection; public MyBusinessObject() { } /** @@pat.transaction */ public void changeMyCollection(String param) { this.collection.remove(param); } }
It means you cannot put simple java.util.Collection of your
favourite Person objects. What you can do is to
create MyPersons which extends java.util.List and PAT is happy then.
You can put any BO as an argument, any simple type, any complex type, any
Struts' class, any ... until it doesn't violate the rule above.
Hopefully, this is not so restrictive as it looks like :)
Serializable
interface.
Do not instantiate your ROOT object more than once. There is no need. Instantiate it once, and if you need access to ROOT object use the annotation above.
cleanPrevaylersRepo is an useful method for cleaning your database directory from PAT's/Prevayler's data files.
There is no possibility to do this with JBossAOP introductions for now.
I speak about deep object graph, and problems with too low stack size. It's been found out that different JVMs behave different, so it may be dependant on your VM and -Xss option.
Basically, my application works with more than 13.000 of business objects with history of operations on each object stored within the object. Objects are referencing each other, many of them consists of Maps which have references to other objects which have Maps - and it hopefully works. :)