Re: Tapestry-hibernate module seemingly leaking connections

2024-06-13 Thread Christopher Dodunski (Tapestry)
Hi Ben, Your "educated guess" proved to be entirely correct! I added the below method to my RegistryProxy class, and calling it from the @OnMessage annotated method of the WebSocket server endpoint ensures Hibernate sessions get closed on completion and associated DB connections are released

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Ben Weidig
g dependency injection - as it is in > most cases - connections do not get leaked. So, for the most part the > tapestry-hibernate module is working exactly as it should. > > Connections get leaked when the client is a desktop app that connects > via WebSocket. With such connec

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Christopher Dodunski (Tapestry)
been able to narrow down exactly which calls to HibernateCrudServiceDAO produce these leaked connections. When this DAO service is invoked using dependency injection - as it is in most cases - connections do not get leaked. So, for the most part the tapestry-hibernate module is worki

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-09 Thread Ben Weidig
e: > Hi, > > My application's DAO class is employing an injected Hibernate Session > for accessing a MySQL DB. Connection pooling is provided by C3PO. > > My understanding is that the Tapestry Hibernate IoC (per thread) service > takes care of closing DB connections under the ho

Tapestry-hibernate module seemingly leaking connections

2024-06-04 Thread Christopher Dodunski (Tapestry)
Hi, My application's DAO class is employing an injected Hibernate Session for accessing a MySQL DB. Connection pooling is provided by C3PO. My understanding is that the Tapestry Hibernate IoC (per thread) service takes care of closing DB connections under the hood, releasing them back

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
Problem solved. Just to give back to the community here is how I solved it and what I've learned. First, it looks like when using tapestry-cdi in the project, tapestry-hibernate becomes completely unnecessary. In fact, it cannot and should not be used. In general, with JSR-330 (tapestry even

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Qbyte Consulting
Ive been using tapestry jpa on an application that accesses 3 databases, 1 Postgres and 2 mssql. It's just fine. Surprised tapestry hibernate doesn't support this. Sent from my iPhone > On 23 Sep 2016, at 09:36, Adam X <vbgnm3c...@gmail.com> wrote: > > Yes, JPA should an option

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
still have problems :) On Fri, Sep 23, 2016 at 10:15 AM, Kalle Korhonen <kalle.o.korho...@gmail.com> wrote: > AFAIK, tapestry-hibernate simply doesn't support it. However, is switching > to JPA an option? You could still be using Hibernate as the provider. > tapestry-jpa merrily support

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Kalle Korhonen
AFAIK, tapestry-hibernate simply doesn't support it. However, is switching to JPA an option? You could still be using Hibernate as the provider. tapestry-jpa merrily supports multi tenancy (and more). If JPA is not an option, I'd look into implementing your own custom @Session - may not be too bad

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
n't know how to >> solve this. My current architecture is as following: >> >> foo >> weld >> tapestry-cdi >> tapestry-core >> >> I'd like to have: >> >> foo >> weld >> tapestry-cdi >> tapestry-hibernate >> >> fo

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Qbyte Consulting
My current architecture is as following: > > foo > weld > tapestry-cdi > tapestry-core > > I'd like to have: > > foo > weld > tapestry-cdi > tapestry-hibernate > > foo (jar) is a major depenency of my project. It is an internal > company framework which con

tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
Hi, I have what seems like a major collision problem and don't know how to solve this. My current architecture is as following: foo weld tapestry-cdi tapestry-core I'd like to have: foo weld tapestry-cdi tapestry-hibernate foo (jar) is a major depenency of my project. It is an internal

Re: tapestry-hibernate session.save not working in service

2014-11-21 Thread Lance Java
I'm guessing you need to commit a transaction. Either: HibernateSessionManager.commit() Or: Session.getTransaction().commit() Or: @CommitAfter

Re: tapestry-hibernate session.save not working in service

