[jira] [Created] (OWB-1216) InjectionPoint.getType() returns wrong type for produced beans

2017-09-17 Thread John D. Ament (JIRA)
John D. Ament created OWB-1216:
--

 Summary: InjectionPoint.getType() returns wrong type for produced 
beans
 Key: OWB-1216
 URL: https://issues.apache.org/jira/browse/OWB-1216
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament


Assuming I have a producer (same thing happens for a custom registered 3rd 
party bean, this is just easier to demonstrate):

{code}
public class MyProducer {
@Produces
@SomeQualifier
public String doProducer(InjectionPoint ip) {
return ip.getType().toString();
}
}
{code}

As well as the following injection point (with test):

{code}
@Inject
@SomeQualifier
private String myString;

@Test
public void shouldBeStringType() {
assertThat(myString).isEqualTo(String.class.toString());
}
{code}

The expectation is that the value of {{myString}} is {{java.lang.String}} but 
actually the value is the producer {{MyProducer}}.  We should be relying on the 
injection point's value, not the producer class.  It seems that it uses the 
value of {{getBeanClass}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (OWB-1212) OWB not honoring implicit scanning flag

2017-08-16 Thread John D. Ament (JIRA)
John D. Ament created OWB-1212:
--

 Summary: OWB not honoring implicit scanning flag
 Key: OWB-1212
 URL: https://issues.apache.org/jira/browse/OWB-1212
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament
 Attachments: implicit-scanning.patch

CDI 2.0 adds an implicit scan option in SE mode.  If on, it scans bean archives 
without beans.xml.  This is a change to add support for that flag.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (OWB-1211) OWB is not firing BeforeDestroyed on contexts

2017-08-16 Thread John D. Ament (JIRA)
John D. Ament created OWB-1211:
--

 Summary: OWB is not firing BeforeDestroyed on contexts
 Key: OWB-1211
 URL: https://issues.apache.org/jira/browse/OWB-1211
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament
 Attachments: BeforeDestroyed.patch

Per the spec, in CDI 2, a new event "BeforeDestroyed" was added in the context 
destruction life cycle that is fired before the destruction of that context.  
OWB isn't firing it yet, attached is a patch that does it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1208) Unable to use Unmanaged with mixed CDI 2.0/1.1 bean archives

2017-08-07 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16116393#comment-16116393
 ] 

John D. Ament commented on OWB-1208:


The CXFCdiServlet is just an example.  I actually had been using Unmanaged to 
create the behavior of injecting into fields without creating a proxy.  

> Unable to use Unmanaged with mixed CDI 2.0/1.1 bean archives
> 
>
> Key: OWB-1208
> URL: https://issues.apache.org/jira/browse/OWB-1208
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Take for instance the Apache CXF CDI Extension.  There's a `CXFCdiServlet` 
> class which has no bean defining annotations, but has a valid CDI 1.1 
> [beans.xml|https://github.com/apache/cxf/blob/master/integration/cdi/src/main/resources/META-INF/beans.xml].
>   If I start OWB from a main that has CDI 2.0's trimmed bean archive, this 
> servlet is not available as a CDI bean, and hence cannot be used within 
> Unmanaged.
> I'm not sure if the solution is that it should be a CDI bean, or if Unmanaged 
> should be able to look at non-beans.  This issue does not replicate on Weld 3.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (OWB-1208) Unable to use Unmanaged with mixed CDI 2.0/1.1 bean archives

2017-08-06 Thread John D. Ament (JIRA)
John D. Ament created OWB-1208:
--

 Summary: Unable to use Unmanaged with mixed CDI 2.0/1.1 bean 
archives
 Key: OWB-1208
 URL: https://issues.apache.org/jira/browse/OWB-1208
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament


Take for instance the Apache CXF CDI Extension.  There's a `CXFCdiServlet` 
class which has no bean defining annotations, but has a valid CDI 1.1 
[beans.xml|https://github.com/apache/cxf/blob/master/integration/cdi/src/main/resources/META-INF/beans.xml].
  If I start OWB from a main that has CDI 2.0's trimmed bean archive, this 
servlet is not available as a CDI bean, and hence cannot be used within 
Unmanaged.

I'm not sure if the solution is that it should be a CDI bean, or if Unmanaged 
should be able to look at non-beans.  This issue does not replicate on Weld 3.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (OWB-1207) Inconsistent behavior of the instance behind CDI.current()

2017-08-06 Thread John D. Ament (JIRA)
John D. Ament created OWB-1207:
--

 Summary: Inconsistent behavior of the instance behind CDI.current()
 Key: OWB-1207
 URL: https://issues.apache.org/jira/browse/OWB-1207
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament


The behavior of CDI.current() is a bit odd, and seems to have a bug in it.

Suppose I have the following:

{code}
Instance x = CDI.current().select(SomeClass, someQualifiers);
Instance y = CDI.current().select(SomeClass).select(someQualifiers)
{code}

Those two instances should be pointing to same set of beans, have the same set 
of qualifiers, but they do not.  x will in fact have an extra Default qualifier 
that y does not have.  The default qualifier is not expected here.  This 
happens because the return value of `instance()` in `OwbCDI` selects a default 
qualifier, and the method taking var args for type and annotations does a 
merge, whereas the second method of selecting just qualifiers does a 
replacement.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (OWB-1206) Enable CDI 2.0 TCK SE Tests

2017-07-30 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated OWB-1206:
---
Attachment: OWB_1206_v2.patch

Here's a better patch, created an owb-se-tck package to run.  It's a bit of a 
pain but the test harness will end up being the simple part.

I excluded the request context activation tests until those are in.

17/27 tests are failing

{code}
Tests run: 27, Failures: 17, Errors: 0, Skipped: 0, Time elapsed: 16.639 sec 
<<< FAILURE! - in TestSuite
instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.523 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@4ec88fd9]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@4ec88fd9]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Method 
BootstrapSEContainerTest.instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@4ec88fd9]
 should have thrown an exception of class java.lang.IllegalStateException

