You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Kent Larsson <ke...@gmail.com> on 2009/06/10 10:11:00 UTC

Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

By the way. When using @Configured one has to get AspectJ working if
I'm not mistaken?

I've been messing with it for a while now and it's not going great.
:-/ What I did was install the AJDT plugin for Eclipse and converted
my project to a AspectJ project, then I got stuck. How are you who
have it working solve the AspectJ part with Eclipse problem? Do you
use load time weaving? I can't find a decent manual for the AJDT
plugin.

On Fri, May 29, 2009 at 12:59 PM, Kent Larsson<ke...@gmail.com> wrote:
> Ah, interesting. Thanks for elaborating!
>
> On Fri, May 29, 2009 at 12:31 PM, James Carman
> <jc...@carmanconsulting.com> wrote:
>> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson <ke...@gmail.com> wrote:
>>>> I try not to design my domain models in such a way
>>>
>>> Could you elaborate on this a bit, please?
>>
>> I kind of "cheat" a bit.  When there needs to be something done that
>> involves multiple domain entities, I usually push that logic into a
>> "service" class rather than into the entities themselves.  For
>> operations solely involving an entity and its aggregated entities, I
>> usually put that into the entity class itself.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

Posted by Kent Larsson <ke...@gmail.com>.
Hi,

Thanks for answering. But I tried that and it wasn't enough on my
computer at least. I think the documentation says that it works in
some environments but not all. Using Tomcat 6 I couldn't get it
working without the -javaagent parameter.

I'm writing from memory now so it's probably a little wrong. But I
think the other solution was placing spring-agent.jar or
aspectjweaver.jar on $CATALINA_HOME/common/lib and using that tag.

Are you using Tomcat 6 and got this working purely by adding the
<context:load-time-weaver/> tag to your Spring XML?

Best regards, Kent


On Wed, Jun 10, 2009 at 5:52 PM, Maarten
Bosteels<mb...@gmail.com> wrote:
> Hi,
>
> According to the docs [1], it should be enough to add this to your spring
> XML configuration file:
>
> <context:load-time-weaver/>
>
> [1]  http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-aj-ltw
>
> Maarten
>
>
>
> On Wed, Jun 10, 2009 at 3:19 PM, Kent Larsson <ke...@gmail.com>wrote:
>
>> I skipped the AJDT plugin and am doing LTW (Load-Time Weaving) now, it
>> works.
>>
>> In my case I added: (It might be of use to someone)
>>
>>
>>  -javaagent:"/home/kent/.ivy2/cache/org.springframework/spring-agent/jars/spring-agent-2.5.6.SEC01.jar"
>>
>> To the Server Overview / Open launch configuration / Arguments.
>>
>> I'll investigate if I can use a classloader for Tomcat which I specify
>> in my Spring XML configuration instead, as it would mean that the
>> developers of the project won't have to mess with the server
>> configuration.
>>
>> On Wed, Jun 10, 2009 at 10:11 AM, Kent Larsson<ke...@gmail.com>
>> wrote:
>> > By the way. When using @Configured one has to get AspectJ working if
>> > I'm not mistaken?
>> >
>> > I've been messing with it for a while now and it's not going great.
>> > :-/ What I did was install the AJDT plugin for Eclipse and converted
>> > my project to a AspectJ project, then I got stuck. How are you who
>> > have it working solve the AspectJ part with Eclipse problem? Do you
>> > use load time weaving? I can't find a decent manual for the AJDT
>> > plugin.
>> >
>> > On Fri, May 29, 2009 at 12:59 PM, Kent Larsson<ke...@gmail.com>
>> wrote:
>> >> Ah, interesting. Thanks for elaborating!
>> >>
>> >> On Fri, May 29, 2009 at 12:31 PM, James Carman
>> >> <jc...@carmanconsulting.com> wrote:
>> >>> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson <ke...@gmail.com>
>> wrote:
>> >>>>> I try not to design my domain models in such a way
>> >>>>
>> >>>> Could you elaborate on this a bit, please?
>> >>>
>> >>> I kind of "cheat" a bit.  When there needs to be something done that
>> >>> involves multiple domain entities, I usually push that logic into a
>> >>> "service" class rather than into the entities themselves.  For
>> >>> operations solely involving an entity and its aggregated entities, I
>> >>> usually put that into the entity class itself.
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >>> For additional commands, e-mail: users-help@wicket.apache.org
>> >>>
>> >>>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

