Enhancing Ebean classes / Enforcing

45 views
Skip to first unread message

Daryl Stultz

unread,
Feb 9, 2012, 3:02:33 PM2/9/12
to Ebean ORM
Hello,

When I run my Tomcat app, I see the following:

INFO: Entities enhanced[2] subclassed[3]
Feb 9, 2012 2:38:34 PM
com.avaje.ebeaninternal.server.deploy.BeanDescriptorManager logStatus
WARNING: Mixing enhanced and subclassed entities. Subclassed classes:
[MetaAutoFetchStatistic, MetaQueryStatistic,
MetaAutoFetchTunedQueryInfo]

The 2 enhanced are my application entities. I'd like to have all of
them enhanced. I'm building the jar from Maven (I noticed the zip file
download produces the same warning). I'm wondering what is the best/
recommended way to enhance these Meta classes before the jar is built,
or should I not worry about it?

I'd like to enforce run-time enhancement, even if only for my model
classes. Any pointers on how to get a hold of a catalog of entity
classes? I can't see any way to get to BeanDescriptorManager
enhancedClassCount or subclassClassCount.

Thanks.

/Daryl

Rob Bygrave

unread,
Feb 9, 2012, 3:42:29 PM2/9/12
to eb...@googlegroups.com
>> I'm wondering what is the best/recommended way to enhance these Meta classes before the jar is built,

Looks like a bug in the pom.

<ebeanEnhance classSource="${project.build.testOutputDirectory}" packages="com.avaje.tests.**"

... the packages should also include com.avaje.ebean.meta.



>> Any pointers on how to get a hold of a catalog of entity classes?

My plan was to provide some "Meta" beans and you'd just find them using findList().  They would hold the the bean type plus deployment information.
So right now I'm not sure what the best approach would be (except to actually do what I'd planned).

Daryl Stultz

unread,
Feb 9, 2012, 4:12:56 PM2/9/12
to Ebean ORM
On Feb 9, 3:42 pm, Rob Bygrave <robin.bygr...@gmail.com> wrote:
>
> Looks like a bug in the pom.
>
> <ebeanEnhance classSource="${project.build.testOutputDirectory}"
> packages="com.avaje.tests.**"
>
> ... the packages should also include com.avaje.ebean.meta.

I added this:
<ebeanEnhance classSource="${project.build.outputDirectory}"
packages="com.avaje.ebean.meta.*" transformArgs="debug=1" />

and it did the trick. Thanks, I'm not really very familiar with Maven.

> >> Any pointers on how to get a hold of a catalog of entity classes?

Well I supposed a quick and dirty solution would be for me to test my
model classes to see if they are instances of EntityBean.

/Daryl
Reply all
Reply to author
Forward
0 new messages