2014-11-21 Thread Thiago H de Paula Figueiredo
@CommitAfter will only work on service methods if you applied the HibernateTransactionAdvisor or HibernateTransactionDecorator to the service. On Fri, 21 Nov 2014 06:47:43 -0200, Lance Java lance.j...@googlemail.com wrote: I'm guessing you need to commit a transaction. Either:

Re: tapestry-hibernate session.save not working in service

2014-11-21 Thread George Christman
I tried those Lance with the exception of @CommitAfter do to the fact I thought that @CommitAfter needed to be used in the interface. I even went as far as passing the save off to my DAO that has been configured to use HibernateTransactionAdvisor. I thought for sure this would resolve the issue,

Re: tapestry-hibernate session.save not working in service

2014-11-21 Thread Thiago H de Paula Figueiredo
On Fri, 21 Nov 2014 12:50:11 -0200, George Christman gchrist...@cardaddy.com wrote: I tried those Lance with the exception of @CommitAfter do to the fact I thought that @CommitAfter needed to be used in the interface. Before the latest 5.4 betas yes, but not anymore. I even went as far as

Re: tapestry-hibernate session.save not working in service

2014-11-21 Thread George Christman
On Fri, Nov 21, 2014 at 9:54 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 21 Nov 2014 12:50:11 -0200, George Christman gchrist...@cardaddy.com wrote: I tried those Lance with the exception of @CommitAfter do to the fact I thought that @CommitAfter needed to be used

tapestry-hibernate session.save not working in service

2014-11-20 Thread George Christman
Hi guys, I'm trying to use Kalle's federate library. On line 29 and 33 you'll see save and update and when I do a save / update nothing happens. I turned on query logging and no insert happens.

Tapestry-Hibernate unable to convert to client value

2014-11-13 Thread George Christman
Hi guys, I'm seeing this error in my logs, but everything appears to be working fine. Does anybody know what the cause might be? (HibernateEntityValueEncoder.java:99) - Unable to convert client value '115185' into an entity instance. I seen something here where they talk about the result being

Re: Tapestry-Hibernate unable to convert to client value

2014-11-13 Thread Lance Java
Is 115185 an id that used to exist in the database? Perhaps it's a bot that's hitting an old id that was deleted? Or maybe a bot trying to just hit a random id? On 13 Nov 2014 20:44, George Christman gchrist...@cardaddy.com wrote: Hi guys, I'm seeing this error in my logs, but everything

Re: Tapestry-Hibernate unable to convert to client value

2014-11-13 Thread George Christman
Nah it was on my local machine. Strangly the page loads without issue too. On Thursday, November 13, 2014, Lance Java lance.j...@googlemail.com wrote: Is 115185 an id that used to exist in the database? Perhaps it's a bot that's hitting an old id that was deleted? Or maybe a bot trying to

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Lance Java
I'm not sure what you mean by nesting db queries? Can you give an example? Note, the @CommitAfter annotation does exactly what it says on the tin, it causes a commit after every method that has the annotation.

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Chris Mylonas
hm I'm guessing it's when there are 2 or more saves to DB from a method. Nothing in the stack trace shows errors at all, but I get the tapestry exception page with: org.apache.tapestry5.ioc.internal.OperationException *nested transactions not supported* onSuccess() method just looks

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Thiago H de Paula Figueiredo
. And no tapestry-hibernate version ever supported nested transactions, ever. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Chris Mylonas
OK. ever ;) I didn't know what nested transactions were in hibernate. Just a change in behaviour from 5.3.7 to 5.4 My bastardised workflow likes to use tapestry-hibernate for doing the UI and then porting to EJB. On Wed, Aug 27, 2014 at 11:47 PM, Thiago H de Paula Figueiredo thiag

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Lance Java
Is the service also annotated with @CommitAfter? This could cause a nested transaction.

Re: nested database updates, updating to tapestry-hibernate 5.4