instanceSelectClassThrowsISEWhenAccessedAfterShutdown(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.072 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.instanceSelectClassThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@2e2bb4db]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.instanceSelectClassThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@2e2bb4db]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Method 
BootstrapSEContainerTest.instanceSelectClassThrowsISEWhenAccessedAfterShutdown()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@2e2bb4db]
 should have thrown an exception of class java.lang.IllegalStateException

seContainerThrowsISEWhenAccessingBmAtShutdownContainer(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.074 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.seContainerThrowsISEWhenAccessingBmAtShutdownContainer()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@38709d97]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.testng.TestException: 
Method 
BootstrapSEContainerTest.seContainerThrowsISEWhenAccessingBmAtShutdownContainer()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@38709d97]
 should have thrown an exception of class java.lang.IllegalStateException
Caused by: org.testng.TestException: 

Method 
BootstrapSEContainerTest.seContainerThrowsISEWhenAccessingBmAtShutdownContainer()[pri:0,
 
instance:org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest@38709d97]
 should have thrown an exception of class java.lang.IllegalStateException

testAddDecorator(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest) 
 Time elapsed: 0.062 sec  <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.testAddDecorator(BootstrapSEContainerTest.java:244)

testAddInterceptor(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.048 sec  <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
at 

[jira] [Commented] (OWB-1206) Enable CDI 2.0 TCK SE Tests

2017-07-30 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16106520#comment-16106520
 ] 

John D. Ament commented on OWB-1206:


Well, the reason being that SE and Arquillian should work together without any 
issue.  Right now it's assuming that the configured scanner is the default 
scanner, which may not be the case.  So it makes sense to move register to the 
base interface and require it to always implement it.

> Enable CDI 2.0 TCK SE Tests
> ---
>
> Key: OWB-1206
> URL: https://issues.apache.org/jira/browse/OWB-1206
> Project: OpenWebBeans
>  Issue Type: Improvement
>Reporter: John D. Ament
> Attachments: OWB_1206.patch
>
>
> The CDI 2.0 TCK tests for Java SE are currently disabled.  This is a holder 
> ticket to:
> - Enable the suite
> - Fix whatever tests may fail



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1206) Enable CDI 2.0 TCK SE Tests

2017-07-30 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16106516#comment-16106516
 ] 

John D. Ament commented on OWB-1206:


Many of the errors seem to originate from xbean, and it's odd because what the 
TCK is doing is mixing arquillian and SeContainer.  

