"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testsuite/integration/clustering/src/test/java/org/jboss/as/test/clustering/cluster/web/event/SessionActivationServlet.java" between
wildfly-21.0.0.Final-src.zip and wildfly-21.0.1.Final-src.zip

About: WildFly is an application server with a standards-compliant, fast and lightweight implementation of the Java Enterprise Edition 7 Platform specifications (formerly known as JBoss community version). Sources.

SessionActivationServlet.java  (wildfly-21.0.0.Final-src):SessionActivationServlet.java  (wildfly-21.0.1.Final-src)
skipping to change at line 66 skipping to change at line 66
public static URI createURI(URL baseURL) throws URISyntaxException { public static URI createURI(URL baseURL) throws URISyntaxException {
return createURI(baseURL.toURI()); return createURI(baseURL.toURI());
} }
public static URI createURI(URI baseURI) { public static URI createURI(URI baseURI) {
return baseURI.resolve(SERVLET_NAME); return baseURI.resolve(SERVLET_NAME);
} }
@Override @Override
protected void service(HttpServletRequest request, HttpServletResponse respo
nse) throws ServletException, IOException {
request.getServletContext().log(String.format("[%s] %s", request.getMeth
od(), request.getRequestURI()));
super.service(request, response);
}
@Override
protected void doPut(HttpServletRequest request, HttpServletResponse respons e) throws ServletException, IOException { protected void doPut(HttpServletRequest request, HttpServletResponse respons e) throws ServletException, IOException {
request.getServletContext().log(request.getRequestURI() + ":PUT");
HttpSession session = request.getSession(); HttpSession session = request.getSession();
SessionActivationListener listener = new ImmutableSessionActivationListe ner(true); SessionActivationListener listener = new ImmutableSessionActivationListe ner(true);
session.setAttribute(IMMUTABLE_ATTRIBUTE_NAME, listener); session.setAttribute(IMMUTABLE_ATTRIBUTE_NAME, listener);
listener.assertActive(); listener.assertActive();
listener = new MutableSessionActivationListener(true); listener = new MutableSessionActivationListener(true);
session.setAttribute(MUTABLE_ATTRIBUTE_NAME, listener); session.setAttribute(MUTABLE_ATTRIBUTE_NAME, listener);
listener.assertActive(); listener.assertActive();
} }
@Override @Override
protected void doGet(HttpServletRequest request, HttpServletResponse respons e) throws ServletException, IOException { protected void doGet(HttpServletRequest request, HttpServletResponse respons e) throws ServletException, IOException {
request.getServletContext().log(request.getRequestURI() + ":GET");
HttpSession session = request.getSession(); HttpSession session = request.getSession();
((SessionActivationListener) session.getAttribute(IMMUTABLE_ATTRIBUTE_NA ME)).assertActive(); ((SessionActivationListener) session.getAttribute(IMMUTABLE_ATTRIBUTE_NA ME)).assertActive();
((SessionActivationListener) session.getAttribute(MUTABLE_ATTRIBUTE_NAME )).assertActive(); ((SessionActivationListener) session.getAttribute(MUTABLE_ATTRIBUTE_NAME )).assertActive();
} }
@Override @Override
protected void doDelete(HttpServletRequest request, HttpServletResponse resp onse) throws ServletException, IOException { protected void doDelete(HttpServletRequest request, HttpServletResponse resp onse) throws ServletException, IOException {
request.getServletContext().log(request.getRequestURI() + ":DELETE");
HttpSession session = request.getSession(); HttpSession session = request.getSession();
request.getServletContext().log(request.getRequestURI() + ":removeAttrib ute(" + IMMUTABLE_ATTRIBUTE_NAME + ")");
session.removeAttribute(IMMUTABLE_ATTRIBUTE_NAME); session.removeAttribute(IMMUTABLE_ATTRIBUTE_NAME);
request.getServletContext().log(request.getRequestURI() + ":removeAttrib ute(" + MUTABLE_ATTRIBUTE_NAME + ")");
session.removeAttribute(MUTABLE_ATTRIBUTE_NAME); session.removeAttribute(MUTABLE_ATTRIBUTE_NAME);
} }
private static class MutableSessionActivationListener extends SessionActivat ionListener { private static class MutableSessionActivationListener extends SessionActivat ionListener {
private static final long serialVersionUID = 7944013938798510317L; private static final long serialVersionUID = 7944013938798510317L;
MutableSessionActivationListener(boolean active) { MutableSessionActivationListener(boolean active) {
super(active); super(active);
} }
} }
 End of changes. 6 change blocks. 
5 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)