Abraham Gimeno

+ Follow
since Jul 16, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abraham Gimeno

I don't know if I understood well but, have you tried

and since it's ManyToOne you should be able to access Postcode object

You can use an application-managed Entity Manager to gain more control over the transactions or the EM lifecycle.The container do the work transparently but this doesn't mean you can not interfere in it.

What it is doing the code you posted is basically the same it occurs at the background using a container-managed EM.
You should establish the bean's name too

really I don't remember if it will use the mappedName at all, but like this I got it in my code

If you still get a NullPointer, copy the static function I wrote above in your servlet and call it for initalize the bean
some like this


First of all you should use the annotation @Local in your bean interface unless the bean's client is running in another JVM.

If you still want to use a remote call you should name the ejb bean implementation like this (for example)

and call them some similar like this :

the injection


I hope it helps
I haven't heard never before about Apache Lucene. Is it enough reading this book for understand Hibernate Search and use it in my project or I need some kind of background in Apache Lucene before I start reading it.

The anotation referencedColumnName I think should reference a column that or it's a primary key (single or composite) or a primary key candidate, that's a unique column. Your column TYPE_CD in SupportingDocumentType I believe must contain nullable = false, unique = true
Well I don't really know where exactly to post so sorry if I don't do it in the right place.
I'm trying to use log4j in my j2ee application (EJB + JSP + Servlets + Hibernate). There are some different web applications and I would like to split the log in different files. I use a socket appender to the localhost with this properties file

log4j.rootLogger=DEBUG, shark


and the server configuration file

log4j.rootLogger=DEBUG, shark
log4j.appender.shark.layout.ConversionPattern=%p %t - %l %F %M %c - %m%n

I use a init Servlet for initialize the log4j.properties and I run the server from the command line. The initialization goes on properly but without a specific reason I get an EOFException The exception pops up in many different moments and I can't understand what exactly is making to close the connection. I've tried to initialize the log4j.properties in the server also and the problem persists (I got the exception only starting the application server). I've tried a dummy web project which only loads the init Servlet and logs something, and the same problem, conects ok but it looses the connection suddenly including when I only run the web project.

I use Netbeans 6 and Glassfish 2 running in a Mac computer.

I wonder what I'm missing ... any idea???