Could extract from this verbiage the scenarios you'd like supported?
Do you need to run tests inside IDEA and have you classes enhanced
after IDEA compiles them for you?
Do you need to run in a separate jvm, e.g. from maven, and have the
classes enhanced as they are loaded?
I think the second of these can probably be made to work without any
openjpa code changes by doing the same thing geronimo does, running
with an enhancer agent that delegates to the openjpa enhancer as
appropriate. I'd imagine that if IDEA creates a new classloader for
running the tests, and we can get some access to something about it,
it ought to be possible to do on the fly enhancement there also.
What exactly are the problems with looking at an enhanced class in
IDEA? I haven't run into them....but I may not have been trying to
debug the enhanced classes but rather openjpa + geronimo.
On May 17, 2007, at 2:39 AM, James.Strachan wrote:
Firstly before I start, openjpa is a great piece of software; I'm
particularly fond of the documentation and in particular the query
parts. The CSS for the site is also awesome :)
However compared to hibernate, openjpa is still pretty painful to
an end users perspective and I don't think this should be the case;
don't think it'll take much time to fix. While the pain is still
fresh in my
mind I thought I'd post on how much more painful openjpa is to use
project. If you're short on time, the basic idea is its that
processing stuff thats to blame :). Yes I know its probably faster
- its just so painful for Java programmers to work with. (And yes I
day we'll all have IDE plugins that hide the bytecode stuff etc etc).
So the first thing is having to mess with your build (ant or maven)
the post processing properly integrated. Depending on if you have
entities in your main or test area this can often trip you up a
it did me). I don't know about folks on this list but the whole
having to mess with my maven build gives me the jitters :). When
that far & the maven planets are aligned with openjpa, the next
hit is how do you run stuff in your IDE. If like me you use IDEA
2, the project gets auto-created by default for all projects you
However these don't work when you use openjpa as you hit the
function at all as you've not run the up front bytecode post
dummy!' type error when trying to run stuff in your IDE.
So you then add the maven-generated classes to the front of the
your project. Hooray, after a day or two's work, you can now
openjpa in your IDE and your build. YAY! The downside is that now when
navigating around your Java code, whenever you navigate into an
IDEA shows you the bytecode - not the source code as its confused
bytecode generated stuff is different to the source code it knows
now you're faced with a dilemma - choose between navigating nicely
your source code - or being able to actually run/debug your
won't even get into the refactoring pain or having to continuously
builds while developing code to avoid getting code completion/
etc. (I prefer to keep in my IDE where possible).
Compare this whole malarkey with hibernate. You add hibernate to
generate your project and you're good to go. No messing with your
build; no messing with some secret ninja IDE stuff to be able to
run & debug your code while still being able to actually navigate the
source. It just works. Now it might work in a crappy & slow way and
might be way way more efficient and powerful and whatnot - but I'd
have a cheap car that just works than a ferrari that you can only
drive on a
tuesday if its sunny, but not too hot and refuses to even start if
FWIW I've just given up using openjpa for development; its just way
painful. (I'm even hacking projects I work on so I use openjpa in
build but explicitly switch to hibernate in development mode; yeah
work but at least I can use my IDE properly again).
I'm cool with putting post processing into the build system (though
should really only be an optimisation); but please can we have some
inefficient but usable reflection/cglib type approach so folks can
switch from hibernate to openjpa (and stay there) without pulling
hair & swearing too much - or sneaking back at the first
opportunity to get
an easy life?
Please don't take this mail the wrong way - I truly want openjpa to
success, its a great piece of software. Its just a bit too hard to
of the box right now. I'd truly like it to be trivial to switch from
hibernate to openjpa and never have to go back.
How hard is it to add a reflection/cglib type alternative to the
bytecode generation (like hibernate does) to save us from the
View this message in context: http://www.nabble.com/the-pain-of-
Sent from the open-jpa-dev mailing list archive at Nabble.com.