[jira] [Commented] (DELTASPIKE-430) re-visit DependentProvider

2013-11-05 Thread Mark Struberg (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13814121#comment-13814121
 ] 

Mark Struberg commented on DELTASPIKE-430:
--

To be honest, I don't really like the UnmanagedInstance interface. It feels a 
bit bloated and has unnecessary restrictions. Eg you really must invoke all 
those methods in the correct order. The reason for InjectionTarget to have 
these methods is not because it makes sense from a users perspective, but 
because it makes sense from a *Container integration* perspective. A user will 
never ever decide to not invoke the @PostConstruct methods at all. And even if 
he would, then UnmanagedInstance will great him with an 
IllegalArgumentException. 
There is really only 1 valid way to invoke the methods at all I think.

To be honest, this Interface completely went under my radar and I did only see 
it when the spec was already final. 
So I really rather keep our current implementation.

 re-visit DependentProvider
 --

 Key: DELTASPIKE-430
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-430
 Project: DeltaSpike
  Issue Type: Task
  Components: Core
Affects Versions: 0.5
Reporter: Gerhard Petracek
Assignee: Mark Struberg
Priority: Critical
 Fix For: 0.6


 we could align (parts) with Unmanaged.UnmanagedInstance (specified in cdi 1.1)



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (DELTASPIKE-430) re-visit DependentProvider

2013-11-05 Thread Mark Struberg (JIRA)

[ 
https://issues.apache.org/jira/browse/DELTASPIKE-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13814666#comment-13814666
 ] 

Mark Struberg commented on DELTASPIKE-430:
--

PS2: UnmanagedInstance is kind of @New but manually callable. We could provide 
this as well but the semantic is imo different to DependentProvider.

I also often use the DependentProvider for dynamically resolving EJBs to get 
rid of any warnings. EJBs are treated as being @Dependent scoped per the CDI 
spec. But that is actually quite misleading. So I just use the getInstance() 
from DependentProvider, and then throw the dp away without calling destroy(). 
Destroying of pooled instances is handled by the EJB container anyway.

 re-visit DependentProvider
 --

 Key: DELTASPIKE-430
 URL: https://issues.apache.org/jira/browse/DELTASPIKE-430
 Project: DeltaSpike
  Issue Type: Task
  Components: Core
Affects Versions: 0.5
Reporter: Gerhard Petracek
Assignee: Mark Struberg
Priority: Critical
 Fix For: 0.6


 we could align (parts) with Unmanaged.UnmanagedInstance (specified in cdi 1.1)



--
This message was sent by Atlassian JIRA
(v6.1#6144)