if you ever had problems like when you have an
app that is idle over night and mysql disconnects you,
or you restart mysql... then typestry page will fail because hibernate
will hold on to the broken connection...
here's an config that uses a pool that can reconnect and discard
broken connections
Angelo,
here is mine, really basic, but it works:
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
com.mysql.jdbc.Driver
jdbc:mysql://192.168.0.102:33
Hi Stephan
Thanks for posted this, you have saved a lot of time for me,
unfortunately for me though I can't go back to JVM 1.5
Stephan Schwab wrote:
Unfortunately yesterday we had to switch back to JVM 1.5, as the same
symptoms have shown up again. Seems that there is still a problem and JVM
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
org.gjt.mm.mysql.Driver
jdbc:mysql://localhost/dbname?charset=utf8
org.hibernate.dialect.MySQLDialect
user
On 9/10/07, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
>
> Hi Marcus,
Hi Marcus,
Good point, I removed it. but that error still coming out, must be something
wrong with the xml file, care to share your hibernate.cfg.xml here so I can
build a new one from an already running one.
Marcus Schmidke-2 wrote:
>
> I cannot really tell what the error is, but I am also a
Services are ordinary java classes,
difference is only that some objects you will instantiate
by hand, like StringBuffer or File...
Service is a class for which you let tapestry-ioc to
generate instances. You configure which services
are available in your AppModule and define there
how they are c
I cannot really tell what the error is, but I am also a beginner and
also started with an existing Hibernate configuration the same way as
you did, so it will be only a small mistake.
One thing I think is important is that Tapestry Hibernate
automatically configures all @Entity classes in the "...
you must generate hibernate.cfg.xml
have your entities in entities package
add this to your AppModule
public static void
contributeValueEncoderSource(MappedConfiguration,
ValueEncoderFactory> configuration,
Session session
) {
configuration.add(ObjektMitSeqID.class, new
HibernateVal
The Hibernate configuration element doesn't expect a package with annotated
classes as one might assume but expects an annotated package with package-level annotations like
@GenericGenerator. So you must explicitly add every annotated class to your Hibernate configuration
with a element (or do
Hi Jun,
I believe it has something to do with that, but which part? I use it in a
java application, it works, that's what is puzzling me.
A.C.
Jun Tsai-2 wrote:
>
> see your hibernate.cfg.xml file.
>
> Jun Tsai
>
> 2007/9/10, Angelo Chen <[EMAIL PROTECTED]>:
>>
>
>
--
View this message
see your hibernate.cfg.xml file.
Jun Tsai
2007/9/10, Angelo Chen <[EMAIL PROTECTED]>:
>
>
> Hi Davor,
>
> I read the doc and do the following:
>
> 1. put Fruit.java under entities package
> 2. put hibernate.cfg.xml under resources
> 3. in the Start.java, I add:
> @Inject private Session _session;
Hi Davor,
I read the doc and do the following:
1. put Fruit.java under entities package
2. put hibernate.cfg.xml under resources
3. in the Start.java, I add:
@Inject private Session _session;
String onAction() {
Fruit f = new Fruit();
f.setName("Orange");
f.setPrice
http://code.google.com/p/lichen-forum/
Erik Vullings-2 wrote:
>
> Hi,
>
> I've read the manual about services, but don't get it: It's like seeing
> the
> puzzle pieces, but not the whole. Can someone explain it to me please,
> especially:
>
>1. How can I use a service to connect to my da
Hi Davor,
Thanks, as a newbie, i can't really understand it fully, here is what I got
so far:
1) put that tapestry-hibernate.jar in the lib.
2) put all annotated entities in the entities direcotory
3) in your main source:
@inject private Session _session;
then? what's the Session of thi
Just by co-incidence, I am trying to get Hibernate working but I am
getting the following error in the logs.
08:10:04.531 WARN!! [SocketListener0-1]
org.hibernate.cfg.AnnotationBinder.bindPackage(AnnotationBinder.java:217)
>90> Package not found or wo package-info.java: ozpoultry.breeders.ent
Still not in bed .. was too curious about that session thing.
Adding this parameter indeed works - I get some kind of session object
in the contribute method. But what session is this? Is it a session
which is created at this moment (and is already closed when I really
need it) or is it some kind
Ok ...,
I took a shower which made things much much clearer.
I think I should build and register a BusinessService (just like a
stateless session bean) which encapsulates the Hibernate things. This
Service can have the Hibernate Session injected on some different ways
(just like explained in the
Hi,
I've read the manual about services, but don't get it: It's like seeing the
puzzle pieces, but not the whole. Can someone explain it to me please,
especially:
1. How can I use a service to connect to my database? Or should I use
Hibernate?
2. How can I use a service to access the fil
Yes ... I've read ... parts of it more than once ... but
unfortunately, I do not seem to be clever enough.
I want to write a value encoder which maps Hibernate Entities to their
IDs and vice versa.
I've written
- a HibernateValueEncoder
- a HibernateValueEncoderFactory
- an AppModule containing t
ok,
pages you know now ...
other time you create your classes is inside your module AppModule
Tapestry-ioc subsystem is in charge here
http://tapestry.apache.org/tapestry5/tapestry-ioc/
read this page to get more information on dependecy injection in general
you will need this stuff often
http://
I accidentally found this thread and also tried to get Hibernate
integration running.
Basically, it runs, but I still know too few about Tapestry basics.
@Inject works fine for page components, but how can I make it work in
other classes?
Concretely, how can I inject a hibernate session into my
Unfortunately yesterday we had to switch back to JVM 1.5, as the same
symptoms have shown up again. Seems that there is still a problem and JVM
1.6. update 2 is not the solution.
--
View this message in context:
http://www.nabble.com/T5-on-JDK-1.6-or-newer-tf4324659.html#a12582298
Sent from the
not much at the moment,
but it's simple to use,
factories are created
http://tapestry.apache.org/tapestry5/tapestry-hibernate/conf.html
you just call
@Inject private Session _session;
or in the method
Especialy if you have DAO's that have Session in constructor
than you can configure them efortle
Hi,
I searched the list to find a simple tutorial for Tapestry-hibernate, but
couldn't find any, some quite simple, but source code not complete. any
simple code there? anyway, I believe Hibernate can be used directly without
Tapestry-hibernate module, my question now is, what are the advantages
24 matches
Mail list logo