Re: Hibernate in Tomcat

2011-04-02 Thread הילה - צוות אגורה
what is the hibernate mailing list address?
hibern...@tomcat.apache.org? :]

Thanks
Hila

2011/4/3 Mark Eggers 

> - Original Message start (edited) 
> Hey guys,
>
> I tried to explore a bit the possibility of hibernate in tomcat, but some
> things aren't that clear for me.
> Before hitting the specific questions, please explain what is hibernate in
> Tomcat, when do we want to use it, how do I use it specifically with the
> JDBC connection pool (instead of the default DBCP connection pool), and if
> misconfiguration of the hibernate can cause disconnections of users on the
> application (that uses tomcat).
>
> Now for 2 specific questions, if I may :]
> 1. in this article, its states that hibernate can be used for managing the
> JDBC connection pool, but the strings are for c3p0 pool-
> http://community.jboss.org/wiki/UsingHibernatewithTomcat
> why is that?
>
> 2. Do I have to use hibernate.properties file, or can I rename it to
> x.properties and still use the content of the hibernate settings?
>
>
> - Original Message end (edited) 
>
> There's an example on how to configure Hibernate and Tomcat on the Tomcat
> Wiki.
> It's a bit old, but should still be valid.
>
> http://wiki.apache.org/tomcat/TomcatHibernate
>
> Hibernate does some nice things, such as making mapping between a
> relational
> database and objects easier, lazy loading, and loading classes through
> related
> tables into their proper classes. It also has interfaces to secondary
> caches
> (default is ehcache), which reduces the need to query a database for
> read-mostly
> information.
>
> In some of the more complex uses, the Hibernate documents recommend using
> thread
> local variables and filters to manage Hibernate sessions. This can get a
> bit
> tricky if you're not careful.
>
> You can do all of this manually with JNDI, some home-grown wrapper classes
> to
> manage relational-object mapping, and a caching implementation of your
> choice.
> However, Hibernate (or EclipseLink / JPA 2) makes doing this a bit easier.
>
> Can a misconfigured Hibernate application cause users to be disconnected?
> Usually a misconfigured Hibernate application will refuse to start.
> Sometimes if
> your resource mapping is incorrect, the application will start, but those
> resources (and queries) will not function.
>
> C3P0 pooling is the one included with Hibernate. Hibernate used to (2.x)
> include
> an interface to Apache DBCP, but this is no longer available in Hibernate
> 3.x.
> Thus, all of the pooling examples are written for C3P0.
>
> You can use any file that is found on the classpath. However, the default
> is
> hibernate.cfg.xml. To change the default, change the following code from:
>
> SessionFactory sf = new Configuration()
>  .configure()
>  .buildSessionFactory();
>
> to:
>
> SessionFactory sf = new Configuration()
>  .configure("catdb.cfg.xml")
>  .buildSessionFactory();
>
> where "catdb.cfg.xml" is the name you've given to the file.
>
> Further Hibernate questions are probably best answered on the Hibernate
> mailing
> lists or the Hibernate forum.
>
> . . . . just my two cents
>
> /mde/
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: [OT] Memory Leak in Tomcat

2011-02-23 Thread הילה - צוות אגורה
Hey,
the user that runs the tomcat service is a domain user, but I specify the
user name and password of this user under "log on" tab on the service
properties.
it's not a problem since the password is encrypted, but in the xml file it's
in clear text.
so.. the problem for me is the memory leak that generated after switching to
windows authentication.


2011/2/23 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> הילה,
>
> On 2/23/2011 10:38 AM, הילה wrote:
> > I've explained it in my mail :]
> > change the user that runs the tomcat service to a domain user with
> > permissions to the DB
>
> So the domain user is password-less? How does the service start without
> credentials?
>
> I'm not actually stupid: I'm just asking stupid questions to lead you to
> the conclusion that the credentials are in fact somewhere. Just because
> you can't see them (Windows has them hidden somewhere) doesn't mean
> they're not there.
>
> You are just moving the problem somewhere else.
>
> This problem is discussed seasonally around here.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1lLB8ACgkQ9CaO5/Lv0PA87wCfdhGwBHUiutC766MH+8x5g6Zy
> NfIAoJkUCY7ZPD8EKEJvkdZHkTEEs6cj
> =+Vwc
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>