Re: [appfuse-user] hsqldb junit -> "already in use by another process"

2007-05-15 Thread Matt Raible
Is this an error that causes the build to fail, or just something you see after all the tests finish running? On 5/15/07, Steve Tynor <[EMAIL PROTECTED]> wrote: Thanks Matt. I thought shutdown=true should do the trick too. For what it's worth, I get a similar error with H2 (again, after 100% s

Re: [appfuse-user] hsqldb junit -> "already in use by another process"

2007-05-15 Thread Steve Tynor
Thanks Matt. I thought shutdown=true should do the trick too. For what it's worth, I get a similar error with H2 (again, after 100% successful Junit): > Embedded error: Database may be already open: Locked by another process [90020-34] so it may be related to other changes I've made to th

Re: [appfuse-user] Appfuse 2 - Problem populating DB with sample data

2007-05-15 Thread Matt Raible
If you received "BUILD SUCCESSFUL", it looks like it did succeed. Are you sure you're checking the right database? Matt On 5/15/07, mmaia <[EMAIL PROTECTED]> wrote: Hi, have used appfuse 1.9.4 for a couple of projects and had fun, really like it, life goes on and decided to take a look on appf

Re: [appfuse-user] Resolving Placeholders

2007-05-15 Thread Matt Raible
Is mail.properties included in your JAR? On 5/15/07, Philip Barlow <[EMAIL PROTECTED]> wrote: Hi Guys, Matt maybe you might have had this problem at some stage and hopefully you can help me. I have a project which is a self made port from 1.9.4 architecture to 2.0 architecture. The project has

Re: [appfuse-user] hsqldb junit -> "already in use by another process"

2007-05-15 Thread Matt Raible
On 5/15/07, Steve Tynor <[EMAIL PROTECTED]> wrote: I'm testing appfuse 2.0-m5-snapshot. I am using hsqldb for unit testing with the following substitution for mysql at the bottom of the pom.xml: > CLEAN_INSERT > org.dbunit.ext.hsqldb.HsqldbDataTypeFactory > org.hibernate.dialect.HSQLDialect

[appfuse-user] hsqldb junit -> "already in use by another process"

2007-05-15 Thread Steve Tynor
I'm testing appfuse 2.0-m5-snapshot. I am using hsqldb for unit testing with the following substitution for mysql at the bottom of the pom.xml: > CLEAN_INSERT > org.dbunit.ext.hsqldb.HsqldbDataTypeFactory > org.hibernate.dialect.HSQLDialect > hsqldb > hsqldb > 1.8.0.7 > org.hsqldb.jdbcDriver >

Re: [appfuse-user] Backgammon Java application

2007-05-15 Thread mmaia
I've seen some sample game apps built using echo. Maybe it could help you. It has a different approach for building web applications it's worth taking a look, I believe but I have never used it to build production systems thougth. http://www.nextapp.com/platform/echo1/echo/ regards. jeanclaud

[appfuse-user] Appfuse 2 - Problem populating DB with sample data

2007-05-15 Thread mmaia
Hi, have used appfuse 1.9.4 for a couple of projects and had fun, really like it, life goes on and decided to take a look on appfuse2 to consider for my next project and found a problem! The link: http://www.appfuse.org/display/APF/Maven+2 says that the command: mvn hibernate3:hbm2ddl dbunit:o

[appfuse-user] Resolving Placeholders

2007-05-15 Thread Philip Barlow
Hi Guys, Matt maybe you might have had this problem at some stage and hopefully you can help me. I have a project which is a self made port from 1.9.4 architecture to 2.0 architecture. The project has a service jar similar to appfuse's service jar, in this jar i have an applicationContext-ser

[appfuse-user] Appfuse Spring Jasper dynamic compilication of JRXML file is failing in Weblogic 8.1 SP5

2007-05-15 Thread SJ
I have followed the tutorial http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuseJasperReports to use jasper reports with Spring. My application works fine in tomcat. But when it is deployed in Weblogic 8.1 SP5, I receive the following error message when Spring is loaded. I know JRComplier looks

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
jep i have the same just for others: === === package nl.topticketline.topnet.util; import org.acegisecurity.Authentication; import org.acegisecurity.context.SecurityContext

Re: [appfuse-user] get logged in username

