[appengine-java] Re: A web service with security (java)

2009-11-23 Thread Andrey
I begin to use Spring Security. Now I learn how to use OpenID or OAuth with Spring Security... Regards, -Andrey -- 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-j...@googlegrou

[appengine-java] Re: app engine session variable

2009-11-23 Thread Jeune
What strange behaviour exactly? I think you should serialize the portfolio object before you should store it to session. Another thing is, IMO you should not store too many things to the session. But that's me. I'd like to know other people's thoughts On Nov 24, 9:37 am, Don wrote: > Hi, > >

[appengine-java] Re: JDO x JPA

2009-11-23 Thread datanucleus
http://www.datanucleus.org/products/accessplatform_2_0/persistence_api.html -- 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-j...@googlegroups.com. To unsubscribe from this group

[appengine-java] Re: problem with using session.getAttribute()

2009-11-23 Thread Steph
I also have the same issue when retrieving session objects from a servlet filter, and running in the local sandbox. On Nov 21, 10:11 pm, Sanjay wrote: > Did you solve this problem? I am facing exactly same problem, it would > be nice if you could share the solution if you found one. > > Thank you

[appengine-java] How to remove property of java object(POJO) with safty?

2009-11-23 Thread sea
Environment :GAE for java, JPA I defined a java object(POJO) and stored some data in it. But later I found a property of that java object(POJO) was useless, and there was no data in that property.So I removed that property, but that caused a big problem, the data in that java object(POJO) can not

[appengine-java] Re: convert JDO query to JPA