Posted by Maarten Bosteels <mb...@gmail.com>.
Hi,

According to the docs [1], it should be enough to add this to your spring
XML configuration file:

<context:load-time-weaver/>

[1]  http://static.springframework.org/spring/docs/2.5.x/reference/aop.html#aop-aj-ltw

Maarten



On Wed, Jun 10, 2009 at 3:19 PM, Kent Larsson <ke...@gmail.com>wrote:

> I skipped the AJDT plugin and am doing LTW (Load-Time Weaving) now, it
> works.
>
> In my case I added: (It might be of use to someone)
>
>
>  -javaagent:"/home/kent/.ivy2/cache/org.springframework/spring-agent/jars/spring-agent-2.5.6.SEC01.jar"
>
> To the Server Overview / Open launch configuration / Arguments.
>
> I'll investigate if I can use a classloader for Tomcat which I specify
> in my Spring XML configuration instead, as it would mean that the
> developers of the project won't have to mess with the server
> configuration.
>
> On Wed, Jun 10, 2009 at 10:11 AM, Kent Larsson<ke...@gmail.com>
> wrote:
> > By the way. When using @Configured one has to get AspectJ working if
> > I'm not mistaken?
> >
> > I've been messing with it for a while now and it's not going great.
> > :-/ What I did was install the AJDT plugin for Eclipse and converted
> > my project to a AspectJ project, then I got stuck. How are you who
> > have it working solve the AspectJ part with Eclipse problem? Do you
> > use load time weaving? I can't find a decent manual for the AJDT
> > plugin.
> >
> > On Fri, May 29, 2009 at 12:59 PM, Kent Larsson<ke...@gmail.com>
> wrote:
> >> Ah, interesting. Thanks for elaborating!
> >>
> >> On Fri, May 29, 2009 at 12:31 PM, James Carman
> >> <jc...@carmanconsulting.com> wrote:
> >>> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson <ke...@gmail.com>
> wrote:
> >>>>> I try not to design my domain models in such a way
> >>>>
> >>>> Could you elaborate on this a bit, please?
> >>>
> >>> I kind of "cheat" a bit.  When there needs to be something done that
> >>> involves multiple domain entities, I usually push that logic into a
> >>> "service" class rather than into the entities themselves.  For
> >>> operations solely involving an entity and its aggregated entities, I
> >>> usually put that into the entity class itself.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Anemic domain model and are @SpringBean's compatible with the solution in "Spring 2.0 vs. the Anemic Domain Model"?

Posted by Kent Larsson <ke...@gmail.com>.
I skipped the AJDT plugin and am doing LTW (Load-Time Weaving) now, it works.

In my case I added: (It might be of use to someone)

 -javaagent:"/home/kent/.ivy2/cache/org.springframework/spring-agent/jars/spring-agent-2.5.6.SEC01.jar"

To the Server Overview / Open launch configuration / Arguments.

I'll investigate if I can use a classloader for Tomcat which I specify
in my Spring XML configuration instead, as it would mean that the
developers of the project won't have to mess with the server
configuration.

On Wed, Jun 10, 2009 at 10:11 AM, Kent Larsson<ke...@gmail.com> wrote:
> By the way. When using @Configured one has to get AspectJ working if
> I'm not mistaken?
>
> I've been messing with it for a while now and it's not going great.
> :-/ What I did was install the AJDT plugin for Eclipse and converted
> my project to a AspectJ project, then I got stuck. How are you who
> have it working solve the AspectJ part with Eclipse problem? Do you
> use load time weaving? I can't find a decent manual for the AJDT
> plugin.
>
> On Fri, May 29, 2009 at 12:59 PM, Kent Larsson<ke...@gmail.com> wrote:
>> Ah, interesting. Thanks for elaborating!
>>
>> On Fri, May 29, 2009 at 12:31 PM, James Carman
>> <jc...@carmanconsulting.com> wrote:
>>> On Fri, May 29, 2009 at 4:04 AM, Kent Larsson <ke...@gmail.com> wrote:
>>>>> I try not to design my domain models in such a way
>>>>
>>>> Could you elaborate on this a bit, please?
>>>
>>> I kind of "cheat" a bit.  When there needs to be something done that
>>> involves multiple domain entities, I usually push that logic into a
>>> "service" class rather than into the entities themselves.  For
>>> operations solely involving an entity and its aggregated entities, I
>>> usually put that into the entity class itself.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org