{code}
Caused by: java.lang.UnsupportedOperationException: unsupported archive type: 
archive:0746a2d5-82fa-4d58-8c31-67e9098d07d2.jar/
at 
org.apache.xbean.finder.archive.ClasspathArchive.archive(ClasspathArchive.java:87)
at 
org.apache.webbeans.corespi.scanner.xbean.CdiArchive.(CdiArchive.java:67)
at 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery.initFinder(AbstractMetaDataDiscovery.java:113)
at 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery.scan(AbstractMetaDataDiscovery.java:153)
... 100 more
{code}

This combination seems to be creating archives that xbean can't understand.  

> Enable CDI 2.0 TCK SE Tests
> ---
>
> Key: OWB-1206
> URL: https://issues.apache.org/jira/browse/OWB-1206
> Project: OpenWebBeans
>  Issue Type: Improvement
>Reporter: John D. Ament
> Attachments: OWB_1206.patch
>
>
> The CDI 2.0 TCK tests for Java SE are currently disabled.  This is a holder 
> ticket to:
> - Enable the suite
> - Fix whatever tests may fail



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (OWB-1206) Enable CDI 2.0 TCK SE Tests

2017-07-30 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated OWB-1206:
---
Attachment: OWB_1206.patch

The following tests fail after making the attached changes

{code}
instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.043 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.apache.webbeans.exception.WebBeansDeploymentException: 
java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown(BootstrapSEContainerTest.java:277)
Caused by: java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.instanceSelectAnnotationThrowsISEWhenAccessedAfterShutdown(BootstrapSEContainerTest.java:277)

instanceSelectClassThrowsISEWhenAccessedAfterShutdown(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.012 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.apache.webbeans.exception.WebBeansDeploymentException: 
java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.instanceSelectClassThrowsISEWhenAccessedAfterShutdown(BootstrapSEContainerTest.java:270)
Caused by: java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.instanceSelectClassThrowsISEWhenAccessedAfterShutdown(BootstrapSEContainerTest.java:270)

seContainerThrowsISEWhenAccessingBmAtShutdownContainer(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.009 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 
org.apache.webbeans.exception.WebBeansDeploymentException: 
java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.seContainerThrowsISEWhenAccessingBmAtShutdownContainer(BootstrapSEContainerTest.java:263)
Caused by: java.lang.UnsupportedOperationException: unsupported archive type: 
archive:d9daa923-3492-425a-ac6a-6cf639aa77b4.jar/
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.initializeAndShutdownContainer(BootstrapSEContainerTest.java:283)
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.seContainerThrowsISEWhenAccessingBmAtShutdownContainer(BootstrapSEContainerTest.java:263)

testAddDecorator(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest) 
 Time elapsed: 0.02 sec  <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.testAddDecorator(BootstrapSEContainerTest.java:244)

testAddInterceptor(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.005 sec  <<< FAILURE!
java.lang.AssertionError: expected [true] but found [false]
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.testAddInterceptor(BootstrapSEContainerTest.java:227)

testAlternativesInSE(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.014 sec  <<< FAILURE!
java.lang.AssertionError: expected [Circle] but found [Square]
at 
org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest.testAlternativesInSE(BootstrapSEContainerTest.java:138)

testContainerCloseMethodOnNotInitializedContainer(org.jboss.cdi.tck.tests.se.container.BootstrapSEContainerTest)
  Time elapsed: 0.012 sec  <<< FAILURE!
org.testng.TestException: 

Expected exception java.lang.IllegalStateException but got 

[jira] [Created] (OWB-1206) Enable CDI 2.0 TCK SE Tests

2017-07-30 Thread John D. Ament (JIRA)
John D. Ament created OWB-1206:
--

 Summary: Enable CDI 2.0 TCK SE Tests
 Key: OWB-1206
 URL: https://issues.apache.org/jira/browse/OWB-1206
 Project: OpenWebBeans
  Issue Type: Improvement
Reporter: John D. Ament


The CDI 2.0 TCK tests for Java SE are currently disabled.  This is a holder 
ticket to:

- Enable the suite
- Fix whatever tests may fail



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1191) implement api for manual request-context handling

2017-07-30 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16106496#comment-16106496
 ] 

John D. Ament commented on OWB-1191:


Oh , I see.  OWB's ignoring the SE tests..

{code}





{code}

> implement api for manual request-context handling
> -
>
> Key: OWB-1191
> URL: https://issues.apache.org/jira/browse/OWB-1191
> Project: OpenWebBeans
>  Issue Type: Sub-task
>  Components: Context and Scopes
>Reporter: Gerhard Petracek
> Fix For: 2.0.1
>
> Attachments: OWB_1191.patch
>
>
> new parts:
>  * ActivateRequestContext
>  * RequestContextController



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (OWB-1191) implement api for manual request-context handling

2017-07-30 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated OWB-1191:
---
Attachment: OWB_1191.patch

Here's a patch, untested, but looks logically right.  

I'm not sure yet how to bind an interceptor the same way, but this should at 
least add the built in bean.

> implement api for manual request-context handling
> -
>
> Key: OWB-1191
> URL: https://issues.apache.org/jira/browse/OWB-1191
> Project: OpenWebBeans
>  Issue Type: Sub-task
>  Components: Context and Scopes
>Reporter: Gerhard Petracek
> Fix For: 2.0.1
>
> Attachments: OWB_1191.patch
>
>
> new parts:
>  * ActivateRequestContext
>  * RequestContextController



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (OWB-1200) OWB 2 skips producer methods defined in annotated bean archives in SE

2017-07-16 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament resolved OWB-1200.

Resolution: Invalid

Non issue, see OWB-1201 for more details.

> OWB 2 skips producer methods defined in annotated bean archives in SE
> -
>
> Key: OWB-1200
> URL: https://issues.apache.org/jira/browse/OWB-1200
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Here's a code sample that fails for me
> https://github.com/astefanutti/metrics-cdi/blob/29e7bac497513de420543497612180331cc5d1b3/impl/src/main/java/io/astefanutti/metrics/cdi/MetricNameFactory.java#L24
> Basically, from what I can tell OWB 2 misses this producer method, I believe 
> because it doesn't have a scope but the outer bean class does have a scope.
> AFAIK, per the spec, this is implicitly a `@Dependent` producer and should 
> have been picked up because the outer bean is defined as a dependent scoped 
> bean.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1199) CDISeScannerService.autoScanning should be true by default

2017-07-16 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16088926#comment-16088926
 ] 