2014-08-27 Thread Chris Mylonas
No. Only the page classes. I'm not too worried about it, Thiago says not-supported. It's just a change in behaviour from 5.3.7 to 5.4-beta. The concern I am more interested in raising is the stack trace on the command line is not there where I'm running from but it's caught by tapestry. If

nested database updates, updating to tapestry-hibernate 5.4

2014-08-26 Thread Chris Mylonas
hi tapestry users of the age, i was mucking around with a prototyped app, went from 5.3.7 to 5.4-beta-6. read that nesting db queries is not supported, tried my luck and my app fails with 5.4-beta. will whatever i'm getting away with in 5.3 work in the future of 5.4 if not, i'm happy with that,

Tapestry-hibernate / hibernate-search java.lang.Object is not an indexed entity or a subclass of an indexed entity

2014-02-12 Thread George Christman
Hi Guys, I'm seeing the following exception in my logs when I try to start my app. It appears to be random and only during startup. I'm starting the massindexer using @Startup. I've been wresting with this exception on and off for a week now and I'm no closer to understanding what it means. Could

Re: Tapestry-hibernate / hibernate-search java.lang.Object is not an indexed entity or a subclass of an indexed entity

2014-02-12 Thread Thiago H de Paula Figueiredo
I'd check the Hibernate Search part. The stack trace doesn't look like a Tapestry issue to me. On Wed, 12 Feb 2014 15:02:32 -0200, George Christman gchrist...@cardaddy.com wrote: Hi Guys, I'm seeing the following exception in my logs when I try to start my app. It appears to be random

Re: Tapestry-hibernate / hibernate-search java.lang.Object is not an indexed entity or a subclass of an indexed entity

2014-02-12 Thread George Christman
Thanks Thiago, I'll run it by the hibernate-search team next. On Wed, Feb 12, 2014 at 12:59 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: I'd check the Hibernate Search part. The stack trace doesn't look like a Tapestry issue to me. On Wed, 12 Feb 2014 15:02:32 -0200, George

tapestry-hibernate upgrade version?

2014-02-04 Thread George Christman
Hi guys, in Tap 5.4 I'm wondering if there is any chance we could upgrade the tapestry-hibernate version away from 4.1.2? 4.1.2 seems to have a bug which causes the mysql driver not be found in Tomcat. Please see post https://forum.hibernate.org/viewtopic.php?p=2454336 If I upgraded it in my pom

Re: tapestry-hibernate upgrade version?

2014-02-04 Thread Lance Java
If I upgraded it in my pom, would this cause issues else where? Not making any guarantees but it shouldn't be a problem (unless the hibernate api has changed, which I doubt)

Re: tapestry-hibernate upgrade version?

2014-02-04 Thread George Christman
Thanks Lance. On Tue, Feb 4, 2014 at 3:22 PM, Lance Java lance.j...@googlemail.comwrote: If I upgraded it in my pom, would this cause issues else where? Not making any guarantees but it shouldn't be a problem (unless the hibernate api has changed, which I doubt) -- George Christman

Re: tapestry-hibernate upgrade version?

2014-02-04 Thread Thiago H de Paula Figueiredo
JIRA ticket please! On Tue, 04 Feb 2014 19:17:49 -0200, George Christman gchrist...@cardaddy.com wrote: Thanks Lance. On Tue, Feb 4, 2014 at 3:22 PM, Lance Java lance.j...@googlemail.comwrote: If I upgraded it in my pom, would this cause issues else where? Not making any guarantees

Tapestry Hibernate

2013-11-11 Thread Boris Horvat
Hi everyone, I am trying to run a 5.4 on my application. I have modified my pom to use tapestry-hibernate 5.4-alpha-3-SNAPSHOT, as well as tapestry5-jquery 4.0.0-SNAPSHOT (this version is development for the 5.4). After fixing a problem with ioc conflicts coming from tapestry-security I run

Re: Tapestry Hibernate

