[
https://issues.jboss.org/browse/CDI-223?page=com.atlassian.jira.plugin.sy...
]
Mark Struberg commented on CDI-223:
-----------------------------------
re the User example:
Consider having a CDI Bean User which gets created via a producer method and contains the
login credentials, userId, roles, etc...
If you are local you can use this in a @Stateless EJB as
private @Inject User usr;
and in a public String doSomething() you can check the usr.
But the content of the User is NOT available once the EJB is remote!
Thus the behaviour changes heavily depending if the EJB is local or remote.
What _could_ be done (though Imo not yet specced afaik) is if you provide a method
public String doSomething(User usr)
then we could 'unproxy' the User for the remote invocation. Though _still_ that
would work different than a local EJB invocation, because in that case you would still
have the proxy. Whereas in the remote case you would get the unproxied instance.
Now we can go on further clarifying that only beans of passivating scopes must get
unproxied and beans of non-passivating scoped must get dealt via proxies on the remote
side.
Please tell me that I'm thinking too complicated ;)
Verify that it's 100% clear that any EJB "remote"
invocation which doesn't occur when an existing request context is active, starts/ends
it's own request context
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CDI-223
URL:
https://issues.jboss.org/browse/CDI-223
Project: CDI Specification Issues
Issue Type: Clarification
Reporter: Pete Muir
This should apply to JVM-local or JVM-remote remote invocations
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira