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)...

November 19, 2006 · len

postgres-service.xml

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

November 19, 2006 · 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

November 19, 2006 · len

build.xml

delete from doc\_meta; delete from module;

November 19, 2006 · 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....

November 19, 2006 · 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....

November 19, 2006 · len

Portknocking

Port knocking sample client-server Last updated: 18-jan-2005 This update contains the following improvements: * configuration of the server is now located in a separate file Example configuration file for the server: #$Id: knockd.cfg,v 2.0 2005/01/18 11:57:19 len Exp $ #knockd configuration file [main] #the file to monitor file=/var/log/all.log #the pattern to watch for, note that you must have the #"ts", "from" and "port" groups (see python "re" module for more documentation) pattern=(?...

November 19, 2006 · len

Tools list

my mind and my eays Linux: for everything FreeBSD firefox: for web browsing and development gimp: for graphics inkscape: for vectorial graphics openoffice: for documents and presentations scribus: for advanced presentation documents gaim: for IM (icq: 86900867, ym: marilen_corciovei) skype: marilen_corciovei dia: for diagrams blender: for 3D tests

November 19, 2006 · len

Verilog 2 VHDL

VERILOG 2 VHDL CONVERTOR INTRODUCTION We have succeded in making work our first version of a Verilog to VHDL convertor. The convertor was written for a subset of the Verilog grammar, taken from the IEEE specifications. The convertor was implemented on a Linux iv386 machine, using a lexical analyser written in “Lex” (flex), a sintactic analyser written in “Yacc” (bison), a set of ANSI C++ classes and some C sources. The graphic interface was created using Qt v1....

November 19, 2006 · len

Old work

Airline related work I am learning a lot about the business processes in an airline company and the use of the Amadeus GDS system. I am managing the development of a application which organizes and filter information to automize part of the ticketing process. Developing in C on old Solaris/AIX machines can make you loose the architectural view. I compensate by the analyze of their multithread design. SMS related development...

November 19, 2006 · len