Issue #3162 - Reverting not-relevant OSGi changes
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
755d5728d9
commit
26fa79a050
|
@ -74,8 +74,6 @@ public class AnnotationConfiguration extends org.eclipse.jetty.annotations.Annot
|
|||
|
||||
public AnnotationConfiguration()
|
||||
{
|
||||
super();
|
||||
protectAndExpose("org.eclipse.jetty.osgi.annotations.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.osgi.util.tracker.BundleTracker;
|
|||
*/
|
||||
public class BundleContextProvider extends AbstractContextProvider implements BundleProvider
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(BundleContextProvider.class);
|
||||
private static final Logger LOG = Log.getLogger(AbstractContextProvider.class);
|
||||
|
||||
private Map<String, App> _appMap = new HashMap<String, App>();
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.osgi.util.tracker.BundleTracker;
|
|||
*/
|
||||
public class BundleWebAppProvider extends AbstractWebAppProvider implements BundleProvider
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(BundleWebAppProvider.class);
|
||||
private static final Logger LOG = Log.getLogger(AbstractWebAppProvider.class);
|
||||
|
||||
/**
|
||||
* Map of Bundle to App. Used when a Bundle contains a webapp.
|
||||
|
|
|
@ -49,7 +49,7 @@ import org.osgi.util.tracker.ServiceTracker;
|
|||
*/
|
||||
public class ServiceContextProvider extends AbstractContextProvider implements ServiceProvider
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ServiceContextProvider.class);
|
||||
private static final Logger LOG = Log.getLogger(AbstractContextProvider.class);
|
||||
|
||||
private Map<ServiceReference, App> _serviceMap = new HashMap<>();
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ import org.osgi.util.tracker.ServiceTracker;
|
|||
*/
|
||||
public class ServiceWebAppProvider extends AbstractWebAppProvider implements ServiceProvider
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(ServiceWebAppProvider.class);
|
||||
private static final Logger LOG = Log.getLogger(AbstractWebAppProvider.class);
|
||||
|
||||
/**
|
||||
* Map of ServiceRef to App. Used when it is an osgi service that is a WebAppContext.
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
org.eclipse.jetty.osgi.annotations.AnnotationConfiguration
|
||||
org.eclipse.jetty.osgi.boot.OSGiWebInfConfiguration
|
||||
org.eclipse.jetty.osgi.boot.OSGiMetaInfConfiguration
|
||||
|
|
|
@ -12,12 +12,10 @@
|
|||
<Set name="contexts">
|
||||
<Ref refid="Contexts" />
|
||||
</Set>
|
||||
<!--
|
||||
<Call name="setContextAttribute">
|
||||
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
||||
<Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
|
||||
</Call>
|
||||
-->
|
||||
</New>
|
||||
</Arg>
|
||||
</Call>
|
||||
|
|
|
@ -19,10 +19,9 @@
|
|||
package org.eclipse.jetty.osgi.test;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.eclipse.jetty.websocket.api.Session;
|
||||
import org.eclipse.jetty.websocket.api.StatusCode;
|
||||
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
|
||||
|
@ -36,7 +35,6 @@ import org.eclipse.jetty.websocket.api.annotations.WebSocket;
|
|||
@WebSocket(maxTextMessageSize = 64 * 1024)
|
||||
public class SimpleEchoSocket
|
||||
{
|
||||
private static final Logger LOG = Log.getLogger(SimpleEchoSocket.class);
|
||||
private final CountDownLatch closeLatch;
|
||||
@SuppressWarnings("unused")
|
||||
private Session session;
|
||||
|
@ -54,8 +52,7 @@ public class SimpleEchoSocket
|
|||
@OnWebSocketClose
|
||||
public void onClose(int statusCode, String reason)
|
||||
{
|
||||
LOG.debug("Connection closed: {} - {}", statusCode, reason);
|
||||
|
||||
//System.out.printf("Connection closed: %d - %s%n",statusCode,reason);
|
||||
this.session = null;
|
||||
this.closeLatch.countDown(); // trigger latch
|
||||
}
|
||||
|
@ -63,11 +60,16 @@ public class SimpleEchoSocket
|
|||
@OnWebSocketConnect
|
||||
public void onConnect(Session session)
|
||||
{
|
||||
LOG.debug("Got connect: {}", session);
|
||||
//System.out.printf("Got connect: %s%n",session);
|
||||
this.session = session;
|
||||
try
|
||||
{
|
||||
session.getRemote().sendString("Foo");
|
||||
Future<Void> fut;
|
||||
//System.err.println("Sending Foo!");
|
||||
fut = session.getRemote().sendStringByFuture("Foo");
|
||||
|
||||
fut.get(2,TimeUnit.SECONDS); // wait for send to complete.
|
||||
//System.err.println("Foo complete");
|
||||
|
||||
session.close(StatusCode.NORMAL,"I'm done");
|
||||
}
|
||||
|
@ -80,6 +82,6 @@ public class SimpleEchoSocket
|
|||
@OnWebSocketMessage
|
||||
public void onMessage(String msg)
|
||||
{
|
||||
LOG.debug("Got msg: {}", msg);
|
||||
//System.out.printf("Got msg: %s%n",msg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ public class TestJettyOSGiBootHTTP2Conscrypt
|
|||
public Option[] config()
|
||||
{
|
||||
ArrayList<Option> options = new ArrayList<>();
|
||||
options.add(TestOSGiUtil.optionalRemoteDebug());
|
||||
options.add(CoreOptions.junitBundles());
|
||||
options.addAll(TestOSGiUtil.configureJettyHomeAndPort(true,"jetty-http2.xml"));
|
||||
options.add(CoreOptions.bootDelegationPackages("org.xml.sax", "org.xml.*", "org.w3c.*", "javax.xml.*", "javax.activation.*"));
|
||||
|
|
|
@ -64,7 +64,7 @@ public class TestJettyOSGiBootWithJavaxWebSocket
|
|||
public static Option[] configure()
|
||||
{
|
||||
ArrayList<Option> options = new ArrayList<>();
|
||||
options.add(TestOSGiUtil.optionalRemoteDebug());
|
||||
// options.add(TestOSGiUtil.optionalRemoteDebug());
|
||||
options.add(CoreOptions.junitBundles());
|
||||
options.addAll(TestOSGiUtil.configureJettyHomeAndPort(false, "jetty-http-boot-with-javax-websocket.xml"));
|
||||
options.add(CoreOptions.bootDelegationPackages("org.xml.sax", "org.xml.*", "org.w3c.*", "javax.sql.*","javax.xml.*", "javax.activation.*"));
|
||||
|
|
|
@ -55,7 +55,6 @@ public class TestJettyOSGiBootWithWebSocket
|
|||
public static Option[] configure()
|
||||
{
|
||||
ArrayList<Option> options = new ArrayList<>();
|
||||
options.add(TestOSGiUtil.optionalRemoteDebug());
|
||||
options.add(CoreOptions.junitBundles());
|
||||
options.addAll(TestOSGiUtil.configureJettyHomeAndPort(false, "jetty-http-boot-with-websocket.xml"));
|
||||
options.add(CoreOptions.bootDelegationPackages("org.xml.sax", "org.xml.*", "org.w3c.*", "javax.sql.*","javax.xml.*", "javax.activation.*"));
|
||||
|
|
Loading…
Reference in New Issue