[JBoss JIRA] (CDI-457) Add a disposable interface
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-457?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba commented on CDI-457:
----------------------------------
[~meetoblivion] Well, I still don't understand why the new interface is needed.
{quote}
@UnManaged would be a new annotation indicating that the returned object is not contextual
{quote}
IMO does not make sense, if you inject dependent SomeClass into some normal-scoped bean, it's not non-contextual.
{quote}
Disposable object goes out of scope.
{quote}
What does it mean? How would this work?
{quote}
I suspected that OWB didn't wrap them into contextuals, whereas weld seems to (at least in the 1.1.x line).
{quote}
Weld returns a subclass if an interceptor or decorator is associated. Did you mean this by "wrapping into contextuals"?
> Add a disposable interface
> --------------------------
>
> Key: CDI-457
> URL: https://issues.jboss.org/browse/CDI-457
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Contexts
> Reporter: John Ament
> Assignee: John Ament
>
> Currently for Dependent scoped beans, there's no way for the container to be aware when it's no longer needed.
> I suggest that we somehow wrap dependent beans in a Disposable wrapper to be notified when it's not needed any longer.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-457) Add a disposable interface
by Mark Struberg (JIRA)
[ https://issues.jboss.org/browse/CDI-457?page=com.atlassian.jira.plugin.sy... ]
Mark Struberg commented on CDI-457:
-----------------------------------
Not sure if this in line with the spec.
See 5.4 Client Proxies:
{quote}
Client proxies are never required for a bean whose scope is a pseudo-scope such as @Dependent.
{quote}
If we would introduce a special way to destroy them, then we MUST keep track of them. But this is exactly what we should not need to do for dependent beans...
> Add a disposable interface
> --------------------------
>
> Key: CDI-457
> URL: https://issues.jboss.org/browse/CDI-457
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Contexts
> Reporter: John Ament
> Assignee: John Ament
>
> Currently for Dependent scoped beans, there's no way for the container to be aware when it's no longer needed.
> I suggest that we somehow wrap dependent beans in a Disposable wrapper to be notified when it's not needed any longer.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-457) Add a disposable interface
by John Ament (JIRA)
[ https://issues.jboss.org/browse/CDI-457?page=com.atlassian.jira.plugin.sy... ]
John Ament commented on CDI-457:
--------------------------------
[~struberg] if we could write that into the spec, it would eliminate the need here. I suspected that OWB didn't wrap them into contextuals, whereas weld seems to (at least in the 1.1.x line).
> Add a disposable interface
> --------------------------
>
> Key: CDI-457
> URL: https://issues.jboss.org/browse/CDI-457
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Contexts
> Reporter: John Ament
> Assignee: John Ament
>
> Currently for Dependent scoped beans, there's no way for the container to be aware when it's no longer needed.
> I suggest that we somehow wrap dependent beans in a Disposable wrapper to be notified when it's not needed any longer.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
Handling of Google Docs document suggestions
by Mark Paluch
Hi Antoine,
all edits in the shared Google Docs are done in suggest mode. Do you have a
plan how to achieve an initial document forming the discussion base? Who is
in charge of moderating the documents, accepting/declining suggestions?
Thanks and best regards, Mark
--
Mark Paluch
--
PALUCH.biz
Heckenpfad 14 // 69469 Weinheim
T. 0 62 01/65 04 24-0 // F. 0 62 01/65 04 24-9
mpaluch(a)paluch.biz
WWW. http://www.paluch.biz
10 years, 3 months
[JBoss JIRA] (CDI-481) Introduce AnnotatedParameter.getJavaParameter()
by Romain Manni-Bucau (JIRA)
[ https://issues.jboss.org/browse/CDI-481?page=com.atlassian.jira.plugin.sy... ]
Romain Manni-Bucau commented on CDI-481:
----------------------------------------
Yep. If you think to an extension allowing kind of dynamic calls it can use then names instead of index or type (which are not enough). For instance:
{code}
@PreSecurity("authenticator.login(username, password)
public Data getSensitiveData() {
// ...
}
// ...
@Named
public class Authenticator {
public boolean login(String user, String pwd) {
return true;
}
}
{code}
> Introduce AnnotatedParameter.getJavaParameter()
> -----------------------------------------------
>
> Key: CDI-481
> URL: https://issues.jboss.org/browse/CDI-481
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Portable Extensions
> Reporter: Jozef Hartinger
>
> Make it possible to obtain the Java Reflection object representing the parameter. This is in line with
> AnnotatedField.getJavaMember()
> AnnotatedMethod.getJavaMember()
> AnnotatedConstructor.getJavaMember()
> Can be implemented as a default method such as:
> {code:JAVA}
> default Parameter getJavaParameter() {
> Member member = getDeclaringCallable().getJavaMember();
> if (!(member instanceof Executable)) {
> throw new IllegalStateException("Parameter does not belong to an executable " + member);
> }
> Executable executable = (Executable) member;
> return executable.getParameters()[getPosition()];
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-481) Introduce AnnotatedParameter.getJavaParameter()
by Romain Manni-Bucau (JIRA)
[ https://issues.jboss.org/browse/CDI-481?page=com.atlassian.jira.plugin.sy... ]
Romain Manni-Bucau edited comment on CDI-481 at 9/18/14 1:53 PM:
-----------------------------------------------------------------
Yep. If you think to an extension allowing kind of dynamic calls it can use then names instead of index or type (which are not enough). For instance:
{code}
@PreSecurity("authenticator.login(username, password)
public Data getSensitiveData() {
// ...
}
// ...
@Named
public class Authenticator {
public boolean login(@Parameter("username") String user, @Parameter("password") String pwd) {
return true;
}
}
{code}
was (Author: rmannibucau):
Yep. If you think to an extension allowing kind of dynamic calls it can use then names instead of index or type (which are not enough). For instance:
{code}
@PreSecurity("authenticator.login(username, password)
public Data getSensitiveData() {
// ...
}
// ...
@Named
public class Authenticator {
public boolean login(String user, String pwd) {
return true;
}
}
{code}
> Introduce AnnotatedParameter.getJavaParameter()
> -----------------------------------------------
>
> Key: CDI-481
> URL: https://issues.jboss.org/browse/CDI-481
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Portable Extensions
> Reporter: Jozef Hartinger
>
> Make it possible to obtain the Java Reflection object representing the parameter. This is in line with
> AnnotatedField.getJavaMember()
> AnnotatedMethod.getJavaMember()
> AnnotatedConstructor.getJavaMember()
> Can be implemented as a default method such as:
> {code:JAVA}
> default Parameter getJavaParameter() {
> Member member = getDeclaringCallable().getJavaMember();
> if (!(member instanceof Executable)) {
> throw new IllegalStateException("Parameter does not belong to an executable " + member);
> }
> Executable executable = (Executable) member;
> return executable.getParameters()[getPosition()];
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-481) Introduce AnnotatedParameter.getJavaParameter()
by Jozef Hartinger (JIRA)
[ https://issues.jboss.org/browse/CDI-481?page=com.atlassian.jira.plugin.sy... ]
Jozef Hartinger commented on CDI-481:
-------------------------------------
Oh, I see.
The named would be available here as AnnotatedParameter.getJavaParameter().getName()
> Introduce AnnotatedParameter.getJavaParameter()
> -----------------------------------------------
>
> Key: CDI-481
> URL: https://issues.jboss.org/browse/CDI-481
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Portable Extensions
> Reporter: Jozef Hartinger
>
> Make it possible to obtain the Java Reflection object representing the parameter. This is in line with
> AnnotatedField.getJavaMember()
> AnnotatedMethod.getJavaMember()
> AnnotatedConstructor.getJavaMember()
> Can be implemented as a default method such as:
> {code:JAVA}
> default Parameter getJavaParameter() {
> Member member = getDeclaringCallable().getJavaMember();
> if (!(member instanceof Executable)) {
> throw new IllegalStateException("Parameter does not belong to an executable " + member);
> }
> Executable executable = (Executable) member;
> return executable.getParameters()[getPosition()];
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-481) Introduce AnnotatedParameter.getJavaParameter()
by Romain Manni-Bucau (JIRA)
[ https://issues.jboss.org/browse/CDI-481?page=com.atlassian.jira.plugin.sy... ]
Romain Manni-Bucau commented on CDI-481:
----------------------------------------
http://javadox.com/javax/javaee-api/7.0/javax/validation/ParameterNamePro...
this way extensions can use parameters name which can be useful for extension configuration and match it with something better/more expressive than index.
> Introduce AnnotatedParameter.getJavaParameter()
> -----------------------------------------------
>
> Key: CDI-481
> URL: https://issues.jboss.org/browse/CDI-481
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Portable Extensions
> Reporter: Jozef Hartinger
>
> Make it possible to obtain the Java Reflection object representing the parameter. This is in line with
> AnnotatedField.getJavaMember()
> AnnotatedMethod.getJavaMember()
> AnnotatedConstructor.getJavaMember()
> Can be implemented as a default method such as:
> {code:JAVA}
> default Parameter getJavaParameter() {
> Member member = getDeclaringCallable().getJavaMember();
> if (!(member instanceof Executable)) {
> throw new IllegalStateException("Parameter does not belong to an executable " + member);
> }
> Executable executable = (Executable) member;
> return executable.getParameters()[getPosition()];
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-481) Introduce AnnotatedParameter.getJavaParameter()
by Jozef Hartinger (JIRA)
[ https://issues.jboss.org/browse/CDI-481?page=com.atlassian.jira.plugin.sy... ]
Jozef Hartinger commented on CDI-481:
-------------------------------------
{quote}Can be interesting to align it on BVal with parameter naming, no?{quote}
Sorry, I don't follow. Please elaborate.
> Introduce AnnotatedParameter.getJavaParameter()
> -----------------------------------------------
>
> Key: CDI-481
> URL: https://issues.jboss.org/browse/CDI-481
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Portable Extensions
> Reporter: Jozef Hartinger
>
> Make it possible to obtain the Java Reflection object representing the parameter. This is in line with
> AnnotatedField.getJavaMember()
> AnnotatedMethod.getJavaMember()
> AnnotatedConstructor.getJavaMember()
> Can be implemented as a default method such as:
> {code:JAVA}
> default Parameter getJavaParameter() {
> Member member = getDeclaringCallable().getJavaMember();
> if (!(member instanceof Executable)) {
> throw new IllegalStateException("Parameter does not belong to an executable " + member);
> }
> Executable executable = (Executable) member;
> return executable.getParameters()[getPosition()];
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months