2013-11-11 Thread Boris Horvat
have modified my pom to use tapestry-hibernate 5.4-alpha-3-SNAPSHOT, as well as tapestry5-jquery 4.0.0-SNAPSHOT (this version is development for the 5.4). After fixing a problem with ioc conflicts coming from tapestry-security I run the application. Unfortunately it still failed An exception

Re: Tapestry Hibernate

2013-11-11 Thread Boris Horvat
everyone, I am trying to run a 5.4 on my application. I have modified my pom to use tapestry-hibernate 5.4-alpha-3-SNAPSHOT, as well as tapestry5-jquery 4.0.0-SNAPSHOT (this version is development for the 5.4). After fixing a problem with ioc conflicts coming from tapestry-security I run

Tapestry-Hibernate using sessions inside of scheduler or threads.

2013-11-01 Thread George Christman
Hello, I'm a Tapestry-Hibernate user and I just recently ran into an issue where all my connections were used up. After doing some research, I think this is do to the fact sessions aren't thread safe causing it to open up new connections everytime. Anyhow, I'm wondering if anybody else has

Re: Tapestry-Hibernate using sessions inside of scheduler or threads.

2013-11-01 Thread Dmitry Gusev
at 10:06 AM, George Christman gchrist...@cardaddy.comwrote: Hello, I'm a Tapestry-Hibernate user and I just recently ran into an issue where all my connections were used up. After doing some research, I think this is do to the fact sessions aren't thread safe causing it to open up new

Re: Tapestry-Hibernate using sessions inside of scheduler or threads.

