-
1. Implementing DeploymentContainer - What to put to ProtocolMetaData?
ozizka Apr 1, 2011 8:13 PM (in response to ozizka)I think I got it... the list from Tomcat doesn't contain listing of servlet mappings, so I am shifted one level up in what I am parsing
-
2. Implementing DeploymentContainer - What to put to ProtocolMetaData?
aslak Apr 4, 2011 5:14 AM (in response to ozizka)Yea, the ProtocolMetaData should contain a HTTPContext with all Servlets in the Deployment.
-
3. Implementing DeploymentContainer - What to put to ProtocolMetaData?
ozizka Apr 4, 2011 7:06 AM (in response to aslak)What does it use for? What if I don't fill it?
-
4. Implementing DeploymentContainer - What to put to ProtocolMetaData?
aslak Apr 4, 2011 7:26 AM (in response to ozizka)It is used by the Protocol implementation, e.g. Servlet 2.5/3.0. They add them selves to the deployment in the packaging phase so the test can be executed incontainer. They expect if(when) you execute the @Test to find 'them sevles' in the metadata to know which ip/port/contextRoot to use to execute against. If you don't provide this info, only Client mode will work.
Also, the @ArquillianResource URL injection point enricher use this info to fetch baseURL from your deployment. e.g.
@ArquillianResource(MyServlet.class) URL baseUrl; <-- could be http://localhost:8080/my.war/
-
5. Re: Implementing DeploymentContainer - What to put to ProtocolMetaData?
ozizka Apr 7, 2011 10:02 AM (in response to ozizka)I'm still not able to fix ArquillianServletRunner not found.
We discussed the HTTPContext, now I am filling it correctly, but that error is caused by the server not being packed to the WAR.
I have found org.jboss.arquillian.protocol.servlet.v_3.web-fragment.xml. There's
<servlet> <servlet-name>ArquillianServletRunner</servlet-name> <servlet-class>org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner</servlet-class> </servlet> <servlet-mapping> <servlet-name>ArquillianServletRunner</servlet-name> <url-pattern>/ArquillianServletRunner</url-pattern> </servlet-mapping>
But it seems it's not applied to the web.xml of my war (created by ShrinkWrap).
I've also tried to add org.jboss.arquillian.protocol.servlet.ServletUtil.class.getPackage() to addPackages (recursively); didn't help.
What should I try next?
-
6. Re: Implementing DeploymentContainer - What to put to ProtocolMetaData?
ozizka Apr 7, 2011 10:09 AM (in response to ozizka)I will try to use the ProtocolDeploymentAppender from my appender.