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
> 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 working exactly as it should. > > Connections get leaked when the client is a desktop app that connects &g

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Christopher Dodunski (Tapestry)
ation I've 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

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-09 Thread Ben Weidig
pher.net.nz> wrote: > 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

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 bac

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

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 wrote: > > Yes, JPA should an option. I don't

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
with this if I still have problems :) On Fri, Sep 23, 2016 at 10:15 AM, Kalle Korhonen 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 supports multi tena

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

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Adam X
re 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 a

Re: tapestry-hibernate + tapestry-cdi

2016-09-23 Thread Qbyte Consulting
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 contains all the busi

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 a

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

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 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 passing the save off to

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, bu

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 wrote: I'm guessing you need to commit a transaction. Either: HibernateSessionManager.commit()

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

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. https://github.com/tynamo/tynamo-federatedaccounts/blob/master/tynamo-federatedaccounts-core/src/main/ja

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 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 just hit a random id? >

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" wrote: > Hi guys, I'm seeing this error in my logs, but everything appears to be > working fi

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 nu

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 time

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
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 &l

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

2014-08-27 Thread Thiago H de Paula Figueiredo
On Wed, 27 Aug 2014 10:07:59 -0300, Lance Java wrote: 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. And no tap

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 lik

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.

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, i

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, G

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 wrote: 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.

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 t

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 wrote: Thanks Lance. On Tue, Feb 4, 2014 at 3:22 PM, Lance Java wrote: > 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 hiber

Re: tapestry-hibernate upgrade version?

2014-02-04 Thread George Christman
Thanks Lance. On Tue, Feb 4, 2014 at 3:22 PM, Lance Java wrote: > > 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 www.CarDaddy.com P.O.

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)

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 m

Re: Tapestry Hibernate

2013-11-11 Thread Boris Horvat
ya0paevk6d|160faa11, numHelperThreads -> > 3 ] > 2013-11-11 12:15:59.048:INFO:oejs.AbstractConnector:Started > SelectChannelConnector@0.0.0.0:8080 > Started Jetty Server > > it could be that my logging configuration is for some reason now not being > pickup hence I dont see

Re: Tapestry Hibernate

2013-11-11 Thread Boris Horvat
nce I dont see any logs :S On Mon, Nov 11, 2013 at 12:22 PM, Boris Horvat wrote: > 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 i

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 the

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

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

2013-11-01 Thread Dmitry Gusev
013 at 10:06 AM, George Christman wrote: > 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 >

Tapestry-Hibernate using sessions inside of scheduler or threads.

2013-10-31 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 a

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

2013-10-27 Thread Barry Books
t; > all > > > > > >>>> changes are written to the database (performing outstanding > > > updates, > > > > > >>>> inserts, deletes)) > > > > > >>>> Clear clears the persistence context of

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

