Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] AspectJ and memory management

Hi!

I am investigating how it would be possible to implement memory management techniques for introductions in AspectJ.

Basically, if a class A has a stateful "perthis" introduction X, which adds an implementation of the interface Y to A, then I want to control how instances of X are managed. Specifically, an instantiation of A should not cause an instantiation of X. An invocation of Y on A must enable X to be instantiated and loaded with persistent state, and after the invocation it must be possible to GC X (compare this with, for example, JDO and EJB EntityBeans). This allows for the construction of a scalable domain model using introductions.

I've looked around in the documentation but can't find much info on how introductions are managed, in this sense. Is what I'm after possible to do in AspectJ?

If yes, then how? If no, then why not?

Thanks,
  Rickard




Back to the top