2013-11-01 Thread George Christman
Thanks dmitry, I was a little misguided on SO, resulting in this question, but it looks as if the issue had to do with me not closing my session after the thread completed. I've been spoiled with tapestry-hibernate doing that for me on non threaded transactions :) Anyhow Lance also pointed out I

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-27 Thread Dmitry Gusev
. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any transaction handling not supported by @CommitAfter, use Tapestry and some transaction handler (EJB

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-27 Thread Barry Books
. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
(Kersten), Germany 2013/10/25 George Christman gchrist...@cardaddy.com I'm wondering how to do a batch transaction with Tapestry-Hibernate. Should I still be using @Inject Session session and @CommitAfter? or Should I be using Transaction tx? I'm flushing and clearing my session every 200

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Lance Java
Martin, again you are saying @CommitAfter is broken when it's not. It's your understanding of @CommitAfter that is broken :) CommitAfter does exactly what is says on the tin, it commits the current transaction after it executes the method.

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
It's broken. Or at least one should update the UserGuide stating out the concrete behaviour and the danger that can be caused by using it in conjunction with Services. I had to clean up the mess that was introduced by using this annotation on Service interfaces. And luckily this even breaks the

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Lance Java
I'm assuming a fork is broken too because it's no good for eating soup? Sounds like you need a spoon, it's easy to write your own annotation... Perhaps you want a @MaybeCommitAfter ;)

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Barry Books
I run a lot of batch transactions and I use @Inject and @CommitAfter without any problems so I don't think they are the issue. For high volumes I usually use plain SQL though because it's easier to control. While it's true you can run into problems by nesting @CommitAfter the same can be said

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Thiago H. de Paula Figueiredo
On Thu, Oct 24, 2013 at 11:14 PM, George Christman gchrist...@cardaddy.comwrote: I'm wondering how to do a batch transaction with Tapestry-Hibernate. Should I still be using @Inject Session session and @CommitAfter? or Should I be using Transaction tx? Without testing, I'd guess both should

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Thiago H. de Paula Figueiredo
a commit. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
database model is simple. There is one connection per request and when you call commit it does a commit. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
connection per request and when you call commit it does a commit. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any transaction handling not supported by @CommitAfter, use Tapestry and some transaction handler (EJB, Spring-TX, etc

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread George Christman
doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any transaction handling

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any transaction handling

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
is simple. There is one connection per request and when you call commit it does a commit. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread George Christman
-Hibernate is a package that provides *simple* support for Hibernate and should be used in *simple* scenarios. If you need something that's not simple, like any transaction handling not supported by @CommitAfter, use Tapestry and some transaction handler (EJB, Spring-TX, etc) but not Tapestry

Re: How to do a Batch transaction with Tapestry-Hibernate

2013-10-25 Thread Martin Kersten
per request and when you call commit it does a commit. pedantic Tapestry itself doesn't have any database model. It's a web framework and nothing else. You can use it with any database, including none. Tapestry-Hibernate is a package that provides *simple* support

How to do a Batch transaction with Tapestry-Hibernate

2013-10-24 Thread George Christman
I'm wondering how to do a batch transaction with Tapestry-Hibernate. Should I still be using @Inject Session session and @CommitAfter? or Should I be using Transaction tx? I'm flushing and clearing my session every 200 iterations, but it appears to progressively get slower and slower until I

Re: Tapestry + Hibernate + Testing

2013-10-20 Thread Boris Horvat
Hi everyone, Lance I have a question for you (though anyone can answer it). You suggested to use something like http://stackoverflow.com/questions/15664815/how-to-test-dao-layer-in-tapestry-dependent-projects/15671034#15671034 I was expecting that my db will be rebuild before every test? Is

Re: Tapestry + Hibernate + Testing

2013-10-20 Thread Boris Horvat
It seems that the problem is that I needed to have both annotations import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeTest; not sure why. but I will try to read the documentation cheers On Sun, Oct 20, 2013 at 11:10 AM, Boris Horvat horvat.z.bo...@gmail.comwrote:

Re: Tapestry + Hibernate + Testing

2013-09-27 Thread Martin Kersten
I always start simple first and most simply is without tapestry. When you deal with 3 or 4 services at once you feel the need to go for IOC. Then you want to test a single page and thats when you use tapestry-test and then you go for full scale testing and you find yourself using htmlunit or

Re: Tapestry + Hibernate + Testing

2013-09-26 Thread Lance Java
HibernateEntityPackageManager only has one method which gets the list of hibernate entity package names. You might find it more lightweight to create mock this rather than including HibernateModule. On 26 Sep 2013 01:30, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Wed, 25 Sep 2013

Re: Tapestry + Hibernate + Testing

2013-09-26 Thread Boris Horvat
I guess for now I will proceed with using code that is not tapestry related inside my test classes though that is likely to change in the future. Thanks for you suggestions I will keep them in my head when the time for them arises :) Cheers On Thu, Sep 26, 2013 at 9:40 AM, Lance Java

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Lance Java
It's in tapestry-hibernate-core https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/PackageNameHibernateConfigurer.java

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Lance Java
Is it possible somehow to automate this? Have you read Howard's answer on the Stack Overflow question? He suggests splitting your AppModules in such a way that you can load a DAOModule together with HibernateCoreModule for testing.

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
My config is already split in that way. But I cant find a code that I can check to see how to load DAOModule :( Any hints? :) On Wed, Sep 25, 2013 at 11:08 AM, Lance Java lance.j...@googlemail.comwrote: Is it possible somehow to automate this? Have you read Howard's answer on the Stack

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Thiago H de Paula Figueiredo
On Wed, 25 Sep 2013 17:17:22 -0300, Boris Horvat horvat.z.bo...@gmail.com wrote: My config is already split in that way. But I cant find a code that I can check to see how to load DAOModule :( @Submodule({DAOModule.class}) in another modules that is already loaded or

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
I use Submodule but I guess for the tests I need RegistryBuilder. Will try that Thanks On Wed, Sep 25, 2013 at 10:55 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Wed, 25 Sep 2013 17:17:22 -0300, Boris Horvat horvat.z.bo...@gmail.com wrote: My config is already split in

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
btw PackageNameHibernateConfigurer uses AnnotationConfiguration that has been deprecated any plans to change this class? On Wed, Sep 25, 2013 at 11:36 PM, Boris Horvat horvat.z.bo...@gmail.comwrote: I use Submodule but I guess for the tests I need RegistryBuilder. Will try that Thanks On

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Martin Kersten
Hi Boris, I just use a registery builder and add the sub modules I need to test (as already mentioned). Often I use public TestModule static classes that reside into the TestCase class. Then I just use those TestModule classes to build the registry. They contain often only the services needed

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
Thanks for the detail replay it helps me to figure out the best way to organise everything. btw once you have everything registered how do you get a service? cheers On Thu, Sep 26, 2013 at 12:38 AM, Martin Kersten martin.kersten...@gmail.com wrote: Hi Boris, I just use a registery

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
ah I think I see RegistryBuilder b = new RegistryBuilder(); b.add(HibernateModule.class); Registry r = b.build(); r.getService(MyService.class); that makes sense Cheers On Thu, Sep 26, 2013 at 12:55 AM, Boris Horvat horvat.z.bo...@gmail.comwrote: Thanks for

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Boris Horvat
Ah sorry for spam this is the last one for the day. Is there a list like the default services that should be added. For example if I add my configuration of the hibernate it complains HibernateEntityPackageManager doesn't exist On Thu, Sep 26, 2013 at 12:56 AM, Boris Horvat

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Thiago H de Paula Figueiredo
On Wed, 25 Sep 2013 20:01:14 -0300, Boris Horvat horvat.z.bo...@gmail.com wrote: Is there a list like the default services that should be added. For example if I add my configuration of the hibernate it complains HibernateEntityPackageManager doesn't exist In this case, you need the

Re: Tapestry + Hibernate + Testing

2013-09-24 Thread Boris Horvat
Hi Lance, Can you please share PackageNameHibernateConfigurer assuming that it is open source code (and that it is your code)? Thanks On Sun, Sep 22, 2013 at 10:43 PM, Boris Horvat horvat.z.bo...@gmail.comwrote: Well ideally I would like to avoid setting up the abstract class but at lest I

Tapestry + Hibernate + Testing

2013-09-22 Thread Boris Horvat
Hi all, How does one make a proper testing of the business layer in tapestry that I inject into the page as a service? Is there anything specific that one needs to look out for? Should I simple do something like 1) Create an object of the BU layer 2) Mock hibernate with some in-memory db 3)

