[JBoss JIRA] Created: (CDITCK-70) Issue with org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ContainerEventTest
by Jitendra Kotamraju (JIRA)
Issue with org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ContainerEventTest
----------------------------------------------------------------------------------------
Key: CDITCK-70
URL: https://jira.jboss.org/jira/browse/CDITCK-70
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.0.0.GA
Environment: JDK 6 u15, GlassFish v3 b72, CDI TCK 1.0.1 RC1
Reporter: Jitendra Kotamraju
Fix For: 1.0.1.CR1
org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestFilter
--------------------------------------------------------------------------------------------------------------------
public class TestFilter implements Filter
{
@Inject
private Sheep sheep;
private boolean injectionPerformedCorrectly = false;
private boolean initializerCalled = false;
private boolean initCalledAfterInitializer = false;
@Inject
public void initialize(Sheep sheep) {}
public void destroy(){}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException{}
public void init(FilterConfig filterConfig) throws ServletException{}
}
AnnotatedType
-------------------------
AnnotatedType extends Annotated {
/**
* Get the business methods belonging to the class.
*
* @return the methods, or an empty set if none are defined
*/
public Set<AnnotatedMethod<? super X>> getMethods();
/**
* Get the fields belonging to the class
*
* @return the fields, or an empty set if none are defined
*/
public Set<AnnotatedField<? super X>> getFields();
}
ContainerEventTest.java
-----------------------------------------
private void validateFilterAnnotatedType(AnnotatedType<TestFilter> type) {
assert type.getFields().size() == 2;
assert type.getMethods().size() == 3;
}
* The javadoc is not clear what getMethods() and getFields() supposed to return. Do they supposed to return all methods and fields or only with @Inject annotation ? Either way, the number of fields should be 4 or 1. So the assertion doesn't seem correct to me.
Other testcases affected are:
testProcessAnnotatedTypeEventFiredForFilter
testProcessAnnotatedTypeEventFiredForJsfManagedBean
testProcessAnnotatedTypeEventFiredForServletListener
testProcessAnnotatedTypeEventFiredForTagLibraryListener
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (CDITCK-75) @RunAs role in org.jboss.jsr299.tck.tests.event.observer.transactional.TransactionalObserversTest
by Hong Zhang (JIRA)
@RunAs role in org.jboss.jsr299.tck.tests.event.observer.transactional.TransactionalObserversTest
-------------------------------------------------------------------------------------------------
Key: CDITCK-75
URL: https://jira.jboss.org/jira/browse/CDITCK-75
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.0.0.GA
Environment: X86/Ubuntu
Reporter: Hong Zhang
org.jboss.jsr299.tck.tests.event.observer.transactional.TransactionalObserversTest failed to deploy on glassfish server due to no security role mapping for @RunAs roles defined in EJB classes. By creating a default mapping in glassfish through sun-ejb-jar.xml, the test was able to deploy/run. But we were wondering about the intention of the @RunAs role as the tests do not seem to actually use the security constraints.
And when this test ran in JBoss environment, how is the security role mapping done for these @RunAs roles?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (CDITCK-76) Incorrect <servlet-name> in org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war
by Jitendra Kotamraju (JIRA)
Incorrect <servlet-name> in org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war
----------------------------------------------------------------------------------------------------------------------------------
Key: CDITCK-76
URL: https://jira.jboss.org/jira/browse/CDITCK-76
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 1.0.0.GA
Environment: GlassFish V3
Reporter: Jitendra Kotamraju
For org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.InjectionIntoWebServiceEndPointTest.war, web.xml and WebService class are listed below:
<servlet>
<servlet-name>TestWebService</servlet-name>
<servlet-class>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
@WebService(name="SheepWS")
public class SheepWSEndPoint {
}
There is no webservices.xml packaged in the war file and web.xml doesn't have metadata-complete attribute. From the 109 spec's point of view, annotation processing kicks in, and it will create a virtual <webservice-description> in a webservices.xml for every found @WebService in the war. For example:
<webservice-description>
...
<servlet-link>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-link>
</webservice-description>
<servlet-link> is used to find an entry in web.xml. If it doesn't find any entry, spec says to use defaults to create <servlet> entry and url-pattern mapping. Copied the spec sections at the end of this report. For example, an impl looks for the following entry in web.xml:
<servlet>
<servlet-name>org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint</servlet-name>
...
</servlet>
299 tck test case has a problem with the <servlet-name>. It has "TestWebService" instead of org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ws.SheepWSEndPoint
--------
[5.3.2.1] and [5.3.2.2] sections of JSR 109
For Servlet based endpoints using this annotation, fully qualified name of the Service Implementation Bean class
must be used as the <servlet-link> element in the deployment descriptor to map the Port component to the actual
Servlet.
Following default mapping rules apply for Web modules that contain Servlet based endpoints that use this
annotation but do not package a web.xml or a partial web.xml:
• fully qualified name of the Service Implementation Bean class maps to <servlet-name> element in web.xml.
• fully qualified name of the Service Implementation Bean class maps to <servlet-class> element in web.xml
(also specified in section 7.1.2)
• serviceName attribute of javax.jws.WebService annotation prefixed with "/" maps to <url-pattern> element
in web.xml. If the serviceName attribute in javax.jws.WebService annotation is not specified, then
the default value as specified in JSR-181 specification is used.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months
[JBoss JIRA] Created: (CDITCK-57) Issues in testGetStereotypesCalled and testIsNullableCalled
by Vive Pandey (JIRA)
Issues in testGetStereotypesCalled and testIsNullableCalled
-----------------------------------------------------------
Key: CDITCK-57
URL: https://jira.jboss.org/jira/browse/CDITCK-57
Project: CDI TCK
Issue Type: CTS Challenge
Security Level: Public (Everyone can see)
Components: Tests
Affects Versions: 1.0.1.CR1
Reporter: Vive Pandey
The following tests in CDI TCK 1.0.1 RC1 are failing on GlassFish v3. the tests seem to be invalid. See below:
*.definition.bean.custom.CustomBeanImplementationTest.testGetStereotypesCalled
*.definition.bean.custom.CustomBeanImplementationTest.testIsNullableCalled
the first one testGetStereotypesCalled is supposed to be set during called to Bean.getStereotypes(), and its never called. Same applies for testIsNullableCalled, which is supposed to return true when Bean.isNullable() is called, but is never called.
jsr 299 spec in 5.1.1 lays out this requirement for custom beans:
For a custom implementation of the Bean interface defined in Section 11.1, "The Bean interface", the container calls isAlternative() to determine whether the bean is an alternative, and getBeanClass() and getStereotypes() to determ- ine whether an alternative is selected in a certain bean archive.
In this test case, isAlternative() returns false, and correctly so because the associated beans.xml does not define any alternative beans or there is no @Alternative in the bean. This is defined in sec 5.1.1 and 11.1.
According to Bean.isNullable() returns true only if the Bean.create(), here CatBean.create() sometimes return null. In this case it never
public Cat create(CreationalContext<Cat> creationalContext){
return new Cat("kitty");
}
So in my investigation both these assertions testGetStereotypesCalled() and testIsNullableCalled() are invalid.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 10 months