[appengine-java] Re: Advanced Access Control

2011-06-19 Thread objectuser
I've never used Spring Security by itself.  It used to be its own
project, so it might not be too bad.  As far as I know, there are
still issues with using Spring in GAE, but maybe those have been
solved, and they may not apply to using Spring Security by itself.

I'm currently using Apache Shiro.  I've been meaning to blog about it,
but alas.

http://shiro.apache.org/

Shiro will do role based method-level verification, but also allow you
to assign arbitrary permissions and assert those at any point.

On Jun 18, 6:55 pm, "Xel'Ra"  wrote:
> Hi guys,
>
> I wanted to ask for a hint on some technologies I could use for what I
> want to do with GAE. I am a bit overwhelmed by the huge amounts of
> different and competing APIs and stuff that I am reading about.
>
> I want to do a web page with login. But not for everyone with a google
> account.
> I want users to create an account and save data. They shall be the
> admins of their accounts and be able to create sub-users that can use
> the app with the respective data. Also they need to be able to
> restrict access to certain areas for their sub-users.
> Also it should be possible to, at a later stage, implement a
> subscription payment model and to check on which membership model they
> are. According to that they will only be to e.g. create 3 sub-users
> and save 1000 entries of a string per month.
>
> From what I've read on the web the technologies I would need for a
> project like that are:
>
> GAE + GWT + Spring security.
>
> Is spring security really the right choice? Am I mistaken? Are there
> other alternatives for handling user rights?
> I would be very glad to be pointed in the right direction and
> literature. I am kinda lost right now.
>
> Thank you in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Aw: null parent in bidirectional JPA OneToMany relation

2011-06-19 Thread Paolo
 Nobody?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/cpXhs_m6-pwJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Advanced Access Control

2011-06-19 Thread Dominik Karadeniz
Thank you. I have never heard of Shiro before, but it seems to be exactly
what I need.

Do you know whether Shiro is THE standard thing to use for GAE access
control. Are there alternatives that you know of?

It is always very important to me to make sure a system is somewhat
"standardized" before I use it.

Thanks.

On Sun, Jun 19, 2011 at 2:57 PM, objectuser  wrote:

> I've never used Spring Security by itself.  It used to be its own
> project, so it might not be too bad.  As far as I know, there are
> still issues with using Spring in GAE, but maybe those have been
> solved, and they may not apply to using Spring Security by itself.
>
> I'm currently using Apache Shiro.  I've been meaning to blog about it,
> but alas.
>
> http://shiro.apache.org/
>
> Shiro will do role based method-level verification, but also allow you
> to assign arbitrary permissions and assert those at any point.
>
> On Jun 18, 6:55 pm, "Xel'Ra"  wrote:
> > Hi guys,
> >
> > I wanted to ask for a hint on some technologies I could use for what I
> > want to do with GAE. I am a bit overwhelmed by the huge amounts of
> > different and competing APIs and stuff that I am reading about.
> >
> > I want to do a web page with login. But not for everyone with a google
> > account.
> > I want users to create an account and save data. They shall be the
> > admins of their accounts and be able to create sub-users that can use
> > the app with the respective data. Also they need to be able to
> > restrict access to certain areas for their sub-users.
> > Also it should be possible to, at a later stage, implement a
> > subscription payment model and to check on which membership model they
> > are. According to that they will only be to e.g. create 3 sub-users
> > and save 1000 entries of a string per month.
> >
> > From what I've read on the web the technologies I would need for a
> > project like that are:
> >
> > GAE + GWT + Spring security.
> >
> > Is spring security really the right choice? Am I mistaken? Are there
> > other alternatives for handling user rights?
> > I would be very glad to be pointed in the right direction and
> > literature. I am kinda lost right now.
> >
> > Thank you in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Advanced Access Control

2011-06-19 Thread objectuser
I think it would be hard to say there's any "standard".  GAE is
effectively a web environment, which means you can do most "web"
things with it.

The Spring guys have a blog post about setting up Spring Security:

http://blog.springsource.com/2010/08/02/spring-security-in-google-app-engine/

I have a couple posts on it, the newest being:

http://objectuser.wordpress.com/2009/10/24/more-on-spring-security-in-google-app-engine/

There's much more information on Spring Security than Shiro, in my
experience.  But, for me, it came down to the "weight" of the solution
and its integration with Google Guice.  YMMV. :)

On Jun 19, 9:14 am, Dominik Karadeniz
 wrote:
> Thank you. I have never heard of Shiro before, but it seems to be exactly
> what I need.
>
> Do you know whether Shiro is THE standard thing to use for GAE access
> control. Are there alternatives that you know of?
>
> It is always very important to me to make sure a system is somewhat
> "standardized" before I use it.
>
> Thanks.
>
>
>
>
>
>
>
> On Sun, Jun 19, 2011 at 2:57 PM, objectuser  wrote:
> > I've never used Spring Security by itself.  It used to be its own
> > project, so it might not be too bad.  As far as I know, there are
> > still issues with using Spring in GAE, but maybe those have been
> > solved, and they may not apply to using Spring Security by itself.
>
> > I'm currently using Apache Shiro.  I've been meaning to blog about it,
> > but alas.
>
> >http://shiro.apache.org/
>
> > Shiro will do role based method-level verification, but also allow you
> > to assign arbitrary permissions and assert those at any point.
>
> > On Jun 18, 6:55 pm, "Xel'Ra"  wrote:
> > > Hi guys,
>
> > > I wanted to ask for a hint on some technologies I could use for what I
> > > want to do with GAE. I am a bit overwhelmed by the huge amounts of
> > > different and competing APIs and stuff that I am reading about.
>
> > > I want to do a web page with login. But not for everyone with a google
> > > account.
> > > I want users to create an account and save data. They shall be the
> > > admins of their accounts and be able to create sub-users that can use
> > > the app with the respective data. Also they need to be able to
> > > restrict access to certain areas for their sub-users.
> > > Also it should be possible to, at a later stage, implement a
> > > subscription payment model and to check on which membership model they
> > > are. According to that they will only be to e.g. create 3 sub-users
> > > and save 1000 entries of a string per month.
>
> > > From what I've read on the web the technologies I would need for a
> > > project like that are:
>
> > > GAE + GWT + Spring security.
>
> > > Is spring security really the right choice? Am I mistaken? Are there
> > > other alternatives for handling user rights?
> > > I would be very glad to be pointed in the right direction and
> > > literature. I am kinda lost right now.
>
> > > Thank you in advance.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Why the 10 second URL fetch limit?

2011-06-19 Thread Nischal
@Ikai What workaround do you suggest? Making a call, converting it into a 
task and then waiting for the channel api to push the response?  Or is there 
something else that can be done? 

Many of my calls to third party sites like twitter and facebook get timed 
out often. I have never encountered a delay in response from facebook on my 
local machine, ever. But on the appengine a lot of calls to facebook fail 
often. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/arTYs2nbAfUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: 1.5.1 SDK Prerelease

2011-06-19 Thread Jay Young
Just downloaded the new "appengine-java-sdk-1.5.1_prerelease.zip" and ran 
the dev_appserver, only to receive the following exception.  The Jetty 
server starts up as expected, but will only serve 503s.

WARNING: Failed startup of context 
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@4463a1ae{/,/devel/rblog/WAR}
java.lang.NullPointerException
at 
com.google.appengine.tools.appstats.Recorder.checkNotNull(Recorder.java:365)
at com.google.appengine.tools.appstats.Recorder.(Recorder.java:207)
at com.google.appengine.tools.appstats.Recorder.(Recorder.java:197)
at 
com.google.appengine.tools.appstats.AppstatsFilter.init(AppstatsFilter.java:183)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at 
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:186)
at 
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:162)
at 
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at 
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at 
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at 
com.google.appengine.tools.development.DevAppServerMain.(DevAppServerMain.java:113)
at 
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/6ifJrc2tLl8J.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] ScriptEngine

2011-06-19 Thread keyvez
Included js.jar in the WEB-INF folder and it still doesn't work.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/jdBxepWVw_QJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] ScriptEngine

2011-06-19 Thread keyvez
I meant I put it in WEB-INF/lib folder.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/W7tJoVsheGUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] ScriptEngine

2011-06-19 Thread keyvez
I also have to put a jsr223 implementation jar in the WEB-INF/lib folder for 
it to find ScriptEngineManager.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/s4aW8pCmrmIJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Confused about loading vs. non-loading requests when threadsafe on

2011-06-19 Thread Tom Phillips
The GAE documentation says you can detect loading requests like this:

// web.xml snippet

  
  com.example.LogLoadingRequest
  


// LogLoadingRequest.java
public class LogLoadingRequest implements ServletContextListener {
  private static final Logger logger =
Logger.getLogger(LogLoadingRequest.class.getName());
  public void contextInitialized(ServletContextEvent sce) {
logger.log(Level.INFO, "Loading request occuring.");
  }

