Is there jetty recipe example for cloudify 2.7 ?
I want to use jetty to deploy my application,are there some example about it ?
I have searched in the cloudify-recipes at githup, but it does't contain jetty.
Here is a link to a Jetty recipe.
I don't know if it works or not, but it can serve as a good start for you.
Good luck,
Tamir.
Related
I'm starting to develop a new webapp, I have some past experience but this isn't my strongest area. In the past we've used Tomcat 8.5, Jersey for rest services and additionally atmosphere for websockets and realtime notifications configured through a web.xml.
Starting a new project I wanted to pick up the latest versions of everything. I have tomcat 10 and jersey running together without a web.xml and I was just wanting to add atmosphere in. As far as I understand atmosphere 3.0.2 should be fine with servlet-api 5.0.0. When tomcat starts I can see org.atmosphere.cpr.ContainerInitializer runs but it doesn't find the AtmosphereServlet.
Is there something extra that's needed to make this available? I can see it on the classpath but I'm not sure what is needed to make tomcat incorporate it into the ServletContext servlet registrations as atmosphere seems to expect.
Thanks for any help.
Possibly a Friday afternoon problem.
Annotating my extension of AtmosphereServlet as a #WebServlet and including a url pattern in the annotation causes everything to spark into life.
I'm using servlet 2.3 for my project development due to some legacy code we have. Is there a way to get the context path in the init method or any other way of the servlet?
I know it's possible on higher versions of Servlet and can get it in hacky way using the getRealPath() method on servlet 2.3. However I'm still looking for a better and cleaner code.
I wasn't able to do this. The best way I found was to move to 2.5 spec.
Posting answer just in case anyone is trying the same.
I hava met some problems .
I want to encrypt the war using Spring by a tool named ClassGuard ,but when I deploy it to Tomcat and started to launch it , some problems(seemed to be A fatal error has been detected by the Java Runtime Environment) arised .
have anyone used ClassGuard and met problems like this?
please help me...thanks in advance!
Although without the exception we can only speculate, the ClassGuard FAQ section clearly states that:
As of Version 1.5, ClassGuard supports Tomcat containers.
To use ClassGuard in combination with tomcat, you have to configure your web application for using the ClassGuard tomcat class
loader. This can be set in the context of the web application.
So make sure that:
You are using the latest stable version.
You are using the appropriate class loader.
A probably (although not sure if it is what you are after) easier way to discourage usage of your code would be through Obfuscation Tools such as these.
At the moment, the Hibernate Validator has released the latest version as 4.3.0.Final here. I have tried to upgrade it to my Glassfish 3.1.2 as the following step: -
1. Remove the GLASSFISH/glassfish/modules/bean-validator.jar
2. Copying the hibernate-validator-4.3.0.Final.jar to GLASSFISH/glassfish/modules
3. Restart the Glassfish
4. The Glassfish cannot start. It seems hang.
After searching via the Google, I've found that the file named "bean-validator.jar" was created by the Glassfish team as an OSGi version. Sadly, I cannot find how to create it. Could you please help to advise further? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.
A (slightly outdated) description of how to build Glassfish's bean-validator.jar can be found here.
What's needed in general is an OSGi bundle which includes Hibernate Validator itself and the Bean Validation API. With this bundle you should be able to replace the original bean-validator.jar. Additionally you need the JBoss Logging bundle, which is used since release 4.3 by Hibernate Validator as logging API and already comes in form of an OSGi bundle.
If you're building a web application, you could also package HV 4.3 within your WAR and turn off class loader delegation by providing the file WEB-INF/glassfish-web.xml with the following contents:
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<class-loader delegate="false" />
</glassfish-web-app>
That way the HV classes will be loaded from your application instead of from the module provided by Glassfish.
You might also be interested in the issue GLASSFISH-15648 which aims to provide a dedicated Glassfish update package for HV.
As my case was ear, rather than war, based on suggestion of Gunnar, I did a patched version of the module, that is deployable to Glassfish (My version is 3.1.1 OSE).
Someone might find it still useful, see my blog for my solution (including step-by-step approach): http://peter-butkovic.blogspot.de/2012/11/glassfish-311-oss-with-hibernate.html
I am creating a POC using Apache Camel 2.8 and its AHC component.
I could not find any examples on Apache Camel's website's Examples section for the same.
Also on the AHC component detail page http://camel.apache.org/ahc.html examples only show request being sent to a single URL.For sending requests to multiple URLs in aysnchronous manner and handling their callbacks and responses I cannot see any examples.
If anybody has worked on this and can point me to where I can find the desired examples I would be very much thankful.
Also I was looking out for the unit tests for Camel's AHC component in my local maven repository but could not find the test-sources JAR file.From where and how can I download the same? Unit tests would help in how to use the AHC component API.
I could find the test source code at this location
https://fisheye6.atlassian.com/browse/camel/trunk/components/camel-ahc/src/test/java/org/apache/camel/component/ahc
Is there any way in which I can download all the tests in the form of a JAR file?
Thanks,
Jignesh
The camel-ahc component is asynchronous by default.
See more details here and the links from that page: http://camel.apache.org/asynchronous-routing-engine.html
So if you for example have a Camel route that does a request/reply using AHC, then you can do route messages concurrently, and the camel-ahc runs asynchronously.