2013-10-27 Thread Dmitry Gusev
gt;>>> session.getTransaction().commit(); > > > > >>>> session.clear(); > > > > >>>> session.beginTransaction(); > > > > >>>> > > > > >>>> (without the clear its what HibernateSessionManager is

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

2013-10-26 Thread Barry Books
;>>>> @Inject > > > >>>>> Session session; //current session bound to the current thread > > > >>>>> > > > >>>>> > > > >>>>> or > > > >>>>> > > > >>>

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

2013-10-25 Thread Martin Kersten
t;>> current thread as would @Inject Session session; would do. > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 2013/10/25 George Christman > > >>>>> > > >>>

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

2013-10-25 Thread George Christman
ess I'm still a little confused as to what is the best to do > >>>>>> it. > >>>>>> @CommitAfter seems to work fine for individual transactions but does > >>>>>> not > >>>>>> work well with batch jobs do

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

2013-10-25 Thread Martin Kersten
gt; public void onActionFromTest() { >>>>> Session session = hibernateSessionManager.getSession(); >>>>> >>>>> for (int i = 0; i < 10; i++) { >>>>> employee = new Employee("George " + i); >

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

2013-10-25 Thread Martin Kersten
d end up getting the following code to work. >>>>>> Could >>>>>> someone tell me if I'm doing this correctly? Also should I be closing >>>>>> and >>>>>> rolling back the transaction? >>>>>> >>>&

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

2013-10-25 Thread Martin Kersten
gt; if (i % 250 == 0) { >>>> session.flush(); >>>> session.clear(); >>>> hibernateSessionManager.commit(); >>>> } >>>> } >>>> >>>

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

2013-10-25 Thread Martin Kersten
session.flush(); >>> session.clear(); >>> hibernateSessionManager.commit(); >>> >>> >>> >>> On Fri, Oct 25, 2013 at 9:07 AM, Thiago H. de Paula Figueiredo < >>> thiag...@gmail.com> wrote: >>>

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

2013-10-25 Thread George Christman
t > > does a commit. > > > > > 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 > Hibernat

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

2013-10-25 Thread Martin Kersten
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 not supported by > @CommitAfter, use T

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

2013-10-25 Thread Martin Kersten
> same >> > > can be said about nesting any commits. The Tapestry database model is >> > > simple. There is one connection per request and when you call commit >> it >> > > does a commit. >> > > >> > >> > >> > Tapestry

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

2013-10-25 Thread Martin Kersten
> > 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-Hibernate. > >

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

2013-10-25 Thread Thiago H. de Paula Figueiredo
does a commit. > 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

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 wrote: > 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 s

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 abou

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 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 tr

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
rs Martin (Kersten), Germany 2013/10/25 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 e

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 slow

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 wrote: > Hi everyone, > > Lanc

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 this

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 seleni

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 wrote: >

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" wrote: > On Wed, 25 Sep 2013 20:01:14 -0300,

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Thiago H de Paula Figueiredo
On Wed, 25 Sep 2013 20:01:14 -0300, Boris Horvat 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 HibernateModule added to the r

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 wrote: > ah I think

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 wrote: > Thanks for the detail replay it helps

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 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 u

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 wrote: > I use Submodule but I guess for the tests I need RegistryBuilder. Will try > that > > Thanks > > > On Wed, Sep 25, 2013

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 > wrote: > > My config is already split in that way. But I cant

Re: Tapestry + Hibernate + Testing

2013-09-25 Thread Thiago H de Paula Figueiredo
On Wed, 25 Sep 2013 17:17:22 -0300, Boris Horvat 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 RegistryBuilder.add(DDAOModule.class) or addin

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 wrote: > > Is it possible somehow to automate this? > > Have you read Howard's answer on the Stack Overflow question? He sug

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 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-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 wrote: > Well ideally I would like to avoid setting up the abstract class but at > lest I have a starting point t

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 eac

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 wrote: > Hi all, > > How does one make a proper testing of the business layer in tapestry that I > inject into the page as a serv

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) Call

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. 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 some queries to the data

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. http://svn.codehaus.org/tynamo/trunk/tynamo-federatedaccounts/tynamo-federatedaccounts-core/src/test/java/org/tyn

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

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 Will

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 wrote: > Questions about the 'magic' hibernate session proxy seem to crop up a bit > so I've raised a Jira to improv

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-13 Thread Dmitry Gusev
On Tue, May 14, 2013 at 12:05 AM, Boris Horvat wrote: > 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 > pref

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 the

Re: Tapestry Hibernate Session usage

2013-05-13 Thread Dmitry Gusev
On Mon, May 13, 2013 at 2:59 AM, Boris Horvat wrote: > 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 represent an access

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 org.apache.ta

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

2013-05-01 Thread Dmitry Gusev
> > > > > > > type="javax.sql.DataSource" > > >maxActive="100" maxIdle="30" maxWait="1" > > >username="root" password="test" > > > driverClassName="com.mysql.jdbc.Dri

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

2013-04-30 Thread George Christman
r"/> > > > > > > > > context.xml in Tomcat7\conf > > > > > > > > > > WEB-INF/web.xml > > > > > > > > > > > > > > > type="javax.sql.DataSource"

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

2013-04-30 Thread Dmitry Gusev
t; > > > > WEB-INF/web.xml > > > > > > > type="javax.sql.DataSource"/> > > > > Server.xml is blank. > > WEB-INF web.xml > > >MyDatabase Description > jdbc/rolemanager >

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

2013-04-30 Thread George Christman
Container On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev 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-hibernat

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

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 an

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

2013-04-29 Thread Dmitry Gusev
On Mon, Apr 29, 2013 at 11:33 PM, George Christman wrote: > So as it turns out, the issue was caused by tapestry-test adding an older > tomcat files to the class path. I'll need to somehow figure out how to > exclude them from the class path. > > > org.apache.tapestry >

  1   2   3   4   5   6   >