Re: Tapestry + Hibernate + Testing

2013-09-22 Thread Lance Java
I do this http://stackoverflow.com/questions/15664815/how-to-test-dao-layer-in-tapestry-dependent-projects/15671034#15671034 On 22 September 2013 19:16, Boris Horvat horvat.z.bo...@gmail.com wrote: Hi all, How does one make a proper testing of the business layer in tapestry that I inject

Re: Tapestry + Hibernate + Testing

2013-09-22 Thread Boris Horvat
Well ideally I would like to avoid setting up the abstract class but at lest I have a starting point that I believe I can make it to work. I do have one more question though. Is it possible somehow to automate this? I have my business class that recieves hibernate classes vie a constructor and

user rolle, tapestry +hibernate

2013-06-24 Thread Will N.
Hi, i am working on a project with tapestry and hibernate. My Application already has a login but I would like to give different users different roles so that some user can not acces some pages() or perform some queries to the database. can someone tell me a good way to do that? thanks

Re: user rolle, tapestry +hibernate

2013-06-24 Thread Lance Java
There's a few options: Tynamo's tapestry-security http://tynamo.org/tapestry-security+guide tapestry-spring-security http://www.localhost.nu/java/tapestry-spring-security/conf.html Or you could roll-your-own http://tapestryjava.blogspot.co.uk/search/label/security

Re: user rolle, tapestry +hibernate

2013-06-24 Thread Taha Hafeez Siddiqi
Hi Will I would suggest Tapestry Security. http://tynamo.org/tapestry-security+guide It is very easy to setup, use configure. You will also find link to a Hibernate based Realm.