2007-05-15 Thread Sanjiv Jivan
See my response here : http://www.nabble.com/forum/ViewPost.jtp?post=5376367&framed=y&skin=2369 On 5/15/07, tibi <[EMAIL PROTECTED]> wrote: apart from this :( when i use my application this will work: public boolean loggedInUserHasRole(String roleName) { if (SecurityContextHolder

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
apart from this :( when i use my application this will work: public boolean loggedInUserHasRole(String roleName) { if (SecurityContextHolder.getContext() != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null) {

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
used this: http://raibledesigns.com/downloads/appfuse/api/org/appfuse/service/UserSecurityAdviceTest.java.html worked perfect... tibi wrote: thanks tibi Michael Horwitz wrote: On 5/15/07, *tibi* <[EMAIL PROTECTED] > wrote: thanks. so i will use the last one

Re: [appfuse-user] GenericManager get method

2007-05-15 Thread tibi
it has both pros and cons. now if you are not sure if the get will work, you need to build a try catch block. with null you could just do an if null check. but when i think about it it should be very rare that someone tries to do a get with a wrong primary key. (in my case it was from a testca

Re: [appfuse-user] GenericManager get method

2007-05-15 Thread hiugong.gwok
Well, IMHO it's better than a clueless NPE came out of nowhere, not ideal though. tibi-3 wrote: > > here is the get method. it will return a runtime exception when nothing > is found. > i wonder why not return null? > > thanks, > > tibi > > /** > * Generic method to get an object b

Re: [appfuse-user] ThinWire - AJAX based Web framework (no html, no javascipt, purly java)

2007-05-15 Thread Matt Raible
No, I personally have not tried ThinWire. Matt On 5/15/07, tibi <[EMAIL PROTECTED]> wrote: anyone tried this?? tibi kkus wrote: > www.thinwire.com > > It looks cool since you are working only with java and seems a rapid > development framework. Check its demo and you can't even tell it is a w

Re: [appfuse-user] GenericManager get method

2007-05-15 Thread Matt Raible
We could return null, but I've found that having a null return is often a surprise to users. I think throwing ObjectRetrievalFailureException is more intuitive, just like Acegi throws UsernameNotFoundException (or something like that) when it can't find a user. Matt On 5/15/07, tibi <[EMAIL PRO

Re: [appfuse-user] ThinWire - AJAX based Web framework (no html, no javascipt, purly java)

2007-05-15 Thread tibi
anyone tried this?? tibi kkus wrote: www.thinwire.com It looks cool since you are working only with java and seems a rapid development framework. Check its demo and you can't even tell it is a web app. It also can take advantage of power provided by Spring and Hibernate by integration. A real

[appfuse-user] GenericManager get method

2007-05-15 Thread tibi
here is the get method. it will return a runtime exception when nothing is found. i wonder why not return null? thanks, tibi /** * Generic method to get an object based on class and identifier. An * ObjectRetrievalFailureException Runtime Exception is thrown if * nothing is foun

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
thanks tibi Michael Horwitz wrote: On 5/15/07, *tibi* <[EMAIL PROTECTED] > wrote: thanks. so i will use the last one. can i test this method from a junit test? or an baseActionTest. and how can i login? Yes, as long as you set up the ACEGI security c

Re: [appfuse-user] get logged in username

2007-05-15 Thread Michael Horwitz
On 5/15/07, tibi <[EMAIL PROTECTED]> wrote: thanks. so i will use the last one. can i test this method from a junit test? or an baseActionTest. and how can i login? Yes, as long as you set up the ACEGI security context. See UserSecurityAdviceTest in the AppFuse source for an example of how t

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
thanks. so i will use the last one. can i test this method from a junit test? or an baseActionTest. and how can i login? tibi Michael Horwitz wrote: The first version is only usefull where you have access to the request object. This is not always the case, particularly in the service layer. T

Re: [appfuse-user] get logged in username

2007-05-15 Thread Michael Horwitz
The first version is only usefull where you have access to the request object. This is not always the case, particularly in the service layer. The second version works throughout the call stack and returns the logged in user as per ACEGI. As far as I know they should always return the same value,

Re: [appfuse-user] get logged in username

2007-05-15 Thread tibi
what is the difference between: request.getRemoteUser() and this public String getLoggedInUserName() { if (SecurityContextHolder.getContext() != null) { Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null) {