I just take a look at ClassGuard (although I know some objection to it).
However I get a javax.persistence.PersistenceException: [PersistenceUnit: MyPU] class or package not found that I do not get without ClassGuard.
The Exception is caused by a java.lang.ClassNotFoundException when my @PersistenceUnit(unitName = "MyPU") annotated class is not found.
ClassGuard overrides the class loader to load encrypted class files. Hence this may be a problem.
Can I even use ClassGuard together with JPA?
Unfortunately I could not find any related information or mailing lists on the web. And since ClassGuard was recommended here on SO a few times, I thought I give it a try...
Thanks
Mike
classguard does not have the problem you have mentioned in "objection" link since the encryption is in native code. Only way to hack is through native debugger. But with good licensing solution built around them and layering the distributable in such a way that core business logic resides in server library, it should not be too much of an issue I guess.
Hope you are setting the JVM arg to use ClassGuard classloader. java ........ -Djava.system.class.loader=net.jsecurity.classguard.bootstrap.ClassGuard .......
However, if you use heavy reflection and mix up encrypted & un-crypted classes you might end up in trouble which I am currently sorting out with them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With