Tapestry on Resin

Installing Tapestry applications in Resin Created: 07-May-2004 Disclaimer: I wrote this document after loosing time trying to deploy Tapestry applications with Resin. This document might not be complete it only contains steps I took to assure that my application worked as planed. This is not intended to be a complete solution for deploying Tapestry applications on resin and completions are welcome. application – The application was using Tapestry 3.0-beta4 and Hibernate...

<span title='2006-11-19 03:22:15 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

RMI over HTTP (2)

Update 04-dec-2004: This document has been deprecated. Check this basic example on how you can call a bean remotely through HTTP. Tested with JBoss 3.2.6. You can download it here (source). Follow this steps: modify build.properties with you jboss path and src/httpTest/remote/jndi.properties with your hostname copy jboss-common.jar, jboss-transaction.jar, jnpserver.jar, jboss-j2ee.jar, jboss.jar to the lib directory run ant deploy (will deploy the ear to you jboss) run ant test (requires jboss running) inspect the code, enjoy....

<span title='2006-11-19 03:15:36 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

RMI over HTTP (1)

Update 04-dec-2004: This document has been deprecated. Check this basic example on how you can call a bean remotely through HTTP. Tested with JBoss 3.2.6. You can download it here (source). Follow this steps: modify build.properties with you jboss path and src/httpTest/remote/jndi.properties with your hostname copy jboss-common.jar, jboss-transaction.jar, jnpserver.jar, jboss-j2ee.jar, jboss.jar to the lib directory run ant deploy (will deploy the ear to you jboss) run ant test (requires jboss running) inspect the code, enjoy....

<span title='2006-11-19 03:08:42 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

EJB Hibernate

Simple guide on using ejb’s with hibernate Last updated: 20-Nov-2003 Disclaimer: this document is mainly a compilation from different sources (see links) and the result of the effort to put everything together. Purpose: this is merely a step-by-step document ilustrating how to put everything together assuming that you know all the components. It is wrote in the purpose that it might spare someone the 2 days it took me to start everything....

<span title='2006-11-19 02:56:35 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

EJB remoting

How to setup a ejb remote application using JBoss and Hibernate Updated (04-dec-2004): Very basic example on how you can call a bean remotely through HTTP. Tested with JBoss 3.2.6. You can download it here (source). Follow this steps: – modify build.properties with you jboss path and src/httpTest/remote/jndi.properties with your hostname – copy jboss-common.jar, jboss-transaction.jar, jnpserver.jar, jboss-j2ee.jar, jboss.jar to the lib directory – run ant deploy (will deploy the ear to you jboss)...

<span title='2006-11-19 02:46:19 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

postgres-service.xml

<?xml version="1.0" encoding="UTF-8"??> jdbc/PostgresDS jdbc:postgresql://[HOSTNAME]:5432/[DBNAME] org.postgresql.Driver [USERNAME] [password] jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper 0 50 5000 15 ByContainer jboss.jca:service=CachedConnectionManager jboss.security:service=JaasSecurityManager java:/TransactionManager jboss.jca:service=RARDeployer

<span title='2006-11-19 02:46:18 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

jboss-service.xml

jboss.jca:service=RARDeployer jboss.jca:service=LocalTxCM,name=PostgresDS mapping.hbm.xml java:/hibernate/HibernateFactory java:/jdbc/PostgresDS cirrus.hibernate.sql.PostgreSQLDialect cirrus.hibernate.transaction.JBossTransactionManagerLookup false

<span title='2006-11-19 02:46:15 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

build.xml

<?xml version="1.0"??> delete from doc\_meta; delete from module;

<span title='2006-11-19 02:46:11 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

Blender m-import

# Port to the new python api from original source at:<br></br># http://www.janw.gothere.uk.com/Download/Python/mimport.py<br></br># $Id: mimport.py,v 1.1 2004/01/30 00:08:13 len Exp $<br></br>import string<br></br>import Blender<br></br>from Blender import NMesh<br></br><br></br>Mscale = 10<br></br><br></br>def mImport(filename):<br></br> print 'mImport("%s")' % filename<br></br> file = open(filename, "r")<br></br> lines = file.readlines()<br></br> linenumber = 1<br></br> print "import into Blender ..."<br></br> mesh = NMesh.GetRaw()<br></br> verts = {}<br></br> for line in lines:<br></br> words = string.split(line)<br></br> if words and words[0] == "#":<br></br> pass # ignore comments<br></br> elif words and words[0] == "Vertex":<br></br> # words[1] is the index of the vertex<br></br> name = words[1]<br></br> x = Mscale * string....

<span title='2006-11-19 02:41:37 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len

Image segmentation

#!/usr/bin/python<br></br># segment an image using a point and a threshold,<br></br># intended to be used for mri dicom images<br></br># $Id: srg.py,v 1.1 2004/01/30 00:08:13 len Exp $<br></br><br></br>import Image<br></br>import math, sys<br></br><br></br>cb = 0 #not initialized <br></br>cw = 1 #initialized false<br></br>cp = 2 #processing<br></br>cr = 255 #initialized true<br></br>th = 30 #threshold<br></br><br></br><br></br>def comp_pix(x, y):<br></br> return x[1] - y[1]<br></br><br></br>def check_pix_th(im, mask, pix, avg):<br></br> if mask.getpixel(pix) == cb:<br></br> delta = im.getpixel(pix) - avg<br></br> if math.fabs(delta) < th:<br></br> return 1<br></br> return 0<br></br><br></br>def add_pix(im, mask, pix, avg, ssl):<br></br> if mask....

<span title='2006-11-19 02:40:07 +0000 UTC'>November 19, 2006</span>&nbsp;·&nbsp;len