John D. Ament commented on OWB-1199:


LGTM thanks.  Just want to make sure we don't end up with regressions :-)

> CDISeScannerService.autoScanning should be true by default
> --
>
> Key: OWB-1199
> URL: https://issues.apache.org/jira/browse/OWB-1199
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Core
>Reporter: John D. Ament
> Fix For: 2.0.1
>
> Attachments: OWB_1199.patch
>
>
> The value of CDISeScannerService.autoScanning should be true by default.  
> There's no setter for this property, and the default value is false in java 
> so... this means this never does scanning.
> Here's a very simple patch to fix
> {code}
> Index: 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java
> ===
> --- 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (revision 1801946)
> +++ 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (working copy)
> @@ -44,7 +44,7 @@
>  
>  public class CDISeScannerService extends AbstractMetaDataDiscovery
>  {
> -private boolean autoScanning;
> +private boolean autoScanning = true;
>  private final Collection classes = new ArrayList<>();
>  
>  public OwbAnnotationFinder getFinder()
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Comment Edited] (OWB-1201) OWB Not discovering JARs in a Capsule packaged JAR

2017-07-16 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16088925#comment-16088925
 ] 

John D. Ament edited comment on OWB-1201 at 7/16/17 1:09 PM:
-

I did just give it a shot, if I use the old style bootstrap, e.g.

{code}
lifecycle = 
WebBeansContext.currentInstance().getService(ContainerLifecycle.class);
lifecycle.startApplication(null);
{code}

It works exactly as in 1.7.x, so the issue has something to do with 
SeContainerInitializer's behavior.  I'll continue to dig into it.

*And* the issues in OWB-1200 don't replicate.


was (Author: johndament):
I did just give it a shot, if I use the old style bootstrap, e.g.

{code}
lifecycle = 
WebBeansContext.currentInstance().getService(ContainerLifecycle.class);
lifecycle.startApplication(null);
{code}

It works exactly as in 1.7.x, so the issue has something to do with 
SeContainerInitializer's behavior.  I'll continue to dig into it.

