mercoledì 22 agosto 2012
ubuntu update sun jdk
chmod 777 jdk-6u33-linux-x64.bin
./jdk-6u33-linux-x64.bin
ls
mv jdk1.6.0_33 /usr/lib/jvm/
sudo mv jdk1.6.0_33 /usr/lib/jvm/
cd /usr/lib/jvm/
ls
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
mercoledì 11 luglio 2012
creare modulo attivo (con annotazioni) in jboss 7.1.1.final
jandex versione 1.0.3.final (non la 1.0.4 - elimina il jar senza dire nulla).
- produce il file idx e lo inserisce nel jar sotto meta-inf
java -jar jandex-1.0.3.Final.jar -m -v commons2Web-1.6.2.jar
aggiungerlo come modulo.
per gestire la dipendeza nell'applicazione che la usa, creare il file jboss-deplyment-structure.xml (sotto web-inf) e aggiungere la voce:
<module name="it.coopservice.commons2Web" export="true" slot="no-renderer" annotations="true">
<imports>
<include path="*" />
</imports>
</module>
per riferimenti:
https://community.jboss.org/thread/196129
- produce il file idx e lo inserisce nel jar sotto meta-inf
java -jar jandex-1.0.3.Final.jar -m -v commons2Web-1.6.2.jar
aggiungerlo come modulo.
per gestire la dipendeza nell'applicazione che la usa, creare il file jboss-deplyment-structure.xml (sotto web-inf) e aggiungere la voce:
<module name="it.coopservice.commons2Web" export="true" slot="no-renderer" annotations="true">
<imports>
<include path="*" />
</imports>
</module>
per riferimenti:
https://community.jboss.org/thread/196129
giovedì 28 giugno 2012
openshift: hot deploy
Da provare!!
basta aggiungere un solo file (hot_deploy) nella cartella .openshift/markers/ per evitare che openshift faccia il reboot dell'application server.
bisogna vedere come si comporta (forse va aggiunto nel commit il file ROOT.war.dodeploy per effettuare il rideploy a caldo)
https://openshift.redhat.com/community/blogs/new-openshift-release-june-26-2012-jboss-eap-hot-deployments-pricing-and-more
basta aggiungere un solo file (hot_deploy) nella cartella .openshift/markers/ per evitare che openshift faccia il reboot dell'application server.
bisogna vedere come si comporta (forse va aggiunto nel commit il file ROOT.war.dodeploy per effettuare il rideploy a caldo)
https://openshift.redhat.com/community/blogs/new-openshift-release-june-26-2012-jboss-eap-hot-deployments-pricing-and-more
Hot Deployment
Hot deployment is slowly being added. We've started with the Jboss AS 7 cartridge, but will be implementing the same feature with the others soon. Hot deployment allows you to push to your application without having to restart it. This helps with zero downtime deployments. To use it add the following marker to your git repo:
.openshift/markers/hot_deploy
Just git add, commit and push it and we'll attempt to deploy the new code without stopping JBoss. Keep in mind you still have to live inside your memory footprint.
So, if you have a memory intensive app that has a memory intensive build, you may want to look at using Jenkins to build so the process happens inside a different gear.
Etichette:
hot_deploy,
jboss7,
openshift
openshift: come gestire la rotazione dei log
Utile post dal forum per gestire la rotazione dei log ed eventuale eliminazione/compressione:
https://openshift.redhat.com/community/forums/openshift/log-rotation-not-enabled
https://openshift.redhat.com/community/forums/openshift/log-rotation-not-enabled
cd $OPENSHIFT_LOGS_DIR find . -type f ( -name access_log-* , -name error_log-* ) -mtime +180 # Add this to the above command to backup as a gzipped tarball: | xargs tar -czvf backup-logs-$(date +%Y%m%d).tar.gz # Add this to the above command to delete 'em: -exec rm {} \; or | xargs rm)
martedì 5 giugno 2012
openshift+jboss: RewriteValve from 80 to 443
riportato dal forum:
1. In your application, create a file called jboss-web.xml in src/main/webapp/WEB-INF/ directory with this content.
sh$ cat src/main/webapp/WEB-INF/jboss-web.xml
<jboss-web>
<security-domain>jboss-web-policy</security-domain>
<valve>
<class-name>org.jboss.web.rewrite.RewriteValve</class-name>
</valve>
</jboss-web>
2. Create a rewrite.properties file in the src/main/webapp/WEB-INF/ directory with checking for http and redirecting to https.
<security-domain>jboss-web-policy</security-domain>
<valve>
<class-name>org.jboss.web.rewrite.RewriteValve</class-name>
</valve>
</jboss-web>
2. Create a rewrite.properties file in the src/main/webapp/WEB-INF/ directory with checking for http and redirecting to https.
sh$ cat src/main/webapp/WEB-INF/rewrite.properties
RewriteCond %{HTTP:X-Forwarded-Proto} http
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
links utili
sabato 19 maggio 2012
jboss7 deployment timeout
Se il server va in timeout durante il deploy, undeploya tutte le applicazioni.
per evitarlo:
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="6000"/>
</subsystem>
per evitarlo:
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="6000"/>
</subsystem>
java.lang.IllegalStateException: Parameter count exceeded allowed maximum: 512
immagina di avere una mega griglia con numero di parametri variabile ed alto...
quando viene fatto il submit e partono i valori jboss7 risponde:
quando viene fatto il submit e partono i valori jboss7 risponde:
java.lang.IllegalStateException: Parameter count exceeded allowed maximum: 512
https://community.jboss.org/thread/197650?_sscc=t
Add the following system property to the configuration file(eg standalone.xml).<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="10000"/>grande openshift!!
Iscriviti a:
Post (Atom)