I'd like to create a component that will do some outjecting to session, on startup of the session, but then I'd like it to go away. I currently use @Startup and it works well. I just don't need the component afterward. Because it has to outject several things I wasn't sure if @Unwrap was the right approach. Is this possible?
Note: It would be much more ideal if I could go to application scope instead, but it relies on messages, which is a session scoped component.
PS: A small thing but, I have discovered the many wonders of the Seam event model. Yet another great, useful and easy to use feature. And best of all, I don't have to develop it!
@Unwrap won't help - @Create @Startup is the common pattern. Alternatively you could have an event scoped @Observer on session startup, but we don't have suitable events for that. Add an issue to JIRA if you would like them.