> OWB Not discovering JARs in a Capsule packaged JAR
> --
>
> Key: OWB-1201
> URL: https://issues.apache.org/jira/browse/OWB-1201
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Note: this may be the root of OWB-1200
> OWB doesn't seem to discover JARs within a capsule JAR.  I package my app 
> using a bunch of dependencies, and wrap it in a capsule JAR to simplify 
> deployment (rather than having all of the JARs dumped out onto the file 
> system).
> I noticed when using OWB 1.7.3 I get this output when starting:
> {code}
> Jul 15, 2017 10:41:55 PM org.apache.webbeans.lifecycle.AbstractLifeCycle 
> bootstrapApplication
> INFO: OpenWebBeans Container is starting...
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-microprofile-1.0-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-api-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-impl-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-brave-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-spi-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-core-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/rest-cxf-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-tomcat-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-metrics-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/cxf-integration-cdi-3.1.12.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/metrics-cdi-1.3.6.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 

[jira] [Commented] (OWB-1201) OWB Not discovering JARs in a Capsule packaged JAR

2017-07-16 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16088925#comment-16088925
 ] 

John D. Ament commented on OWB-1201:


I did just give it a shot, if I use the old style bootstrap, e.g.

{code}
lifecycle = 
WebBeansContext.currentInstance().getService(ContainerLifecycle.class);
lifecycle.startApplication(null);
{code}

It works exactly as in 1.7.x, so the issue has something to do with 
SeContainerInitializer's behavior.  I'll continue to dig into it.

> OWB Not discovering JARs in a Capsule packaged JAR
> --
>
> Key: OWB-1201
> URL: https://issues.apache.org/jira/browse/OWB-1201
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Note: this may be the root of OWB-1200
> OWB doesn't seem to discover JARs within a capsule JAR.  I package my app 
> using a bunch of dependencies, and wrap it in a capsule JAR to simplify 
> deployment (rather than having all of the JARs dumped out onto the file 
> system).
> I noticed when using OWB 1.7.3 I get this output when starting:
> {code}
> Jul 15, 2017 10:41:55 PM org.apache.webbeans.lifecycle.AbstractLifeCycle 
> bootstrapApplication
> INFO: OpenWebBeans Container is starting...
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-microprofile-1.0-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-api-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-impl-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-brave-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-spi-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-core-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/rest-cxf-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-tomcat-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-metrics-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/cxf-integration-cdi-3.1.12.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/metrics-cdi-1.3.6.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/joda-time-2.9.1.jar
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> 

[jira] [Commented] (OWB-1200) OWB 2 skips producer methods defined in annotated bean archives in SE

2017-07-16 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1603#comment-1603
 ] 

John D. Ament commented on OWB-1200:


Agreed, this wouldn't work in an implicit bean archive.  However, this JAR is 
an explicit bean archive.  It has a beans.xml just with 
bean-discovery-mode=annotated.

> OWB 2 skips producer methods defined in annotated bean archives in SE
> -
>
> Key: OWB-1200
> URL: https://issues.apache.org/jira/browse/OWB-1200
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Here's a code sample that fails for me
> https://github.com/astefanutti/metrics-cdi/blob/29e7bac497513de420543497612180331cc5d1b3/impl/src/main/java/io/astefanutti/metrics/cdi/MetricNameFactory.java#L24
> Basically, from what I can tell OWB 2 misses this producer method, I believe 
> because it doesn't have a scope but the outer bean class does have a scope.
> AFAIK, per the spec, this is implicitly a `@Dependent` producer and should 
> have been picked up because the outer bean is defined as a dependent scoped 
> bean.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1201) OWB Not discovering JARs in a Capsule packaged JAR

2017-07-16 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1602#comment-1602
 ] 

John D. Ament commented on OWB-1201:


Hi,

The exact same sample works correctly w/ OWB 1.7.3.  I was planning to retry w/ 
1.7.4

There's not an easy sample to debug through, but something..

1. Checkout https://github.com/hammock-project/hammock/
2. Change dist-microprofile-cochise to include owb2 instead of owb bootstrap 
module
3. Build the project
4. Then run this example: 
https://github.com/hammock-project/hammock-examples/tree/master/hammock-microprofile
 using mvn clean install -Powb and running the output capsule JAR.

