Bookmark and Share

Support wikipedia as I did

Wikipedia Affiliate Button

giovedì, dicembre 24, 2009

Proverbio del momento

C'è solo un tipo di uomo che è peggiore dell'uomo che paga per avere la compagnia di donne giovani e graziose.
E' l'uomo che paga per avere la compagnia di donne brutte ed antipatiche e se le deve tenere appresso per giorni, perchè oltrettutto è una persona cortese, questo tipo di uomo non è che sia moralmente peggiore del primo, anzi se vogliamo è una persona che fa del bene anche, ma è un emerito coglione, un fesso, un pirlone che sperpera quei quattro denari che ha, invece di comprarsi una casa. E' ingenuo che crede anche in una foto, e vuole essere immensamente generoso, oh che povero coglione.

martedì, dicembre 22, 2009

La neve, Spinea e Andrea

Enrico, scrivi qualcosa cribbio!
"Tornando da una seratina passata al lume di candela con la fata Monia, incontrai Andrea. Ma che ci fa Andrea da solo, alle 22, davanti ad un cassettone delle immondizie, in tuta da ginnastica? Era uscito a buttare la spazzatura ?"
Ma che ne so Enrico inventa!
(Testo della mail di Andrea...scusate ma sono troppo pigro ultimamente :) )


giovedì, dicembre 17, 2009

Deploying Spring @Component annotated application in JBoss 5.1

I've spent the last few days fighting with jboss 5.1 trying to deploy a spring based web application using the Component annotation.
The application as opposed works using Tomcat 6.
Basically the spring context was not able to find the definition of SchedulerBo which is my Component annotated class.

package webscheduler.bo;

@Component
public class SchedulerBo {
...............................
}

This is the section of my spring configuration file which allows the spring context to auto-scan the schedulerBo.

<context:component-scan base-package="webscheduler.bo"/>

This is the exception I had.

19:17:09,706 ERROR [ContextListener] Error in base ContextListener.contextInitialized
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobNormal' defined in ServletContext resource [/WEB-INF/schedulerContext.xml]: Cannot resolve reference to bean 'schedulerBo' while setting bean property 'jobDataAsMap' with key [TypedStringValue: value [schedulerBo], target type [null]]; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'schedulerBo' is defined

............................................................

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'schedulerBo' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanDefinition(DefaultListableBeanFactory.java:387)

This is the main section of my listener (ServletContextListener) class which I used to load the spring context(marked in red the row to change)

private WebApplicationContext applicationContext;
.....................................
config.add("WEB-INF/schedulerContext.xml");
XmlWebApplicationContext ctx = new XmlWebApplicationContext();
ctx.setServletContext(servletContext);
ctx.setConfigLocations(config.toArray(new String[config.size()]));
ctx.refresh();
applicationContext = ctx;

To sort out this problem you have to use org.jboss.spring.factory.VFSXmlWebApplicationContext instead of rg.springframework.web.context.support.XmlWebApplicationContext.
Therefore I changed this row in my listener.

XmlWebApplicationContext ctx = new org.jboss.spring.factory.VFSXmlWebApplicationContext();

Here the steeps to follow to solve the problem:

  1. Add this dependency to your pom, be sure to have the jboss repository in your pom.xml


    <dependency>
    <groupId>org.jboss.snowdrop</groupId>
    <artifactId>snowdrop-vfs</artifactId>
    <version>1.0.0.GA</version>
    <exclusions>
    <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    </exclusion>
    <exclusion>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    </exclusion>
    </exclusions>
    </dependency>


  2. Using VFSXmlWebApplicationContext in your listener class in this way

    XmlWebApplicationContext ctx = new org.jboss.spring.factory.VFSXmlWebApplicationContext();

  3. run $ mvn clean install and deploy the new generated war into <JBOSS_HOME>/server/default/deploy


This is the link in JBoss JIRA which reports the bug and shows the solution.

lunedì, dicembre 14, 2009

