tag:blogger.com,1999:blog-20427072.post3379245409272677212..comments2024-03-01T08:14:47.040+00:00Comments on random thoughts...: GWT and Spring Security - sample demo downloadSee Wah Chenghttp://www.blogger.com/profile/08504655870498748611noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-20427072.post-10517191863600034322012-09-11T17:45:14.206+01:002012-09-11T17:45:14.206+01:00Would it be possible to have the sources uploaded ...Would it be possible to have the sources uploaded somewhere ?<br /><br />The matter discussed is truly interesting !<br /><br />Thanks for all, <br /><br />Cheers )Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-20427072.post-35468223633049610302012-02-13T07:40:51.771+00:002012-02-13T07:40:51.771+00:00Hello! Can you plese re-upload your sample project...Hello! Can you plese re-upload your sample project, I really need it, and, as you know, MegaUpload is no more, unfortunately.Pantslesshttps://www.blogger.com/profile/13694581496082784577noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-78006789143934000562010-07-02T06:10:48.230+01:002010-07-02T06:10:48.230+01:00Thanks See Wah!
I updated the demo with Spring 3....Thanks See Wah!<br /><br />I updated the demo with Spring 3.0.3, Spring Security 3.0.3 (they are separate now!) and GWT 2.1.0.M1. Download here: <a href="http://www.megaupload.com/?d=0H1Y9EBM" rel="nofollow">http://www.megaupload.com/?d=0H1Y9EBM</a>Thomasnoreply@blogger.comtag:blogger.com,1999:blog-20427072.post-81865609633206152982010-04-23T00:54:57.210+01:002010-04-23T00:54:57.210+01:00This comment has been removed by the author.ftgohttps://www.blogger.com/profile/02642597024041492082noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-13233024212855546742009-09-07T02:19:15.501+01:002009-09-07T02:19:15.501+01:00See Wah, problem resolved. Interestingly enough, t...See Wah, problem resolved. Interestingly enough, the state I was experiencing was the result of a minor typo in the DocumentServiceServlet when declaring the <br />@Autowired<br />com.mycompany.server.service.DocumentServiceImpl documentService;<br /><br />instead of:<br /><br />@Autowired<br />com.mycompany.server.service.DocumentService documentService; <br /><br />Thanks again.The Pragmatic Researcherhttps://www.blogger.com/profile/00796086314598483291noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-29230414795327571372009-09-07T01:54:21.920+01:002009-09-07T01:54:21.920+01:00This comment has been removed by the author.The Pragmatic Researcherhttps://www.blogger.com/profile/00796086314598483291noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-23874122997917308012009-09-06T22:33:45.516+01:002009-09-06T22:33:45.516+01:00Thanks See Wah!
There is another problem once I t...Thanks See Wah!<br /><br />There is another problem once I try to use this approach using my own service: I get a Error 500 due to a bizarre IllegalArgumentException thrown from the DependencyInjectionRemoteServlet.<br /><br />I am not sure why this is happening the moment I add the @Secured("ROLE_ADMIN") on the method in my service. <br /><br />Any Ideas? The service is simply getting a record from the database using hibernate.The Pragmatic Researcherhttps://www.blogger.com/profile/00796086314598483291noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-66654863662872293132009-09-04T09:31:27.961+01:002009-09-04T09:31:27.961+01:00Ah that is because since GWT 1.6 AsyncCallback<...Ah that is because since GWT 1.6 AsyncCallback<Object> is no longer compatible with methods which return void. You would have to change the AsyncCallback to AsyncCallback<Void> instead. Sorry I only developed and tested the code in version 1.5 of GWT.<br /><br />And yes I was surprised to find that there is actually a "Void" class in Java!See Wah Chenghttps://www.blogger.com/profile/01577408205867601665noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-90577324779424171362009-09-04T00:23:44.356+01:002009-09-04T00:23:44.356+01:00see wah, thank you for this. jmolins thanks for t...see wah, thank you for this. jmolins thanks for the updated code to 1.6.4. <br /><br />I do get one problem with the code however.<br />public interface AuthenticationServiceAsync {<br /><br /> public void authenticate(String username, String password, AsyncCallback lt; Boolean gt; callback);<br /><br /> public void logout(AsyncCallback lt; Object gt; callback);<br />}<br /><br />I keep getting an error on the use of lt; Object gt; with AsyncCallback. The error is that "AsyncCallback parameterization is not compatible with the return type of AuthenticationService.logout".<br /><br />How to fix this?<br /><br />Thanks.The Pragmatic Researcherhttps://www.blogger.com/profile/00796086314598483291noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-22223294223699377092009-08-06T10:45:16.252+01:002009-08-06T10:45:16.252+01:00two reasons really:
1) my design is based on the ...two reasons really:<br /><br />1) my design is based on the premises that the Spring layer and the GWT layer are very loosely-coupled e.g. in your company, you may already have all the Spring service beans already developed and you are just bolting a GWT frontend on top of this service layer. There are other reasons why you may want your GWT service interface to be slightly different from your Spring service interface as well.<br /><br />2) The two interfaces ARE DIFFERENT! The GWT service interface getNumberOfPrivatePublications() method throws a checked ServiceSecurityException while the corresponding method in the Spring service interface does not. There may be alternatives that can potentially circumvent this, but to be honest, I have not really thought hard about this :-)<br /><br />Anyway as I mentioned before, this is by no means the definitive way to integrate Spring Security in GWT. This method works great for me, but depending on your particular circumstances, this may not work so well. I am just hoping to give you guys some ideas :-)See Wah Chenghttps://www.blogger.com/profile/01577408205867601665noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-5684956925940597222009-08-05T15:03:09.408+01:002009-08-05T15:03:09.408+01:00How come that you declare the services (DocumentSe...How come that you declare the services (DocumentService for example) both in the client and in the server package?<br /><br />Why not having the DocumentServiceImpl in the server package implement the DocumentService in the client packageAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-20427072.post-58381359528198575652009-07-13T01:52:16.725+01:002009-07-13T01:52:16.725+01:00Sorry work has been manic recently. Have not reall...Sorry work has been manic recently. Have not really been keeping an eye on the blog. Anyway the short answer to the last comment is it does not, since I am only using the method security feature in ACEGI / Spring Security in this case, and not really using the AuthentionProvider/Manager mechanism at all - I am doing my own authentication inside AuthenticationServiceImpl. But of course if you want to you can always implement your AuthenticationServiceImpl to PROGRAMMATICALLY use your AuthenticationProvider to authenticate (as opposed to using AuthenticationProvider DECLARATIVELY as you would normally with ACGI)See Wah Chenghttps://www.blogger.com/profile/01577408205867601665noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-6352272211189570152009-07-04T11:14:02.580+01:002009-07-04T11:14:02.580+01:00Hi,
Im a newbie to Acegi & GWT. How can this s...Hi,<br />Im a newbie to Acegi & GWT. How can this sample work with DaoAuthenticationProvider to use database user/roles data?yukorosnoreply@blogger.comtag:blogger.com,1999:blog-20427072.post-57922717569157099292009-06-27T00:07:32.213+01:002009-06-27T00:07:32.213+01:00Sure.
You can download from the following url:
htt...Sure.<br />You can download from the following url:<br />http://www.megaupload.com/?d=QCWL1ZDNChema Molinshttps://www.blogger.com/profile/01063381911884193880noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-35269447826265544702009-06-25T21:04:53.833+01:002009-06-25T21:04:53.833+01:00jmolins - can you provide your source for the upda...jmolins - can you provide your source for the update to app engine? Thanks.Unknownhttps://www.blogger.com/profile/14564586712631962679noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-7894653733589014022009-06-16T14:40:25.793+01:002009-06-16T14:40:25.793+01:00Hi,
I have ported your code to GWT 1.6.4 and Googl...Hi,<br />I have ported your code to GWT 1.6.4 and Google App Engine.<br />It works great after the necessary modifications.<br />If you want the code, please let me know.<br />JoseChema Molinshttps://www.blogger.com/profile/01063381911884193880noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-12969793541609312742009-06-08T16:53:37.153+01:002009-06-08T16:53:37.153+01:00i already became fan of your blog See Wah. Will yo...i already became fan of your blog See Wah. Will you post gwt+spring+openId integration any sooner? if not, can you provide some brief guide how to do that? thank youUnknownhttps://www.blogger.com/profile/07020867340871084652noreply@blogger.comtag:blogger.com,1999:blog-20427072.post-74898213291991028052009-06-08T16:53:36.283+01:002009-06-08T16:53:36.283+01:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/07020867340871084652noreply@blogger.com