  public void contextDestroyed(ServletContextEvent sce) {
  }
}

But I'm finding from my logs that what GAE thinks is a loading request
(identified in log as loading_request=1) and which is given longer
deadline, does NOT always match the request that logs the above
"Loading request occuring." when Threadsafe is on.

Should it, or is this method obsolete for threadsafe instances? Is
there some other way I can detect loading vs non-loading requests with
threadsafe on?

With threadsafe on, non-loading requests are being assigned by GAE to
instances while the loading request is still happening, resulting in
all sort of (Hard)DeadlineExceeded issues in the non-loading requests.
Reason is, loading requests are showing huge slow down and variance in
loading times lately, often exceeding the 30 seconds that non-loading
request are allowed - even though in my case loading should only take
about 4 seconds (jaxb,PMF) plus whatever classloading and jvm startup
takes. Worst thing is, these exceptions bring down the instance before
loading can even finish, requiring multiple startup attempts. I'm
trying to work around it by detecting loading vs. non-loading requests
and in non-loading either doing a no-op if not critical, or proxying
via urlfetch through to a backend until the loading request is
complete.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Java Google App Engine bulk loader upload error “OverflowError: date value out of range”

2011-06-19 Thread Dennis Lo
I found a solution to this problem. Check it out here:

http://stackoverflow.com/questions/6316096/java-google-app-engine-bulk-loader-upload-error-overflowerror-date-value-out-of

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/UzEXY9I4roQJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] SOAP Server and a SOAP Client on Google App Engine

2011-06-19 Thread Buddhika Mawella


Hi all,

I was looking for a method to implement web services on Google app engine. 
Finally found below article as a solution. 

http://code.google.com/appengine/articles/soap.html.

We are going to user this procedure for creating web services for our app 
engine application. One problem I am having is the method of implementing 
security for above created web service. According to that, any one in world 
can access the created service. Can we use this method to create web 
services on app engine as a reliable solution? Or are there any limitations 
in this method? Please help me. I am quite new to this subject.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/SGvLusYhPXUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: jsf view id's expire too quick

2011-06-19 Thread Piter Blom
Hi Mich, did you ever resolve this problem?

I've just deployed my first app (mojarra 2.0.4) and I ran into exactly the 
same problem.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/iGMR30Yj3NUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: jsf view id's expire too quick

2011-06-19 Thread Juha K
Hi,

I've also seen similar errors and I'm not sure why. Using JSF 2 it happens 
quite often for ajax requests. I also have another issue and I'm not sure if 
it's related to the same problem. The other issue is with jsf session beans. 
If you're using client-side state saving and set some value to a session 
scoped jsf bean the value is not stored! I think this happens because of 
some optimization to how sessions are stored. I suppose updating a session 
bean (which already exists in the session) doesn't mark session dirty during 
the request and doesn't trigger session saving to storage after the request 
completes. I've fixed this problem by adding:

MyBean bean = 
 
(MyBeab)FacesContext.getCurrentInstance().getExternalContext().getSession(true)).getAttribute("bean");
((HttpSession) 
FacesContext.getCurrentInstance().getExternalContext().getSession(true)).setAttribute("bean",
 
bean);

So basically just getting the bean from session and setting it back there 
fixes the problem of saving changes to session beans using client-side state 
saving. 


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/V_x0JhPWKv4J.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: jsf view id's expire too quick

2011-06-19 Thread Piter Blom
Thanks for the reply Juha.

In my case changing the STATE_SAVING_METHOD from 'server' to 'client' in the 
web.xml already did the trick. But I will keep your suggestion in mind in 
case I run into problems again.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/9-VdJtBQ73sJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Clearing Mem Cache in JUnit Tests with sdk 1.5.0.1 throws error

2011-06-19 Thread Heiko Roth
Use any Unit Test and add

@BeforeClass
public static void setUp()
{
LocalDatastoreServiceTestConfig config = new
LocalDatastoreServiceTestConfig();
helper = new LocalServiceTestHelper(config);
helper.setUp();
helper.setEnvAppId(EtappsTestData.appId);
ds = DatastoreServiceFactory.getDatastoreService();
MemcacheServiceFactory.getMemcacheService().clearAll();
}

Call of
   MemcacheServiceFactory.getMemcacheService().clearAll();
will fail.

I'll test pre release 1.5.1 and if the problem exists, I'll make a
small test case.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.