Re: user rolle, tapestry +hibernate

2013-06-24 Thread Thiago H de Paula Figueiredo
On Mon, 24 Jun 2013 07:10:45 -0300, Will N. llcool_wil...@yahoo.fr wrote: Hi, Hi! i am working on a project with tapestry and hibernate. My Application already has a login but I would like to give different users different roles so that some user can not acces some pages() or perform

Re: Tapestry Hibernate Session usage

2013-05-14 Thread Dmitry Gusev
On Tue, May 14, 2013 at 12:05 AM, Boris Horvat horvat.z.bo...@gmail.comwrote: Hi Dmitry Please ignore the naming as I haven't really user he real names here as this is just an example (the project also has nothing to do with Students but it is easier for the explanations :) ). In all

Re: Tapestry Hibernate Session usage

2013-05-14 Thread Lance Java
Questions about the 'magic' hibernate session proxy seem to crop up a bit so I've raised a Jira to improve the docs. https://issues.apache.org/jira/browse/TAP5-2115

Re: Tapestry Hibernate Session usage

2013-05-14 Thread Boris Horvat
Well thanks for help this makes my understating of the tapestry hibernate a lot better :) Cheers On Tue, May 14, 2013 at 4:38 PM, Lance Java lance.j...@googlemail.comwrote: Questions about the 'magic' hibernate session proxy seem to crop up a bit so I've raised a Jira to improve the docs

Re: Tapestry Hibernate Session usage

2013-05-13 Thread Dmitry Gusev
On Mon, May 13, 2013 at 2:59 AM, Boris Horvat horvat.z.bo...@gmail.comwrote: Hi all, Hi! I have a question about what should be the best way to use hibernate session in tapestry. My environment consists of 2 layers (relevant to this). The first one would be a group of classes that

Re: Tapestry Hibernate Session usage

2013-05-13 Thread Boris Horvat
Hi Dmitry Please ignore the naming as I haven't really user he real names here as this is just an example (the project also has nothing to do with Students but it is easier for the explanations :) ). In all fairness though I do prefer to append DAOService in front as it allows me to search for

Tapestry Hibernate Session usage

2013-05-12 Thread Boris Horvat
Hi all, I have a question about what should be the best way to use hibernate session in tapestry. My environment consists of 2 layers (relevant to this). The first one would be a group of classes that represent an access point to a table. For example if I have a table student then I will have a

tapestry hibernate integration NPE

2013-05-04 Thread Jens Breitenstein
Hi All! I detected a bug(?) in the HibernateEntityValueEncoder. When the hibernate entity's primary key contains an underscore in the primary key member name like private Long _pk; than the HibernateValueEncoder fails with: Caused by: java.lang.NullPointerException at

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-05-01 Thread Dmitry Gusev
, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-30 Thread George Christman
Thanks Dmitry, it sounds like we are at the tail end of this issue. :) My only question left is in regards to your persistence.xml file. I use tapestry-hibernate, however I do not have a persistence.xml file present in my app. I'm not really sure what it's purpose is, but without it and changing

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-30 Thread Dmitry Gusev
I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception: javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-30 Thread George Christman
-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-30 Thread Dmitry Gusev
res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-30 Thread George Christman
/resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-29 Thread George Christman
Hi everyone, I'm now getting back to this issue and I'd like to say I honestly still don't understand it. I posted my config on stack overflow with a little more detail. If any tapestry tomcat users would like to take a look at it and tell me what I might be doing wrong, I'd appreciate it. Thanks

Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty

2013-04-29 Thread Lenny Primak
Sounds like you are mixing up your dependencies. Perhaps an incompatible or duplicated version of some JARs somewhere. Sorry I can't be anymore specific. On Apr 29, 2013, at 1:00 PM, George Christman wrote: Hi everyone, I'm now getting back to this issue and I'd like to say I honestly still

  1   2   3   4   5   6   >