> OWB Not discovering JARs in a Capsule packaged JAR
> --
>
> Key: OWB-1201
> URL: https://issues.apache.org/jira/browse/OWB-1201
> Project: OpenWebBeans
>  Issue Type: Bug
>Reporter: John D. Ament
>
> Note: this may be the root of OWB-1200
> OWB doesn't seem to discover JARs within a capsule JAR.  I package my app 
> using a bunch of dependencies, and wrap it in a capsule JAR to simplify 
> deployment (rather than having all of the JARs dumped out onto the file 
> system).
> I noticed when using OWB 1.7.3 I get this output when starting:
> {code}
> Jul 15, 2017 10:41:55 PM org.apache.webbeans.lifecycle.AbstractLifeCycle 
> bootstrapApplication
> INFO: OpenWebBeans Container is starting...
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-microprofile-1.0-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-api-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-impl-1.8.0.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-brave-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-spi-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-core-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/rest-cxf-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-tomcat-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-metrics-1.5-SNAPSHOT.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/cxf-integration-cdi-3.1.12.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/metrics-cdi-1.3.6.jar!/META-INF/beans.xml
> Jul 15, 2017 10:41:55 PM 
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
> addWebBeansXmlLocation
> INFO: added beans archive URL: 
> file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/joda-time-2.9.1.jar
> Jul 15, 2017 10:41:55 PM 
> 

[jira] [Created] (OWB-1201) OWB Not discovering JARs in a Capsule packaged JAR

2017-07-15 Thread John D. Ament (JIRA)
John D. Ament created OWB-1201:
--

 Summary: OWB Not discovering JARs in a Capsule packaged JAR
 Key: OWB-1201
 URL: https://issues.apache.org/jira/browse/OWB-1201
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament


Note: this may be the root of OWB-1200

OWB doesn't seem to discover JARs within a capsule JAR.  I package my app using 
a bunch of dependencies, and wrap it in a capsule JAR to simplify deployment 
(rather than having all of the JARs dumped out onto the file system).

I noticed when using OWB 1.7.3 I get this output when starting:

{code}
Jul 15, 2017 10:41:55 PM org.apache.webbeans.lifecycle.AbstractLifeCycle 
bootstrapApplication
INFO: OpenWebBeans Container is starting...
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-microprofile-1.0-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-api-1.8.0.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/deltaspike-core-impl-1.8.0.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-brave-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-spi-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/hammock-core-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/rest-cxf-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/web-tomcat-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/util-metrics-1.5-SNAPSHOT.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/cxf-integration-cdi-3.1.12.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
jar:file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/metrics-cdi-1.3.6.jar!/META-INF/beans.xml
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/joda-time-2.9.1.jar
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/swagger-annotations-1.5.12.jar
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/swagger-models-1.5.12.jar
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 
file:/Users/johnament/.capsule/apps/hammock-microprofile-1.0-SNAPSHOT-capsule/jackson-dataformat-yaml-2.8.4.jar
Jul 15, 2017 10:41:55 PM 
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery 
addWebBeansXmlLocation
INFO: added beans archive URL: 

[jira] [Created] (OWB-1200) OWB 2 skips producer methods defined in annotated bean archives in SE

2017-07-15 Thread John D. Ament (JIRA)
John D. Ament created OWB-1200:
--

 Summary: OWB 2 skips producer methods defined in annotated bean 
archives in SE
 Key: OWB-1200
 URL: https://issues.apache.org/jira/browse/OWB-1200
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament


Here's a code sample that fails for me
https://github.com/astefanutti/metrics-cdi/blob/29e7bac497513de420543497612180331cc5d1b3/impl/src/main/java/io/astefanutti/metrics/cdi/MetricNameFactory.java#L24

Basically, from what I can tell OWB 2 misses this producer method, I believe 
because it doesn't have a scope but the outer bean class does have a scope.

AFAIK, per the spec, this is implicitly a `@Dependent` producer and should have 
been picked up because the outer bean is defined as a dependent scoped bean.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1199) CDISeScannerService.autoScanning should be true by default

2017-07-15 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16088624#comment-16088624
 ] 

John D. Ament commented on OWB-1199:


Any reason you skipped the test change?