La madre degli stupidi è sempre incinta

E' incredibile, dopo la brutale aggressione a Silvio Berlusconi da parte di Massimo Tartaglia, 42enne milanese con problemi mentali, fioccano i gruppi e i fan che simpatizzano per il gesto vigliacco.
Chi scrive è sempre stato critico nei confronti di Silvio Berlusconi, è convinto che il premier abbia avuto relazioni con la mafia, spera che un giorno venga processato e condannato.
Ma come si può gioire di fronte al gesto di uno folle che vigliaccamente lancia un oggetto contundente in faccia ad una persona che non si può difendere, fosse stato anche il peggior nazista io non posso tollerare questo gesto, e mi riesce difficile avere degli amici come Enrico di Roma che aderiscono a questi gruppi su facebook. Che senso ha giustificare tali gesti violenti, dove ci porta? Avrebbe anche potuto ucciderlo. Un solo appunto a Silvio...cambia scorta, possibile che con tutti gli uomini, polizia, carabinieri, servizio segreto ti fai sorprendere da un pazzo? Non oso appunto pensare quanto sarebbe semplice per un servizio segreto di una potenza ostile organizzare un attentato alla tua persona.

martedì, dicembre 08, 2009

Non farti mica problemi...

Mario, un uomo dall'aspetto giovanile pur se alla soglia dei quaranta stava volando verso una nuova terra dell' est, povera ma ricca di giovani e compiacenti fanciulle.
Era seduto vicino al finestrino con lo sguardo perso nel vuoto a fissare le nuvole e le montagne imbiancate.
Vicino a lui un uomo greve tra i 55 e i 60 anni, della bassa padovana che viaggiava alla volta dell' est con un gruppo di amici per una battuta di caccia, anche se credo non cacciasse solo animali.
L'uomo e Mario iniziarono a parlare, entrambi erano veneti, Mario aveva colto l'accento veneto del suo compagno di volo sin da subito seduti a bordo.
"Anche lei vai all' est?" chiese Mario all' uomo il quale replicò narrando della caccia, degli amici, la baita e delle numerose volte che era stato in quella terra.
L'uomo chiese allora il motivo del suo viaggio e Mario rispose "Vado per ritrovarmi con una mia amica che avevo incontrato in una precedente occasione".
Allora il padovano cacciatore replicò dando del tu al saggio compagno di volo "Non farti mica problemi, scopale subito, bevono come spugne, mettile l'ucc...tra le mani".
Mario restò dapprima un po' sgomento e pensò tra se e se se forse era il caso di essere meno galantuomo e più concreto, in fin dei conti questi viaggi all' est costavano abbastanza tra aereo, appartamenti, cene sul posto.
Il viaggio proseguì e quando l'aereo atterrò in quel sperduto aeroporto di quel sperduto paese dell' est, il padovano disse ai suoi amici qualcosa del genere "Ali ALà chi ciava ciava e chi non ciava si mena la fava". Cavolo l'essere rudi talvolta paga.

martedì, dicembre 01, 2009

Age disparity in relationships

just to have an idea, in your opinion 17 years of difference are too many, of course man older than woman. Can you guess who is the name? Well this man likes so much this beautiful blonde girl as she is very smart and pretty, but he's a bit afraid to be a bit too much old to stay with her, can you imagine when he will turn to 50 she will be only 33, I mean a bit strange you know, But this man cannot hide his feeling for this beautiful Russian girl, maybe he should live at the present without to be worried what's going to happen in 10 or more years, at the end we live this time all the rest is in our mind.
What in your opinion the maximum difference in age in a sexual relationship, I found this article on wikipedia quite interesting, basically it says the age of the woman should be greater than the half of the man plus 7, i.e. let's say the man is 38, the woman should be at least 26 (38/2 + 7).
Someone says age doesn't mind in love but I guess there are some limits, otherwise you run the risk to be ridiculous. Poor this man, the older the more he likes younger girls.