namtzigla / cxf-protobuf Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/cxf-protobuf
Automatically exported from code.google.com/p/cxf-protobuf
Hi, I am using cxf-protobuf 0.3, CXF framework 2.3 and Protobuf-java 2.3 in my
web application, which runs on Tomcat 7.
I create 2 services with these steps:
1.
<bean class="com.package.ServicesFactoryBean"
init-method="create" destroy-method="destroy">
<property name="serviceName" value="ContextService" />
<property name="protoPackage" value="ContextProtos" />
<property name="production" value="true" />
</bean>
<bean class="com.package.ServicesFactoryBean"
init-method="create" destroy-method="destroy">
<property name="serviceName" value="JobService" />
<property name="protoPackage" value="JobProtos" />
<property name="production" value="true" />
</bean>
2. Implementation of bean:
public class ServicesFactoryBean {
ProtobufServerFactoryBean factoryBean = new ProtobufServerFactoryBean();
String serviceName;
String protoPackage;
Server server;
boolean production = true;
@SuppressWarnings({ "rawtypes", "unchecked" })
public Server create() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
if (getServiceName() == null)
throw new IllegalStateException("Service name not set in services.xml");
String pkg;
if (isProduction())
pkg = "com.package.core.srv.";
else
pkg = "com.package.core.srv.stub.";
Class srvBeanClass = Class.forName(pkg + getServiceName() + "Impl");
Class msgBeanClass = Class.forName("com.package.proto." + getProtoPackage() + "$"
+ getServiceName() + "Message");
factoryBean.setAddress("http://"
+ ClanCoreProperties.getInstance().getProperty(ClanCoreProperties.CORE_JETTY_HOST_NAME) + ":"
+ ClanCoreProperties.getInstance().getProperty(ClanCoreProperties.CORE_JETTY_PORT) + "/"
+ getServiceName());
factoryBean.setServiceBean(srvBeanClass.newInstance());
factoryBean.setMessageClass(msgBeanClass);
server = factoryBean.create();
return server;
}
public void destroy() {
server.stop();
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public boolean isProduction() {
return production;
}
public void setProduction(boolean production) {
this.production = production;
}
public String getProtoPackage() {
return protoPackage;
}
public void setProtoPackage(String protoPackage) {
this.protoPackage = protoPackage;
}
}
When I undeploy application from Tomcat, I get warnings about unclosed threads.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-23] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-24] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-25] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-26] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-27] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-28] but has failed to stop it. This is very likely to
create a memory leak.
1.12.2010 14:05:10 org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [/clan-cr-20101201] appears to have started a
thread named [qtp12098501-29] but has failed to stop it. This is very likely to
create a memory leak.
When I remove starting these services, there are any warnings. Could you help
me to fix these problems? Thanks a lot.
Original issue reported on code.google.com by [email protected]
on 1 Dec 2010 at 1:21
Is Google Protocol buffer compatible with CXF 2.6.0 or greater?
what is the highest CXF version compatible with protocol buffer?
Original issue reported on code.google.com by [email protected]
on 1 Oct 2012 at 6:43
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.