On Tue, May 26, 2009 at 3:06 PM, Gavin King <gavin.king@gmail.com> wrote:

  interface PassivationCapable<X> extends Bean<X> {
     String getId();
  }

Instances of Bean could optionally implement PassivationCapable.

We would also need to add a method to BeanManager:

  interface BeanManager {
     PassivationCapable<?> getPassivationCapableBean(String id);
  }

WDYT?

Maybe instead of using String, introduce a BeanIdentifier object that reasonably implements equals(), hashCode(), and toString(), and is Serializable?

I don't see a reason to force the id to be implemented via String.

 

--
Gavin King
gavin.king@gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
_______________________________________________
webbeans-dev mailing list
webbeans-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/webbeans-dev