-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
All implementations (ArC, Weld, OWB) have a notion of bean identifier. The identifier is unique for all beans in the "current" deployment. In Weld, it seems it's unique across deployments as well. ArC doesn't support multiple concurrent deployments, so it's easy there. It is not unique across deployments in OWB, which feels fine, I don't think we need that. It's typically a String; in one case when it's not (Weld), there's a method to convert it to String, so that feels like a decent type. It feels useful to expose it through the standard API.
I see 2 concerns immediately:
- To not break previous custom implementations of
Bean, the method should bedefault. However, there's really no good default value. It doesn't feel right to returnnullor throw an exception, and it doesn't feel right to make it non-default. - There's an interface
PassivationCapablethat already exposes thegetId()method. But this interface comes with extra contracts that are not defined by the prescribed methods. It doesn't feel right to let all beans implementPassivationCapable. We could possibly move the method toBeanand leavePassivationCapableas a marker interface, but the javadoc indicates that custom implementation ofContextualcan also bePassivationCapable, so either we would have to movegetId()toContextul, or leave it inPassivationCapableas well.
Overall it feels like more trouble than what it's worth, but I'm interested in other opinions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels