This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.jboss.weld.environment.osgi.integration; | |
| import java.util.Hashtable; | |
| import java.util.Map; | |
| import org.jboss.weld.bean.proxy.ProxyMethodHandler; | |
| import org.jboss.weld.bootstrap.api.Singleton; | |
| import org.jboss.weld.bootstrap.api.SingletonProvider; | |
| import org.osgi.framework.Bundle; | |
| import org.osgi.framework.FrameworkUtil; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.sample.ws; | |
| import java.lang.reflect.Method; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; | |
| import org.apache.cxf.endpoint.Client; | |
| import org.apache.cxf.service.model.MessagePartInfo; | |
| import org.apache.cxf.service.model.OperationInfo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ApplicationScoped | |
| public class ServiceListener { | |
| public void bindService(@Observes @Specification(MyService.class) ServiceArrival event) { | |
| System.out.println("A new service just arrived"); | |
| MyService arrived = event.type(MyService.class).getService(); | |
| } | |
| public void unbindService(@Observes @Specification(MyService.class) ServiceDeparture event) { | |
| System.out.println("A service just went out"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ServiceListener { | |
| public void bindService(MyService service) { | |
| } | |
| public void unbindService(MyService service) { | |
| } | |
| } | |
| // with configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Embed-Dependency *; scope=compile; inline=true; artifactId=!org.osgi.core, | |
| Export-Package org.osgi.cdi.api.extension; \ | |
| org.osgi.cdi.api.extension.annotation; \ | |
| org.osgi.cdi.api.extension.events; \ | |
| org.osgi.cdi.api.integration; \ | |
| javax.el; \ | |
| javax.inject; \ | |
| javax.decorator; \ | |
| javax.annotation; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Export-Package org.osgi.cdi.impl; \ | |
| org.osgi.cdi.impl.extension; \ | |
| org.osgi.cdi.impl.extension.services; \ | |
| org.osgi.cdi.impl.integration | |
| Import-Package org.osgi.cdi.api.extension; \ | |
| org.osgi.cdi.api.extension.annotation; \ | |
| org.osgi.cdi.api.extension.events; \ | |
| org.osgi.cdi.api.integration; \ | |
| javax.inject; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Embed-Dependency *; scope=compile; inline=true; artifactId=!cdi-osgi-api|cdi-osgi-impl|jboss-interceptor-api|javax.inject|jsr250-api|cdi-api|el-api, \ | |
| slf4j-jdk14; inline=true | |
| -exportcontents org.jboss.weld.context; \ | |
| org.jboss.weld.ejb; \ | |
| org.jboss.weld.bean; \ | |
| org.jboss.weld.bean.builtin; \ | |
| org.jboss.weld.bean.proxy; \ | |
| org.jboss.weld.environment.osgi; \ | |
| org.jboss.weld.environment.osgi.integration; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Collection; | |
| import java.util.Properties; | |
| import org.osgi.framework.Bundle; | |
| import org.osgi.framework.BundleListener; | |
| import org.osgi.framework.ServiceListener; | |
| import org.osgi.framework.ServiceReference; | |
| import org.osgi.framework.ServiceRegistration; | |
| public interface OSGiBridge { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tools.nsc.interpreter.Results._ | |
| import tools.nsc.interpreter.IMain | |
| import tools.nsc.Settings | |
| class ResultHolder(var value : Any) | |
| class ScalaInterpreter(settings: Settings) extends IMain(settings) { | |
| val writer = new java.io.StringWriter() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private InjectionTarget it; | |
| private AnnotatedType annotated; | |
| private BeanManager beanManager; | |
| public <T> T create(CreationalContext<T> creationalContext) { | |
| annotated = beanManager.createAnnotatedType(myType); | |
| it = manager.createInjectionTarget(annotated); | |
| T instance = (T) it.produce(creationalContext); | |
| it.inject(instance, creationalContext); | |
| it.postConstruct(instance); |
OlderNewer