2009-11-23 Thread lp
> EntityManager em = EMF.get().createEntityManager(); > PrintWriter out = response.getWriter(); > > List dogs; > > try { > > Query query = em.createQuery("SELECT FROM Dog WHERE > dogFriends = :key"); > query.setParameter("key", key); >

[appengine-java] Re: convert JDO query to JPA

2009-11-23 Thread lp
>         EntityManager em = EMF.get().createEntityManager(); >         PrintWriter out = response.getWriter(); > >         List dogs; > >         try { > >             Query query = em.createQuery("SELECT FROM Dog WHERE > dogFriends = :key"); >             query.setParameter("key", key); >      

Re: [appengine-java] JDO x JPA

2009-11-23 Thread Timothy Spear
For GAE it developers it will be mostly a matter of preference. There are purists on both sides of the fence, although from a market share perspective I think JPA has the upper hand. I base this on the number of recent articles, support by commercial application containers, and job applican

Re: [appengine-java] Server Code for Chat Service / Matchmaking

2009-11-23 Thread Timothy Spear
Craig, The short answer is. No threads may not be spawned. Use the datastore to update/change status for the users. Only use memcache for reference information or information which a invalid current status may be acceptable. If the current status of a user must be valid, then the da

[appengine-java] Re: InputStream read returning -1, but avalible btyes correct ?

2009-11-23 Thread Bourke Floyd IV
//I figured out the problem. Example case: POST Request from a webpage with 2 text fields (userEmail = '5...@gmail.com', and favCar = 'corvette') //If I use String email = req.getParameter("userEmail") //and then try to get the whole body of the POST InputStream inputStream = req.getInputStream()

Re: [appengine-java] InputStream read returning -1, but avalible btyes correct ?

2009-11-23 Thread Toby Reyelts
FYI a couple of notes: 1) InputStream.available() only tells you how many bytes can be read without blocking. From its specification: It is never correct to use the return value of this method to allocate a > buffer intended to hold all data in this stream. Just don't use it. 2) InputStream.re

[appengine-java] app engine session variable

2009-11-23 Thread Don
Hi, I am trying to store an object in the session in servlet by req.getSession().setAttribute("portofolio", portofolio); where portofolio is an object with about 10variables and functions. However, App engine behaves strangely when I do this, so I resorted to just saving strings into session att

[appengine-java] Re: bulkloader dump and restore

2009-11-23 Thread lent
Thanks Ikai. The approach you suggested for exporting the key field worked for me. Len On Nov 19, 5:36 pm, "Ikai L (Google)" wrote: > Len, > > I assume you are doing this by having different application versions for a > Python application and Java application as documented here: > > http://goog

Re: [appengine-java] Current state of play regarding java.awt.* - official statement?

2009-11-23 Thread Ikai L (Google)
David, We keep on eye on what seems to be blocking developers the most. We've got a few open issues for AWT: http://code.google.com/p/googleappengine/issues/list?can=2&q=awt You'll want to star the issues as needed or create a new one with your use case in the description. On Fri, Nov 20, 2009

Re: [appengine-java] Re: Help With Images In Java

2009-11-23 Thread Ikai L (Google)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String keyString = request.getParameter("key"); PersistenceManager pm = PMF.get().getPersistenceManager(); Image image = (Image) pm.getObjectById(Image.class

Re: [appengine-java] InputStream read returning -1, but avalible btyes correct ?

2009-11-23 Thread Ikai L (Google)
What are you posting? This code works for me: public class TestPostServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { InputStream in = request.getInputStream(); int size = in.ava

[appengine-java] Re: Help With Images In Java

2009-11-23 Thread mably
Found this doc on Google, it might help you : http://balusc.blogspot.com/2007/04/imageservlet.html#ImageServletServingFromDatabase On 20 nov, 05:09, java-dev wrote: > hi all, > > I need some help with images in appengine using java. Now I have > sucessfully uploaded an image file and stored it t

[appengine-java] Persistable JDO object -> low-level entity?

2009-11-23 Thread Erem
Hey all, Are there any built in tools in the API to translate a managed JDO object into a low-level Entity? I want to do a batch put of some JDO-managed objects and some low- level Entities. If I could translate JDO-managed objects into bigtable Entities, I could do this in one call to the low-le

Re: [appengine-java] Re: Now available: JDO/JPA preview release with inheritance support

2009-11-23 Thread Max Ross (Google)
Thanks for the report! I've made a lot of fixes since the RC1 build but they're not backwards-compatible with the 1.2.6 SDK, so unfortunately I can't release them until the next SDK is out. Your test case works for me with my latest build so this will behave correctly in the next release. Thanks

Re: [appengine-java] Re: convert JDO query to JPA

2009-11-23 Thread Ikai L (Google)
Here's a video from Google I/O last year about complex data modeling on App Engine. It talks a little bit about how we do indexing underneath the hood: http://www.youtube.com/watch?v=AgaL6NGpkB8 Look for an upcoming article about the subject. App Engine Datastore is built on top of BigTable. It's

[appengine-java] Re: Now available: JDO/JPA preview release with inheritance support

2009-11-23 Thread R. A.
>> http://datanucleus-appengine.googlecode.com/files/appengine-orm-1.0.4.RC1.zip >> This release provides support for inheritance of native datastore types and >> embedded classes. Can't get inheritance to run. Tested on *-1.0.3 and *-1.0.4.RC1. Without AbstractEntity, 2 entities with OneToMany r

Re: [appengine-java] Help:I can't make a object persistent completely.

2009-11-23 Thread Rusty Wright
Try @Persistent(defaultFetchGroup = "true") on anything that's not listed in the Core Value Types table on http://code.google.com/appengine/docs/java/datastore/dataclasses.html Jolam wrote: > This is the object: > ___ > > @PersistenceCapable(identityType = IdentityType.APP

Re: [appengine-java] JDO x JPA

2009-11-23 Thread Rusty Wright
If you look at Max's examples and test code he does everything in both JDO and JPA, so it seems to me that it's a coin toss. I went with JDO because I heard that it's not as strongly oriented to relational sql databases. Rafael Reuber wrote: > Hi there, > > What's the better suport for G

Re: [appengine-java] A web service with security (java)

2009-11-23 Thread Rusty Wright
How about Google Accounts? http://code.google.com/appengine/docs/java/users/ Or, if you want something even more widespread, there's OpenID; http://openid.net/ On the OpenID site, look at the list at the bottom, "Who is using OpenID". Yiming Li wrote: > Hi Andrey, > I don't know t

Re: [appengine-java] Ancestor queries in JPQL? / Getting "Key of parameter value does not have a parent"

2009-11-23 Thread Rusty Wright
I'm thinking of something like a "tips and tricks" section that goes over these extensions as well as JDO/JPA things that might be particularly useful with GAE, with examples of how they're useful with GAE. For example, parent-pk, and then in Max's recent article, @PrePersist, @PreUpdate, and t

Re: [appengine-java] Ancestor queries in JPQL? / Getting "Key of parameter value does not have a parent"

2009-11-23 Thread Ikai L (Google)
I'm happy to add this to the official docs if it isn't clear. I think this makes sense under the JPA section or the section about ancestor queries. On Sun, Nov 22, 2009 at 11:24 PM, Rusty Wright wrote: > There are way too many hidden secrets, like this parent-pk query, that are > buried throughou

Re: [appengine-java] Datastore Issues

2009-11-23 Thread Ikai L (Google)
Can you post a subset of your code? It'd be great for the community to take a look at what you are doing and see if there's anything that jumps out at us. On Sat, Nov 21, 2009 at 11:46 PM, Jeffrey Goetsch wrote: > I have been having a lot of trouble with JDO objects not storing, or at > least not

Re: [appengine-java] JDO x JPA

2009-11-23 Thread Ikai L (Google)
Both JDO and JPA support are built on top of the low-level API: http://code.google.com/appengine/docs/java/datastore/overview.html Anecdotally, I see more articles about JDO on App Engine, but my experience has been that there are more *general* JPA articles lying around, though they may not be a

Re: [appengine-java] Re: Cannot get guestbook.jsp of Guestbook app to work

2009-11-23 Thread Ikai L (Google)
Andreas, HTML files are just static files. The way JSP works is that JSP files are compiled to servlets under the hood when needing, so when you copy the code, you are really just copying HTML code. There are two things you should check here: 1. Browser cache. You may be caching the page. 2. Run

Re: [appengine-java] Re: JSF 2.0.1 java.lang.ClassNotFoundException: void

2009-11-23 Thread Alexandre Calvão
Does anyone have a archetype project for GAE, whith the JSF Working ? I could not do this think work. Thanks 2009/11/20 addy.bhardwaj > I had a similar issue. The way I fixed it was to configure state > saving to client rather than server. For details check my blog > > http://consultingblogs

[appengine-java] Re: Server Code for Chat Service / Matchmaking

2009-11-23 Thread laphroaig15
I'm also interested to hear on this from more experienced GAE developers. My understanding so far is that you can only reliably maintain state by persisting data to the data store on every request. You can put objects into the memory cache, but since that's volatie, i.e. can be blown away at any t

[appengine-java] Help With Images In Java

2009-11-23 Thread java-dev
hi all, I need some help with images in appengine using java. Now I have sucessfully uploaded an image file and stored it to the datastore. I am also able to read back the stored image (as a byte[] array). Now the issue is, how do I display this image in my jsp page? *

[appengine-java] Re: JSF 2.0.1 java.lang.ClassNotFoundException: void

2009-11-23 Thread addy.bhardwaj
I had a similar issue. The way I fixed it was to configure state saving to client rather than server. For details check my blog http://consultingblogs.emc.com/jaddy/archive/2009/11/20/jsf2-in-google-app-engine.aspx Let me know if this fixes your problem. On Nov 12, 6:15 pm, Mirco Attocchi wrote:

[appengine-java] Re: Moderation enabled

2009-11-23 Thread Marco Ensing
Jason, Are you still able to process it within 24 hours. I send a post 2 days ago. Marco On Sep 29, 7:55 am, "Jason (Google)" wrote: > Due to the recent uptick in spam messages, I have enabled moderation > for new members -- this means that if you haven't posted here before, > your message may

[appengine-java] Re: Local server works, Appspot fails with java.lang.StackOverflowError when Spring AOP is enabled

2009-11-23 Thread laphroaig15
Was there any progress on this bug? -- 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-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+u

[appengine-java] Restricted Class

2009-11-23 Thread fractz
Hi, What's the deal with all these restricted classes? http://groups.google.com/group/google-appengine-java/search?group=google-appengine-java&q=restricted+class&qt_g=Search+this+group And can someone explain why we can't simply use a straightforward, simple, one-of-many-such Java Servlet impleme

[appengine-java] Discussion on will-it-play-in-app-engine

2009-11-23 Thread Lucas Cavalcanti
Hi, VRaptor3 (http://vraptor.caelum.com.br/en) also works on GAE, with few customizations that can be properly downloaded on google code: http://code.google.com/p/vraptor3/downloads/list (Blank project for google app engine). Add VRaptor 3 to this page, please. Thanks, Lucas -- You received th

Re: [appengine-java] A web service with security (java)

2009-11-23 Thread Yiming Li
Hi Andrey, I don't know the exact answer, but I am just curious whether this is feasible or easy to do, using a third party library, because we have to make sure that all the classes that the third party lib uses are on the white list of Google, also we how is the authentication user in

[appengine-java] Server Code for Chat Service / Matchmaking

2009-11-23 Thread Craig
Hi, I have some questions regarding the limits of server code in GAE. Can I write server code that isn't tied to an http request - i.e. a thread that would always be running on the server and which servlets could communicate with? From what I've read it isn't possible but I just wanted to confir

[appengine-java] Re: problem with using session.getAttribute()

2009-11-23 Thread Sanjay
Did you solve this problem? I am facing exactly same problem, it would be nice if you could share the solution if you found one. Thank you -- 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] Re: Can't send mail with attachment using JavaMail API

2009-11-23 Thread Don
Hi Ikai, I tried your example code, but I cannot attach an image on the email that I send. There is no conversion error either. Here is snippets of the code, please help.. //Retrieving image: URL url = new URL("http://stockcharts.com/c-sc/sc?s="; + ticker + "&p=DAILY&b=5&g=0&i=0&r=3528"); //

[appengine-java] Discussion on will-it-play-in-app-engine

2009-11-23 Thread Lucas Cavalcanti
Hi, VRaptor3 (http://vraptor.caelum.com.br/en) also works on GAE, with few customizations that can be properly downloaded on google code: http://code.google.com/p/vraptor3/downloads/list (Blank project for google app engine). Add VRaptor 3 to this page, please. Thanks, Lucas -- You received th

[appengine-java] Re: Local server works, Appspot fails with java.lang.StackOverflowError when Spring AOP is enabled

2009-11-23 Thread laphroaig15
I'm also experiencing Gabriel's topmost stacktrace while attempting to POC Drools. Like Kris, I cannot see far enough into the stacktrace to determine what drools API call is triggering the behavior. My app is heroict...@appspot.com. On Nov 4, 3:43 am, Kris wrote: > Hi Toby, > > I've just reali

[appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-23 Thread Nacho Coloma
Thanks! I searched a lot but didn't get to this thread. On Nov 23, 4:13 pm, leszek wrote: > Follow that thread: > > http://groups.google.co.uk/group/google-appengine-java/browse_frm/thr... -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java"

[appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-23 Thread leszek
Follow that thread: http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/8145f547cbaff99e/453847dda0217e71?q=#453847dda0217e71 -- 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 t

[appengine-java] Re: Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-23 Thread Nacho Coloma
To answer my own question, this has been my best shot this far: SecurityManager sm = System.getSecurityManager(); localDevelopmentEnvironment = sm == null || "com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager".equals(sm.getClass().getName()); If anyone has a better

[appengine-java] Is there a recommended way to differentiate between production and dev GAE environments?

2009-11-23 Thread Nacho Coloma
Hi all, I was considering options, but I first wanted to ask: is there a recommended way to differentiate between my local development environment and the real GAE server? This far, the only options I can think of are: * adding a -Dtest=true to my eclipse launcher * looking up for any test envir

[appengine-java] Re: ubuntu9.10 eclipse jee install Google Plugin for Eclipse error

2009-11-23 Thread ddawster zhang
On 11月3日, 上午3时17分, Jason Parekh wrote: > Hey DDawster, > > It looks like the Eclipse version included with Ubuntu 9.10 is Eclipse 3.5. > You will need to use the 3.5 update site, which > ishttp://dl.google.com/eclipse/plugin/3.5. > > jasonOn Sun, Nov 1, 2009 at 11:39 AM, ddawster zhang > wro

[appengine-java] Help:I can't make a object persistent completely.

2009-11-23 Thread Jolam
This is the object: ___ @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") public class Client implements java.io.Serializable { @Persistent private ArrayList serviceRecords; @Persistent private ArrayList servic