> CDISeScannerService.autoScanning should be true by default
> --
>
> Key: OWB-1199
> URL: https://issues.apache.org/jira/browse/OWB-1199
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Core
>Reporter: John D. Ament
> Fix For: 2.0.1
>
> Attachments: OWB_1199.patch
>
>
> The value of CDISeScannerService.autoScanning should be true by default.  
> There's no setter for this property, and the default value is false in java 
> so... this means this never does scanning.
> Here's a very simple patch to fix
> {code}
> Index: 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java
> ===
> --- 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (revision 1801946)
> +++ 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (working copy)
> @@ -44,7 +44,7 @@
>  
>  public class CDISeScannerService extends AbstractMetaDataDiscovery
>  {
> -private boolean autoScanning;
> +private boolean autoScanning = true;
>  private final Collection classes = new ArrayList<>();
>  
>  public OwbAnnotationFinder getFinder()
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (OWB-1199) CDISeScannerService.autoScanning should be true by default

2017-07-14 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated OWB-1199:
---
Attachment: OWB_1199.patch

Attached is a more complete patch with tests.

> CDISeScannerService.autoScanning should be true by default
> --
>
> Key: OWB-1199
> URL: https://issues.apache.org/jira/browse/OWB-1199
> Project: OpenWebBeans
>  Issue Type: Bug
>  Components: Core
>Reporter: John D. Ament
> Attachments: OWB_1199.patch
>
>
> The value of CDISeScannerService.autoScanning should be true by default.  
> There's no setter for this property, and the default value is false in java 
> so... this means this never does scanning.
> Here's a very simple patch to fix
> {code}
> Index: 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java
> ===
> --- 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (revision 1801946)
> +++ 
> webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java 
> (working copy)
> @@ -44,7 +44,7 @@
>  
>  public class CDISeScannerService extends AbstractMetaDataDiscovery
>  {
> -private boolean autoScanning;
> +private boolean autoScanning = true;
>  private final Collection classes = new ArrayList<>();
>  
>  public OwbAnnotationFinder getFinder()
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (OWB-1199) CDISeScannerService.autoScanning should be true by default

2017-07-14 Thread John D. Ament (JIRA)
John D. Ament created OWB-1199:
--

 Summary: CDISeScannerService.autoScanning should be true by default
 Key: OWB-1199
 URL: https://issues.apache.org/jira/browse/OWB-1199
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Core
Reporter: John D. Ament


The value of CDISeScannerService.autoScanning should be true by default.  
There's no setter for this property, and the default value is false in java 
so... this means this never does scanning.

Here's a very simple patch to fix

{code}
Index: 
webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java
===
--- 
webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java   
(revision 1801946)
+++ 
webbeans-se/src/main/java/org/apache/openwebbeans/se/CDISeScannerService.java   
(working copy)
@@ -44,7 +44,7 @@
 
 public class CDISeScannerService extends AbstractMetaDataDiscovery
 {
-private boolean autoScanning;
+private boolean autoScanning = true;
 private final Collection classes = new ArrayList<>();
 
 public OwbAnnotationFinder getFinder()
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (OWB-1190) implement java-se support

2017-05-30 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16029241#comment-16029241
 ] 

John D. Ament commented on OWB-1190:


I started playing around with this. It seems like the right course of action is 
to introduce a new {{ScannerService}} that supports the buildable options (and 
more?) that are defined by the CDI spec.  It may make sense to add a bit more 
power to classes like ExtensionLoader to handle the use cases.  It seems that 
the expected behavior is that these Extensions are loaded in addition to what's 
defined in the service loader.

> implement java-se support
> -
>
> Key: OWB-1190
> URL: https://issues.apache.org/jira/browse/OWB-1190
> Project: OpenWebBeans
>  Issue Type: Sub-task
>  Components: Core
>Reporter: Gerhard Petracek
> Fix For: 2.0.0
>
>
> new parts:
>  * SeContainer
>  * SeContainerInitializer



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OWB-1164) Third Party Beans do not include Any qualifier if not included in bean impl

2016-12-29 Thread John D. Ament (JIRA)

[ 
https://issues.apache.org/jira/browse/OWB-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15785470#comment-15785470
 ] 

John D. Ament commented on OWB-1164:


[~rmannibucau] I see you made some changes on top of my patch.  There is one 
gotcha now.  If I change my bean to use this:

{code:java}
@Override
public Set getQualifiers()
{
Set qualifiers = new HashSet<>();
qualifiers.add(new AnyLiteral());
return qualifiers;
}
{code}

Where {{AnyLiteral}} is defined as:

{code:java}
public static class AnyLiteral implements Any
{
@Override
public Class annotationType() {
return Any.class;
}
}
{code}

I'll point out that the use of {{AnnotationLiteral}} is meant as a convenience. 
 OWB and Weld both support direct annotation subclassing like I used here.  
With your logic in place, then the bean ends up with two any qualifiers, which 
is strictly prohibited in CDI 1.2.  Using this logic gives some of the clean up 
you did but retains the check for classes.

{code:java}
private Set calculateQualifiers(final BeanAttributes 
beanAttributes)
{
final Set originalQualifiers = 
beanAttributes.getQualifiers() == null ?
Collections.emptySet() : 
beanAttributes.getQualifiers();
for(Annotation a : originalQualifiers)
{
if(a instanceof Any)
{
return originalQualifiers;
}
}
final Set newQualifiers = new HashSet<>(originalQualifiers);
newQualifiers.add(AnyLiteral.INSTANCE);
return newQualifiers;
}
{code}

> Third Party Beans do not include Any qualifier if not included in bean impl
> ---
>
> Key: OWB-1164
> URL: https://issues.apache.org/jira/browse/OWB-1164
> Project: OpenWebBeans
>  Issue Type: Bug
>Affects Versions: 1.7.0
>Reporter: John D. Ament
> Fix For: 1.7.1
>
> Attachments: 
> 0001-OWB-1164-Introduce-ThirdpartyBeanAttributes-to-calcu.patch
>
>
> Section 2.3.1 of CDI 1.2 spec indicates that custom beans should include the 
> any qualifier even if not specified by the bean impl.  OWB does not honor 
> this, instead only the original qualifiers are included in the bean.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (OWB-1164) Third Party Beans do not include Any qualifier if not included in bean impl

2016-12-28 Thread John D. Ament (JIRA)

 [ 
https://issues.apache.org/jira/browse/OWB-1164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John D. Ament updated OWB-1164:
---
Affects Version/s: 1.7.0

> Third Party Beans do not include Any qualifier if not included in bean impl
> ---
>
> Key: OWB-1164
> URL: https://issues.apache.org/jira/browse/OWB-1164
> Project: OpenWebBeans
>  Issue Type: Bug
>Affects Versions: 1.7.0
>Reporter: John D. Ament
> Fix For: 1.7.0
>
> Attachments: 
> 0001-OWB-1164-Introduce-ThirdpartyBeanAttributes-to-calcu.patch
>
>
> Section 2.3.1 of CDI 1.2 spec indicates that custom beans should include the 
> any qualifier even if not specified by the bean impl.  OWB does not honor 
> this, instead only the original qualifiers are included in the bean.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OWB-1164) Third Party Beans do not include Any qualifier if not included in bean impl

2016-12-28 Thread John D. Ament (JIRA)
John D. Ament created OWB-1164:
--

 Summary: Third Party Beans do not include Any qualifier if not 
included in bean impl
 Key: OWB-1164
 URL: https://issues.apache.org/jira/browse/OWB-1164
 Project: OpenWebBeans
  Issue Type: Bug
Reporter: John D. Ament
 Fix For: 1.7.0


Section 2.3.1 of CDI 1.2 spec indicates that custom beans should include the 
any qualifier even if not specified by the bean impl.  OWB does not honor this, 
instead only the original qualifiers are included in the bean.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (OWB-719) @Named qualifier is not adhering to CDI spec default naming conventions

2012-11-12 Thread John D. Ament (JIRA)
John D. Ament created OWB-719:
-

 Summary: @Named qualifier is not adhering to CDI spec default 
naming conventions
 Key: OWB-719
 URL: https://issues.apache.org/jira/browse/OWB-719
 Project: OpenWebBeans
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.3
Reporter: John D. Ament


Using the following test case and producer methods, OWB cannot resolve this 
bean until the third producer method.  All three work correctly in Weld.  As 
noted from original poster:

See CDI Spec 1.0, section 3.3.8:

The default name for a producer method is the method name, unless the
method follows the JavaBeans property getter naming convention, in
which case the default name is the JavaBeans property name.

@RunWith(Arquillian.class)
public class FooTest {
@Deployment
public static Archive? createTestArchive() {
return 
ShrinkWrap.create(JavaArchive.class).addClass(FooMaker.class)
.addAsManifestResource(EmptyAsset.INSTANCE, 
beans.xml);
}

@Inject @Named(foo)
private String foo;

@Test
public void testFoo() {
Assert.assertEquals(bobo, foo);
}
}

I tried the following producers, only the last worked (OWB not using method 
name or JavaBeans naming conventions)

@Produces @Named
public String getFoo() {
return bobo;
}

@Produces @Named
public String foo() {
return bobo;
}

@Produces @Named(foo)
public String foo() {
return bobo;
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira