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

2009-10-26 Thread Joonas

Please correct entry for Vaadin: Vaadin 6.1 currently has full App
Engine support.
--~--~-~--~~~---~--~~
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] Please correct entry for Vaadin

2009-10-26 Thread Joonas

Vaadin 6.1 currently has full Google App Engine compatibility
--~--~-~--~~~---~--~~
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] SEVERE: Operation commit failed on resource:

2009-10-26 Thread stanlick

I am receiving this message on a seemingly random schedule.  Does
anyone else see this?

SEVERE: Operation commit failed on resource:
org.datanucleus.store.appengine.datastorexaresou...@50d55a0f, error
code UNKNOWN and transaction: [DataNucleus Transaction, ID=Xid=
--~--~-~--~~~---~--~~
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: Authentication - So close.... getCurrentUser() still null

2009-10-26 Thread Bourke Floyd IV

I figured out the a ACSID isn't being returned. However, this cookie
is

Set-Cookie =>
PREF=ID=a4afbd13fc512345:TM=1256612345:LM=1256612345:S=pcGWWyaOZHZA;
expires=Thu27-Oct-2011 02:10:20 GMT; path=/; domain=.google.com

So I tried using it, and still getCurrentUser() is null. I know my
Auth token is correct, and I know my url is well formed. I'm getting
back a 204 (no content) for the _ah_login request to get the cookie,
but with never with the ACSID cookie I've read about. Any help would
be much appreciated=/

resp.addHeader("Set-Cookie", cookieHeader);
resp.sendRedirect(destUrl);


On Oct 24, 6:35 pm, Bourke Floyd IV  wrote:
> This has been a pain from the beginning, but I'm so close I can smell
> it! First, I tried sending normal Authentication header to my app, but
> it was being striped off and not used. Then I found in documentation
> that I need to reference the Auth token I get from the ClientLogin for
> each of my service 
> requests...http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
> Didn't work, then I learned from this posthttp://dalelane.co.uk/blog/?p=894
> That I need to use that Auth token to get a JSESSION Cookie from
>
> String authKey = ... from ClientLogin ...
> String destUrl = "http://myappname.appspot.com/";;
> String cookieUrl = "http://myappname.appspot.com/_ah/login?continue=";
> + URLEncoder.encode(destUrl,"UTF-8") + "&auth=" + URLEncoder.encode
> (authKey,"UTF-8");
>
> resp.sendRedirect(cookieUrl);
>
> I deployed the app to make sure the UserService has all the info it
> needed. Everything is working now except that when the resp redirect
> returns with the new JSESSION Cookie and I use the getCurrentUser() it
> is still null...agg. Thanks in advance! I really would like to use
> google accounts, but it seems I'm almost being forced to build my
> own=/
--~--~-~--~~~---~--~~
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] Chat Time transcript for October 21, 2009

2009-10-26 Thread Jason (Google)

This past Wednesday, the App Engine team hosted the latest session of
its bimonthly IRC office hours. A transcript of the session and a
summary of the topics covered is provided below. The next session will
take place on Wednesday, November 4th from 7:00-8:00 p.m. PST in the
#appengine channel on irc.freenode.net.

Note that this will be the first Chat Time to occur after daylight
time in the U.S. ends, which means that it will be taking place one
hour earlier than usual in countries or states that don't observe
daylight savings time. Please be aware of this time difference so you
don't inadvertently miss the session.

- Jason


--SUMMARY---
- Q: Why am I seeing > 0.1% rate of datastore operations time out and
is anything being done to reduce this? A: A certain level of datastore
timeouts is expected (generally between 0.1% and 0.2% of all datastore
operations) but, we are actively working on ways to improve datastore
reliability. If you are seeing a much higher rate, be sure to inspect
your data model for write contention which often manifests as
datastore timeouts. [9:02-9:07]

- Q: What is the recommended approach to datastore capacity planning
ahead of a large bulk upload? A: Entities are stored as protocol
buffers (http://code.google.com/p/protobuf/) -- if you familiarize
yourself with the protobuf specification, you can determine the space
needed to store each entity, minus the datastore overhead, fairly
easily. An article is coming out soon which explains how entities and
indexes are stored in much more detail. [9:04-9:05]

- Q: Can a high level of read operations result in datastore
contention? A: Datastore contention is usually the result of too many
attempted concurrent writes to the same datastore entity or entity
group. Before implementing your data model, consider the expected read/
write access patterns and design your data model accordingly, sharding
entities that you expect to update more than once per second (http://
code.google.com/appengine/articles/scaling/contention.html). While
concurrent writes generally result in contention, concurrent reads
generally result in better performance due to caching. [9:08-9:09,
9:11-9:13, 9:18]

- Q: Are there any plans to support more file extensions for
attachments to outgoing email, e.g. .doc, .docx, etc.? A: There are no
immediate plans to support these extensions due to the prevalence of
viruses contained in files of these types. In the meantime, you can
include links to the files or share them via Google Docs. [9:14, 9:16,
9:19-9:20]

- Q: What is the recommended approach to paging large data sets in App
Engine? A: The offset approach is *not* recommended because it won't
work for result sets larger than 1,000. Until datastore cursors are
available, the recommended approaches are summarized in
http://code.google.com/appengine/articles/paging.html. [9:21-9:23]

- Q: How can one avoid exploding indexes when using list properties?
A: In general, you should avoid referencing more than one list
property in any query, especially if one or both list properties
contain a large number of elements. Index rows have to be added for
every permutation of values in the lists, which can result in index
"explosion". See the video at
http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore
to learn more about why exploding indexes occur. [9:22, 9:26,
9:28-9:30, 9:32-9:33, 9:40]

- Q: In Java, can one use sequence methods in JPA to get a sequence of
datastore IDs? A: No, you have to use the low-level datastore API's
allocateIds() method for now. [9:31, 9:33]

- If you're looking to use Google Web Toolkit (GWT) and App Engine
together, there are a number of combo samples available in
http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos
including gwtguestbook, sticky, and taskengine. [9:46, 9:48,
9:50-9:51]

- Q: What is being done to address long initialization times for Java
applications? A: We are definitely aware of the issue and are rolling
out several back-end enhancements over the next few releases to try to
minimize this startup time as much as possible. [9:52-9:53]


--FULL TRANSCRIPT---
[09:01am] scudder_google: Hi all, welcome to another instlallment of
our hour long chat time with people on the App Engine team
[09:01am] johnvdenley: Is there any kind of formality to this session?
or is it just a free for all?
[09:01am] moraes: take what you can!
[09:02am] moraes: meh.
[09:02am] Jason_Google_: johnvdenley: It's basically a free-for-all.
[09:02am] scudder_google: so far from Google we have nickjohnson,
Jason_Google and a few others may join as we go
[09:02am] scudder_google: yes, jump right in questions and comments
welcome
[09:02am] mbw: Is anything being done to reduce timeouts?  I am seeing
a lot more than .01% timeouts.  We even use a low level catch and
retry trick to try and reduce its effect.  We s

[appengine-java] Bug in JDO compiled/named query support

2009-10-26 Thread Larry Cable

I think I have found a bug in the datanucleus JDO named query code
(which I am happy to file a jira
report on if others agree)...

imagine the following:

@Queries { value = { @Query(name="foo" value="select from
FOO...") } )
public class Foo {
//...
}

at some point later in the code is uttered:

Query q = pm.newNamedQuery(Foo.class, "Foo");

now this should cause the query named "Foo" in the annotations above
to be "found" and prepared for later
execution...

such that:

q.execute(...)

would execute the named query ...

except it doesn't ... it throws:

org.datanucleus.query.expression.PrimaryExpressionIsVariableException ...

this is because the code in
org.datanucleus.jdo.JDOPersistenceManagerProxy reads:

public Query newNamedQuery(Class cls, String filter) {
return getPM().newQuery(cls, filter);
}

and should in fact read:

   return getPM().newNamedQuery(cls, name);

The error results in the name of the query being set as a filter on an
empty query, which is subsequently auto
populates, and sets the name of the query as a filter ... hence the
exception.

--~--~-~--~~~---~--~~
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] I'm getting a already connected exception when I setRequestMethod("GET") on my HttpURLConnection

2009-10-26 Thread Bourke Floyd IV

URL authUrl = new URL(url);
connection = (HttpURLConnection) authUrl.openConnection();
connection.setRequestMethod("GET"); //<- already connected exception.

The documentation indicates that I supposed to use openConnection,
then set my params, then use connect.

Inspecting the connection object in the debugger indicates that
connection is already connected before the setRequestMethod is called,
dispite the fact that I haven't called connect yet. Also, I'm not
calling any other functions. This is my code, not an example. This is
also inside of my HttpServlet doGet override


--~--~-~--~~~---~--~~
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: primary key portability

2009-10-26 Thread Jason (Google)
For very simple models (i.e. no relationships), you can use Long- and
String-based primary keys to maintain portability, but if you do want to use
relationships, at least one model will have to rely on the
com.google.appengine.api.datastore.Key class.

- Jason

On Thu, Oct 22, 2009 at 6:52 PM, Rusty Wright wrote:

>
> With Google App Engine you are invariably required to use the class
> com.google.appengine.api.datastore.Key for your primary key.
>
> I would like to be able to compare the behaviour of of DataNucleus JDO
> between an RDBMS (e.g., HSQL) and Google's Big Table data store.  But I
> can't see any nice way to do this without having to have duplicate
> model/domain objects, as well as duplicate DAOs, because of the primary key
> difference.
>
> Is anybody doing this, and if so, how are you handling it?
>
> >
>

--~--~-~--~~~---~--~~
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: Eclipse Plugin Update for App Engine SDK 1.2.7?

2009-10-26 Thread Jason (Google)
Yes, this is correct. Sorry for the confusion -- version 1.2.6 of both SDKs
were shipped simultaneously, but the Python SDK shipped with a few bugs and
a 1.2.7 update was expedited for it. The Java SDK is still technically at
1.2.6. The version number will be synchronized again with the next release.

- Jason

On Fri, Oct 23, 2009 at 6:36 PM, Vince Bonfanti  wrote:

>
> I think the 1.2.7 update is only for Python. The latest Java SDK is 1.2.6.
>
> On Fri, Oct 23, 2009 at 12:02 PM, hildenl  wrote:
> >
> > Has anyone been able to update to 1.2.7 from Eclipse?  I've got the
> > http://dl.google.com/eclipse/plugin/3.5 configured as a software site
> > and its enabled, but when I "Check for Updates", 1.2.7 never shows up
> > as an option and yet its been out since the 18th,
> >
>
> >
>

--~--~-~--~~~---~--~~
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: Error 500 - Loading data to memory during startup

2009-10-26 Thread Jason (Google)
We are working on enhancements that will hopefully reduce this
initialization time for cold instances, which should be rolled out with the
next couple of releases. There are several other threads on this, and we
definitely recognize the importance and appreciate your patience.

Regarding the first post, if your file is so large that it takes 80 seconds
to load it into the development server, I suggest re-structuring your
application to remove this dependency. Even with the planned enhancements,
it's unlikely that you'll be able to load such the complete file into main
memory without hitting the 30 second deadline or triggering an out-of-memory
exception.

- Jason

On Fri, Oct 23, 2009 at 6:06 PM, trung  wrote:

>
> Yeah,
> AppEngine drops your request after 30 seconds.
>
> My app takes 20 seconds to initialize in development, and half of the
> times it will finish loading within 30 seconds. Other times it goes
> pass 30 seconds and gets the same 500 error like yours.
>
> Google needs to make an exception for the initial cold boot timeout.
>
> On Oct 18, 1:57 pm, Joe Prasanna kumar  wrote:
> > Hi,
> > I am working with my friend to build an app (hoogentia.appspot.com)
> which
> > requires loading some learned model files to memory. I have a startup
> > servlet that does this (loading model files to memory). Since it needs
> more
> > mem, I run this app in dev mode with memory setting of -Xms1024m
> -Xmx2048m. I
> > dont have any issues in development but when i deploy it to app engine
> and
> > access my application, the startup servlet is invoked and it comes up
> with
> > an Error 500. I am not getting any useful info from the logs. I am
> assuming
> > the issue is with jvm settings for app engine in production. I looked at
> > this thread (
> http://groups.google.com/group/google-appengine-java/browse_thread/th...)
> > and modified appcfg.sh to
> > "java -Xmx2000m -cp "$SDK_LIB/appengine-tools-api.jar" \
> > com.google.appengine.tools.admin.AppCfg $* "
> >
> > After doing an update, I still get the 500 Error.
> > In dev mode, it takes like 80 seconds for the model to get loaded in
> memory.
> >
> > Any thoughts / help / suggestions greatly appreciated,
> > thanks
> > Joe.
> >
>

--~--~-~--~~~---~--~~
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: creating Word and Excel docs

2009-10-26 Thread Jason (Google)
I'm not familiar with the quotas for Google's Documents List API or your
planned access rate, so this is something you should confirm in the
Documents List API discussion group, but generally speaking, this does seem
like a reasonable strategy.

http://groups.google.com/group/google-documents-list-api

- Jason

On Fri, Oct 23, 2009 at 11:57 AM, Houston startup coder <
stephenh...@gmail.com> wrote:

>
> I accidentally posted this in the old general GAE group by mistake.  :
> (
>
> I need to allow my users to export into Word and Excel formats from my
> GAE app, and I know Apache POI is not supported.  So, I'm trying to
> figure out how to avoid running a server elsewhere whose sole purpose
> is generating Word and Excel documents based on data in my GAE
> datastore.
>
> Google Docs seems like a good fit, so would it work to use the API to
> create documents there from my App Engine code and then export the
> created docs and pull them for storage in my App Engine datastore so
> that my users can download them whenever I want?  Or do you foresee
> roadblocks to this, e.g. some sort of limit on the number of Google
> Docs my GAE app can create even if they're temporary files that are
> immediately deleted?
>
>
> >
>

--~--~-~--~~~---~--~~
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: SDK does not upload files that start with "."

2009-10-26 Thread Jason (Google)
Hi Vince. It may very well be intentional, but feel free to open a new bug
report -- it will be closed if it's confirmed to be "working as intended."

http://code.google.com/p/googleappengine/issues/list

- Jason

On Fri, Oct 23, 2009 at 11:12 AM, Vince Bonfanti wrote:

>
> The SDK (1.2.5) does not upload file with names that start with "."
> such as ".h2.server.properties". I assume this is because such files
> are considered hidden on Linux/UNIX; but, I'm running on Windows, so
> this must be something in the SDK itself and not caused by the file
> system.
>
> Is this intentional, or should I open a bug report?
>
> Vince
>
> >
>

--~--~-~--~~~---~--~~
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: UserService.isUserAdmin() returns false for domain administrator of certain domains

2009-10-26 Thread Jason (Google)
isUserAdmin returns true only if the current signed-in user is an
administrator of the application, not the domain. If you need to
programmatically determine Google Apps domain administrators, see the Google
Apps APIs:

http://code.google.com/apis/apps/

- Jason

On Fri, Oct 23, 2009 at 8:52 AM, dflorey  wrote:

>
> On some domains the UserService.isUserAdmin() is returning false for
> domain administrators.
> Which group/issue tracker is the right one to post this issue?
> >
>

--~--~-~--~~~---~--~~
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: Datastore retrieve error

2009-10-26 Thread Jason (Google)
Can you post the code you're using to persist the SyncConfiguration and
Account objects?

- Jason

On Fri, Oct 23, 2009 at 8:09 AM, Gerd Saurer  wrote:

>
> I have a object mapped to the Datastore that looks like:
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class SyncConfiguration {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Long id;
>
>@Persistent
>private Account account1;
>
>@Persistent
>private Account account2;
>
> ..
> }
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Account {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Key key;
>
>@Persistent
>private String email;
>
> .
> }
>
> if i am now loading the object back from the store with
>
> final SyncConfiguration syncConfig = pm.getObjectById
> (SyncConfiguration.class, action.getSyncConfigId());
>
> the fields account1 and account2 have the same instance.
>
> Do i have to configure something in a different way or is it a 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-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: 403 Forbidden You do not have permission to modify this app

2009-10-26 Thread Jason (Google)
2590177 is not a valid application ID. Was this the code you were sent when
you attempted to verify via SMS? If so, you should return to
http://appengine.google.com and enter this code there. Then you can register
a new application ID, which is the ID that you enter in appengine-web.xml.

- Jason

On Thu, Oct 22, 2009 at 8:46 PM, Amin  wrote:

>
> Guys,
> I am trying to develop a Google app engine test project as the
> tutorial.
> It runs well in local but when I want to deploy by the Eclipse Button
> " Deploy App Engine Project" After some operation it show the error.
>
> Here is my error log:
>
> !ENTRY com.google.appengine.eclipse.core 4 0 2009-10-23 12:45:21.812
> !MESSAGE Unable to update app: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=2590177&version=1&;
> 403 Forbidden
> You do not have permission to modify this app (app_id=u'2590177').
>
>
> See the deployment console for more details
> !STACK 0
> com.google.appengine.tools.admin.AdminException: Unable to update app:
> Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=2590177&version=1&;
> 403 Forbidden
> You do not have permission to modify this app (app_id=u'2590177').
>
>at com.google.appengine.tools.admin.AppAdminImpl.update
> (AppAdminImpl.java:62)
>at
> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
> (AppEngineBridgeImpl.java:271)
>at
> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
> (DeployProjectJob.java:148)
>at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
> (InternalWorkspaceJob.java:38)
>at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.io.IOException: Error posting to URL:
> http://appengine.google.com/api/appversion/create?app_id=2590177&version=1&;
> 403 Forbidden
> You do not have permission to modify this app (app_id=u'2590177').
>
>at com.google.appengine.tools.admin.ServerConnection.send
> (ServerConnection.java:143)
>at com.google.appengine.tools.admin.ServerConnection.post
> (ServerConnection.java:81)
>at com.google.appengine.tools.admin.AppVersionUpload.send
> (AppVersionUpload.java:427)
>at
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
> (AppVersionUpload.java:241)
>at com.google.appengine.tools.admin.AppVersionUpload.doUpload
> (AppVersionUpload.java:98)
>at com.google.appengine.tools.admin.AppAdminImpl.update
> (AppAdminImpl.java:56)
>... 4 more
>
> >
>

--~--~-~--~~~---~--~~
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: Authentication with Google Apps

2009-10-26 Thread Jason (Google)
sportrider: The information in Mansoor's post is spot-on -- when you
register a new application ID, you should see an option to restrict logins
to a particular Google Apps domain.

Roy: The TOS disallows registering multiple application IDs with the intent
of running them as a single application in order to avoid enabling billing,
but if you have to re-register an app ID in order to change the Google
Accounts restriction, that's acceptable. If you intend to do this for a
number of different domains, then you'll need to file a multi-instance
exception request.

http://code.google.com/support/bin/request.py?contact_type=AppEngineMultiInstanceExceptionRequest

- Jason

On Fri, Oct 23, 2009 at 6:14 AM, Roy Smith wrote:

> > For example I'd like my users to enter their u...@mycompany.com email
> > rather than someb...@gmail.com.  Is this possible?
>
> I have a GAE app defined as public which I can authenticate to using
> u...@mycompany.com. The rules for when this does and doesn't work seem ill
> defined.
>
> > then you need to
> > create a new application-id specifying which domain users can
> > authenticate on your application.
>
> Remember you need to get prior approval from Google before you create
> multiple duplicate applications
>
>
>
> On Fri, Oct 23, 2009 at 1:34 PM, Mansoor  wrote:
>
>>
>> At the time of creating an application-id on appengine, you have an
>> option to allow authentication only for users of a particular domain
>> or for all google account users. If you already have the application
>> setup for universal google account authentication, then you need to
>> create a new application-id specifying which domain users can
>> authenticate on your application.
>>
>> On Oct 22, 7:20 pm, sportrider  wrote:
>> > I am working to publish a site on App Engine and would like to
>> > authenticate users by using their Google Apps email rather than a
>> > gmail email.
>> >
>> > For example I'd like my users to enter their u...@mycompany.com email
>> > rather than someb...@gmail.com.  Is this possible?
>> >
>> > I've tried adding "mycompany.com" to the authDomain argument on
>> > userService.createLoginURL(), but this didn't seem to do anything.
>> >
>> > Many thanks,
>> > Chris
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: Custom subdomain map with app engine

2009-10-26 Thread Jason (Google)
Hi Marius. App Engine does not currently support "naked" domains.

http://code.google.com/p/googleappengine/issues/detail?id=777

In the meantime, you can set up a script to redirect all myid.com requests
to www.myid.com.

- Jason

On Fri, Oct 23, 2009 at 4:36 AM, marius  wrote:

>
> Hi,
>
> I have a domain "myid.com" mapped to google apps and I managed to
> configure my Java appengine to be served from "www.myid.com".
>
> I would also like to serve the same Java appengine from myid.com.
>
> How can this be accomplished? Is there a DNS record which would alias
> myid.com to www.myid.com? I would more than pleased to be able to
> configure a 301redirect from myid.com to www.myid.com but I am not
> sure how can I do this with myid.com being mapped to google apps.
>
> Please advise,
> Marius
>
> On Oct 14, 10:16 pm, "Jason (Google)"  wrote:
> > Please try not to double post in the future:
> http://groups.google.com/group/google-appengine-java/browse_thread/th...
> >
> > Thanks,
> > - Jason
> >
> >
> >
> > On Mon, Oct 12, 2009 at 10:33 AM, Haroon Idrees 
> wrote:
> > > I want to map google app application on subdomain but gets error
> > > I create cname on domain site which details is below
> > > site.haroonidrees.com IN CNAME ghs.google.com 3600s (1h)
> >
> > > and Server error is
> > > Sorry, you've reached a login page for a domain that isn't using
> > > Google Apps. Please check the web address and try again.
> >
> > > I search in group and found have to register my sub-domain in below
> > > link
> > >http://www.google.com/a/cpanel/domain/new
> >
> > > I register it ,but the process of verification found tricky,
> > > It need to add CName in domain sever with alias
> > > googled75ead2b4ef9e1d9 to poiting to google.com because of sub-domain
> > > I can add this is parent domian manager (May be wrong)
> > > and also add CNAME for desire sub domain which details available
> > > below
> >
> > > DNS server handling your query: localhost
> > >  DNS server's address:  127.0.0.1#53
> >
> > >  Non-authoritative answer:
> > >  site.haroonidrees.com  canonical name = ghs.google.com.
> > >  ghs.google.com canonical name = ghs.l.google.com.
> > >  Name:  ghs.l.google.com
> > >  Address: 74.125.47.121
> >
> > >  then try to add domain ,found that above error get fix but still my
> > > sub-domain is not working kindly guide me what I do
> >
> > > Please help ,May be I am missing some thing please points out if I
> > > miss any thing
> >
> > > Regards
> >
> > > --
> > > Regards
> > > Haroon Idrees
> > > Software Team Lead
> > > IBL Group
> > > cell:0321-2066747
> > > msn:haroon.idr...@hotmail.com  <
> msn%3aharoon.idr...@hotmail.com >
> > >http://www.linkedin.com/in/haroonob
> >
>

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Max Ross (Google)
I intend to support that for the next release, yes.

On Mon, Oct 26, 2009 at 1:03 PM, Prashant  wrote:

> what if i change the abstract class to a normal class? will it be
> supported??
>
>
> >
>

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
what if i change the abstract class to a normal class? will it be
supported??

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Max Ross (Google)
I'm expecting to have it in place by the next release, but anything related
to relationships has been a beast to implement so it's possible it won't be
done in time.

I will say that it's unlikely I'll be able to add support for the specific
example you've provided, where your parent has a reference to an abstract
base class.  This requires all sorts of additional work that is definitely
out of scope for the next release.

Max

On Mon, Oct 26, 2009 at 12:31 PM, Prashant  wrote:

> Thanks for your quick response !
>
> I really need to use this kind of relationship, i am expecting it to be
> supported in the upcoming version, will it be?
>
>
> >
>

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Thanks for your quick response !

I really need to use this kind of relationship, i am expecting it to be
supported in the upcoming version, will it be?

--~--~-~--~~~---~--~~
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: Key and KeyFactory - privacy concern related

2009-10-26 Thread Don Schwarz
I would suggest that rather than using " + "" as your
key names, you use F("" + "") where F is either an
encryption function or a one-way hash function.  You can use the javax.crypt
package for this purpose.

Alternatively, you could implement your own Key -> String conversion routine
in place of KeyFactory.keyToString() and implement the encryption at that
level.

On Mon, Oct 26, 2009 at 2:10 PM, victor  wrote:

>
> I use the com.google.appengine.api.datastore.Key as primary keys to my
> datastore and part of the Key generation strategy is to use an e-mail:
> Key ret = KeyFactory.createKey( + )
>
> This generated key is then exposed to the browser via
> KeyFactory.keyToString.
>
> My concern is more on the privacy side. This serialized key could
> easily be converted back to its original form by somebody cut and
> pasting this key and running the following in their local machine:
> Key ret = KeyFactory.stringToKey( browser>)
>
> --thus exposing the e-mail from the key.
>
> My question is, is there a way for Google App Engine to make the
> "KeyFactory.stringToKey" only work to return the proper key if it is
> executed from the app where the data store is running from?
>
> Thanks again,
> >
>

--~--~-~--~~~---~--~~
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] Key and KeyFactory - privacy concern related

2009-10-26 Thread victor

I use the com.google.appengine.api.datastore.Key as primary keys to my
datastore and part of the Key generation strategy is to use an e-mail:
Key ret = KeyFactory.createKey( + )

This generated key is then exposed to the browser via
KeyFactory.keyToString.

My concern is more on the privacy side. This serialized key could
easily be converted back to its original form by somebody cut and
pasting this key and running the following in their local machine:
Key ret = KeyFactory.stringToKey()

--thus exposing the e-mail from the key.

My question is, is there a way for Google App Engine to make the
"KeyFactory.stringToKey" only work to return the proper key if it is
executed from the app where the data store is running from?

Thanks again,
--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Max Ross (Google)
Hi Prashant, thanks for trying out the preview release!

It looks like you're trying to persist a relationship, and as I pointed out
in the note announcing the availability of this release, only simple types
and embedded types are currently supported, not relationship.  So, I'm not
surprised to hear you're seeing this behavior.  It was not my intention to
give anyone the impression that what you are trying to do should work, so if
I gave you that impression I apologize.

Max
On Mon, Oct 26, 2009 at 2:18 AM, Prashant  wrote:

> Update: i test it on production server, child objects are not even getting
> saved !
>
>
> >
>

--~--~-~--~~~---~--~~
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: Incoming Email Service

2009-10-26 Thread Prashant
it works ! thanks !!

--~--~-~--~~~---~--~~
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: using contains(Key) in JDO query

2009-10-26 Thread king

Hi there, can anyone from Google shines some light on the issue I
posted last week?  I just need to find out if it is a major limitation
on google's part with no workaround so that I can move forward
accordingly. Thanks a lot.

On Oct 23, 11:01 am, king  wrote:
> Thanks so much for the feedback.  I actually tried to extend the Key
> CONTAINS concept to other fields but ran into a big wall right away.
> It would be great to get your 2 cents.  Here is the root of my
> problem:
>
> I have a student object, it has a number of qualifying attributes, for
> example:
> int gpa: 1 = 0 to 2.0, 2 = 2.0 to 3.0, 3 = 3.0 to 4.0
> int ageGroup: 1 = 0 to 17, 2 = 18 to 30, 3 = 30 to 65, 4 = 65+
> ArrayList schoolPreference: [0] = 'MIT', [1] = 'Stanford', [2] =
> 'Harvard', [3] = 'Yale'
>
> Now, I need to create a query to find out all the students where (gpa
> = 2 or gpa = 3) AND (age group = 3 or age group = 4) AND
> (schoolPreference contains MIT or Yale, or both)
>
> As far as I know, GAE doesn't support OR operator in a query, so the
> only way I can get the query above to work is to have multiple sub-
> queries and do a manual join on all the datastore resultsets to
> artificially create a union. If so, big problem arises:
>
> Since I have so many OR sub-conditions, if every OR translates into a
> separate sub-query, literally speaking, I need to do a full
> permutation of all the conditions (full product of all the OR and AND
> conditions)  in all my sub-queries to achieve my goal, which doesn't
> make any sense if I keep adding more value types (such as more schools
> being selected in the student preference criteria) into my attributes,
> not to mention adding more attributes to my student object.  Is there
> any way to accomplish this query in GAE?  Your help is greatly
> appreciated because this can be the deal breaker of whether my whole
> project can migrate to GAE or not.  Thanks a lot in advance.
>
> On Oct 23, 1:51 am, Yasuo Higa  wrote:
>
>
>
> > Hi Andy,
>
> > >> query.setFilter("key == :keyList");
> > >> List list = (List) query.execute(keyList);
>
> > > I'd like to know if that works with GAE/J, because it is illegal JDOQL
> > > syntax and would be a bug. JDOQL is supposed to follow Java syntax,
> > > and you simply cannot do
> > > Key == List
> > > and get success in Java.
>
> > You are right, but unfortunately the above query works on GAE/J.
>
> > I should have recommended the following query:
>
> > List keys = ...;
> > List ids = new ArrayList();
> > for (Key key : keys) {
> >     ids.add(pm.newObjectIdInstance(Master.class, key));}
>
> > List list = (List) pm.getObjectsById(ids);
>
> > Thanks,
>
> > Yasuo Higa
--~--~-~--~~~---~--~~
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: POLYMORPHISM: Failing to retrieve child-objects in a one-to-many JDO relationship

2009-10-26 Thread Max Ross (Google)
Polymorphism is broken and the issue to fix it has more stars than any other
persistence issue.  You can see the list here:
http://code.google.com/p/datanucleus-appengine/issues/list?can=2&q=&sort=-stars&colspec=ID%20Stars%20Type%20Status%20Priority%20FoundIn%20TargetRelease%20Owner%20Summary

I'm working on getting this fixed for the next SDK release.

On Mon, Oct 26, 2009 at 6:33 AM, Patrizio Munzi wrote:

>  Hey guys,
>
> no feedback on this??
>
> BR
> Patrizio
>
>
> Patrizio Munzi wrote:
>
> Hi Jason and Max,
>
> I was making some tests on this today and I've found out that one-to-many
> relationship child objects retrieving works as long as the one-to-many
> relationship doesn't involve polymorphisms.
> For example, if we make the Child class abstract and save subclasses into
> the list the retrieving fails.
>
> In the following the snippet that fails.
> Is this a bug?
> Am I doing something wrong??
>
> Thanks
>
> ---
> String parentId = "test";
> PersistenceManager pm = PMF.get().getPersistenceManager();
> pm.currentTransaction().begin();
> Parent parent = new Parent();
> Child subChild = new SubChild();
> subChild.setParentId(parentId);
> parent.getChilds().add(subChild);
> pm.makePersistent(parent);
> pm.currentTransaction().commit();
> pm.close();
>
> pm = PMF.get().getPersistenceManager();
> parent = pm.getObjectById(Parent.class, parentId);
> assertEquals(1, parent.getModules().size());
> pm.close();
> ---
> ---
> public abstract class Child implements Serializable {
>
> private static final long serialVersionUID = -5125563546796512541L;
>
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> @Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
> protected String encodedKey;
>
> @Persistent
> @Extension(vendorName="datanucleus", key="gae.pk-name", value="true")
> protected String parentId;
>
> [...]
> }
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION,
> detachable="true")
> public class SubChild extends Child {
>
> private static final long serialVersionUID = 521265701642620882L;
>
> @Persistent(defaultFetchGroup="true")
> private String name;
>
> }
> --
>
> Jason (Google) wrote:
>
> Max is right, although there's a small issue with the syntax:
>
> @Persistent(mappedBy="parent", defaultFetchGroup = "true")
> public List childs;
>
>  - Jason
>
>  On Mon, Oct 19, 2009 at 10:26 PM, Max Zhu  wrote:
>
>> Hi Lars,
>>
>> Try to annotate your relationship as follows:
>>
>>@Persistent(mappedBy="parent", default-fetch-group="true")
>>public List childs;
>>
>>
>> On Tue, Oct 20, 2009 at 12:19 AM, Lars  wrote:
>>
>>>
>>> Hi,
>>> I am failing to retrieve child-objects in a one-to-many JDO relation
>>> in the datastore. The case is as follows;
>>>
>>> I have two classes (Parent & Child, code-snippet below) with a defined
>>> one-to-many relation.
>>> It is no problem storing the structure with the 'store'-operation
>>> defined below. This is easily verified by web-browsing the datastore.
>>>
>>> However, when retrievning the parent-object from the datastore
>>> ('fetchParents'), the ''childs' attribute is always null. What must be
>>> done to (auto-)populate this attribute from the datastore?
>>> Also, the 'parent'-attribute of the Child-objects will also be null if
>>> they are fetched in a similar way.
>>>
>>> All clues appreciated...
>>>
>>> Lars
>>>
>>> - - - - - - - Code samples below - - - - - -
>>>
>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>> public class ParentDTO  {
>>>@PrimaryKey
>>>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>>@Extension(vendorName="datanucleus", key="gae.encoded-pk",
>>> value="true")
>>>private String encodedKey;
>>>
>>>@Persistent
>>>public String name;
>>>
>>>@Persistent(mappedBy="parent")
>>>public List childs;
>>>
>>>public ParentDTO()
>>>{
>>>
>>>}
>>>
>>>public void add(Child c)
>>>{
>>>if (childs == null)
>>>childs = new ArrayList();
>>>kids.add(c);
>>>}
>>> }
>>>
>>>  - - - -
>>>
>>> @PersistenceCapable(identityType = IdentityType.APPLICATION)
>>> public class Child {
>>>@PrimaryKey
>>>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>>>@Extension(vendorName="datanucleus", key="gae.encoded-pk",
>>> value="true")
>>>public String encodedKey;
>>>@Persistent
>>>public String name;
>>>
>>>@Persistent
>>>public Parent parent;
>>>
>>>public Child()
>>>{
>>>}
>>>
>>>public String getEncodedKey() {
>>>return encodedKey;
>>>}
>>> }
>>>
>>> - - -

[appengine-java] Re: I can't see my Google App Engine application

2009-10-26 Thread Kyle Roche
Are you using Google Apps?

kyleRoche |  Appirio
GoogleVoice: 303/800.2959
Blog: techblog.appirio.com | Twitter: twitter.com/kylemroche


On Mon, Oct 26, 2009 at 10:57 AM, Don Schwarz  wrote:

> Clear your cookies and then try logging in at:
>
> https://appengine.google.com/a/mangnhen.com
>
>
> On Sun, Oct 25, 2009 at 12:10 PM, a...@mangnhen.com  wrote:
>
>>
>> I add and add, and add application, if i add application now, i have
>> "Cannot create any more apps." , but i don't see any one my
>> application on "https://appengine.google.com/start";
>> my login: a...@mangnhen.com
>> Please help
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: I can't see my Google App Engine application

2009-10-26 Thread Don Schwarz
Clear your cookies and then try logging in at:

https://appengine.google.com/a/mangnhen.com

On Sun, Oct 25, 2009 at 12:10 PM, a...@mangnhen.com  wrote:

>
> I add and add, and add application, if i add application now, i have
> "Cannot create any more apps." , but i don't see any one my
> application on "https://appengine.google.com/start";
> my login: a...@mangnhen.com
> Please help
>
> >
>

--~--~-~--~~~---~--~~
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] I can't see my Google App Engine application

2009-10-26 Thread a...@mangnhen.com

I add and add, and add application, if i add application now, i have
"Cannot create any more apps." , but i don't see any one my
application on "https://appengine.google.com/start";
my login: a...@mangnhen.com
Please help

--~--~-~--~~~---~--~~
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: Incoming Email Service

2009-10-26 Thread m seleron

Hi
message can parse it by either method or both

Sorry
It doesn't examine it in detail.


MimeMessage mimeMessage = new MimeMessage(session, req.getInputStream
());

-

DataHandler dataHandler = mimeMessage.getDataHandler();
DataSource dataSource = dataHandler.getDataSource();
MimeMultipart mimeMultipart = new MimeMultipart(dataSource);

or

InputStream inputStream = (InputStream)mimeMessage.getContent();
String ContentType = mimeMessage.getContentType();
ByteArrayDataSource byteArrayDataSource = new ByteArrayDataSource
(inputStream,ContentType);
Multipart mimeMultipart = new MimeMultipart(byteArrayDataSource);

-

  //message parse

  Part part1 = mimeMultipart.getBodyPart(0);
  part1.getContentType();
  
  Part part2 = mimeMultipart.getBodyPart(1);
  part2.getContentType();
  


Try that please

--~--~-~--~~~---~--~~
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: Incoming Email Service

2009-10-26 Thread m seleron

Hi
It is likely to parse message

Sorry
It doesn't examine it in detail.


mimeMessage = new MimeMessage(session, req.getInputStream());

-

DataHandler dataHandler = mimeMessage.getDataHandler();
DataSource dataSource = dataHandler.getDataSource();
MimeMultipart mimeMultipart = new MimeMultipart(dataSource);

or

InputStream inputStream = (InputStream)mimeMessage.getContent();
String ContentType = mimeMessage.getContentType();
ByteArrayDataSource byteArrayDataSource = new ByteArrayDataSource
(inputStream,ContentType);
Multipart mimeMultipart = new MimeMultipart(byteArrayDataSource);

-

  //message parse

  Part part1 = wkMulti.getBodyPart(0);
  part1.getContentType();
  
  Part part2 = wkMulti.getBodyPart(1);
  part2.getContentType();
  


Try that please

--~--~-~--~~~---~--~~
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] Discussion on will-it-play-in-app-engine

2009-10-26 Thread Pedro Matiello

VRaptor3 is also compatible if you add a few classes and a different
dependency selection. A preconfigured package is available at
http://code.google.com/p/vraptor3/downloads/list (vraptor-blank-
project-gae).

VRaptor3 website: http://vraptor.caelum.com.br/

--~--~-~--~~~---~--~~
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] 401 Unauthorized on deploy since yesterday

2009-10-26 Thread Henri

Hi,

Deployment to app engine stopped working for me suddenly yesterday. I
can login to my account and app engine console and have not changed
any settings or passwords. It was working fine two days ago.

This message: 
http://groups.google.com/group/google-appengine-java/msg/4312f467417f6792

implies that the error has something to do with date settings. My
country (Finland) switched out of daylight savings time yesterday,
could this cause the problem somehow?

Whatever the cause, how do I resolve it?

Eclipse console log:

Creating staging directory
Scanning for jsp files.
Scanning files on local disk.
Initiating update.
java.io.IOException: Error posting to URL:
http://appengine.google.com/api/appversion/create?app_id=&version=&
401 Unauthorized
Must authenticate first.

--~--~-~--~~~---~--~~
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] java.lang.NoClassDefFoundError: com/google/appengine/api/xmpp/JID

2009-10-26 Thread lallafa

I wrote a test servlet "SendServlet" that sends invitations and
messages.

Calling the servlet works fine with with the runtime. It also worked
when it was uploaded to app engine the first time. But after uploading
new versions the following exception is thrown:

java.lang.NoClassDefFoundError: com/google/appengine/api/xmpp/JID
at plapperbot.SendServlet.doPost(SendServlet.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1093)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:360)
at org.mortbay.jetty.security.SecurityHandler.handle
(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle
(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle
(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
(AppVersionHandlerMap.java:238)
at org.mortbay.jetty.handler.HandlerWrapper.handle
(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
(HttpConnection.java:830)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
(JettyServletEngineAdapter.java:139)
at com.google.apphosting.runtime.JavaRuntime.handleRequest
(JavaRuntime.java:239)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5135)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5133)
at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
363)
at com.google.net.rpc.impl.Server$2.run(Server.java:814)
at com.google.tracing.LocalTraceSpanRunnable.run
(LocalTraceSpanRunnable.java:56)
at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at com.google.net.rpc.impl.ServerConnection.messageReceived
(ServerConnection.java:437)
at com.google.net.rpc.impl.RpcConnection.parseMessages
(RpcConnection.java:319)
at com.google.net.rpc.impl.RpcConnection.dataReceived
(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
436)
at com.google.net.async.EventDispatcher.processNetworkEvents
(EventDispatcher.java:762)
at com.google.net.async.EventDispatcher.internalLoop
(EventDispatcher.java:207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
101)
at com.google.net.rpc.RpcService.runUntilServerShutdown
(RpcService.java:251)
at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
(JavaRuntime.java:396)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
com.google.appengine.api.xmpp.JID
at com.google.appengine.runtime.Request.process-f96f6f9cd332072e
(Request.java)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 42 more


--~--~-~--~~~---~--~~
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] pack of GAE and GWT to Ubuntu

2009-10-26 Thread Bugs_Bunny

Hello there,
I would like to know if is possible some developer pack GAE SDK  and
GWT to eclipse as a .deb and send it to Ubuntu developers of eclipse.
Maybe create a launchpad project to keep these packages update..
I know there is a repository to add in eclipse (in the option "update
and install software") that allow who want install GAE and GWT in
eclipse, but could be nice have GAE and GWT plug-ins to eclipse from
apt-get and that install yourself in eclipse (when that is also
installed from apt-get).
I don't know if the license of GAE SDK and GWT allow that.

I apologize for any silly question.

--~--~-~--~~~---~--~~
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] Apple Guice: A demo of App Engine, GWT, MVP, Guice, GIN

2009-10-26 Thread Stuart Moffatt

All,

Apple Guice is a demo App Engine application using GWT with MVP (via
gwt-dispath and gwt-presener), dependency injection (GIN on the
client, Guice on the server), and a sharded counter to track the
number of visitors.

Demo is available at: http://appleguice.latest.emcode-dev.appspot.com/

Source is available at: http://appleguice.googlecode.com/

Stuart

P.S. Pardon my cross-posting on: gwt, appengine for java, gwt-dispatch
and gwt-presenter
--~--~-~--~~~---~--~~
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: GAE Performance

2009-10-26 Thread Diana Cruise

Relating to entity groups, how can we determine what entity group each
entity belongs to?  Using the Data Viewer, I would think we could
examine this type of setup info for each entity but I have NOT found
how to do that.  Thanks!

On Oct 23, 1:50 pm, "Jason (Google)"  wrote:
> Hi Diana. As others have stated, App Engine can write to multiple entity
> groups in parallel, so if each User entity is a root entity or is otherwise
> placed in a different entity group, then there shouldn't be any issues.
> Regarding performance, all apps should generally be able to handle up to 30
> simultaneous dynamic requests assuming a 75ms processing time for each
> (average load), for a throughput of 400 qps or so:
>
> http://code.google.com/appengine/docs/java/runtime.html#Quotas_and_Li...
>
> If you want any other performance or cost-related numbers, let me know.
>
> For updates to the same entity or entity group, App Engine uses optimistic
> concurrency as opposed to locking. If an entity is already being updated,
> then the second request will fail and will automatically get retried on the
> server. After consistent failures, an exception will be thrown which you can
> catch to either handle gracefully. Datastore writes will fail from time to
> time, generally about 0.1 to 0.2 percent of the time, but the failure rate
> will be higher when there is contention, i.e. a high rate of simultaneous
> writes to the same entity/entity group.
>
> http://code.google.com/appengine/articles/scaling/contention.html
>
> - Jason
>
> On Thu, Oct 22, 2009 at 8:04 AM, Diana Cruise wrote:
>
>
>
>
>
> > I'm glad to hear that the 1-10 requests/second is per User root
> > entity...in my case this means that huge number of Users logged in
> > around the world should expect sub-second response even if tens of
> > thousands clicked the Update button at the same instance in time!
>
> > The only problem is we do NOT hear from anyone outside of Google to
> > confirm performance of large volume for specific applications and what
> > the real costs are!!!
>
> > Regarding deadlock, I hear GAE does NOT both with lock timeouts so as
> > soon as a transaction trys to retrieve a record that is already
> > locked, it will receive an error and have to retry.
>
> > On Oct 19, 5:50 pm, "Dr. Flufenstein" 
> > wrote:
> > > Preface: Please note, I'm not speaking for google at all in this note
> > > and a lot of what I've written is speculation based on what I've read
> > > in various GAE docs as well as some meager knowledge of how relational
> > > DBs generally work.  And yes, I know datastore isn't a relational DB,
> > > but I believe that their indexing implementation likely runs into many
> > > of the same problems you have with indexing relational data although
> > > that assumption could be completely wrong.
>
> > > From what I can tell, the update bottleneck you're referring to is for
> > > updating what you would often think of as a single record if you were
> > > persisting one instance of your User as a single denormalized record
> > > in a relational schema.  I suspect this bottleneck is due to the
> > > datastore architecture and the way that data updates are accumulated
> > > (possibly grouped/keyed by PK) in a queue, which is probably read from
> > > like a cache if read requests come in before the data has been flushed
> > > into the actual storage medium and replicated to the other
> > > datacenters.
>
> > > So if each of your users were updating their own User records, I don't
> > > believe you'd experience that limitation which may be an artifact of
> > > how those in-memory queue/cache structures are managed/locked during
> > > updates (i.e. a new update for a record may be held until it's been
> > > flushed from the queue to the storage medium to prevent having to
> > > merge/reconcile records in the queue).  If they were all updating a
> > > single shared record, then I think you'd hit this pretty quick.
>
> > > Let's say though that your users are updating separate records...as
> > > your data size grows, you will probably see your update throughput
> > > decrease as other factors become dominant, and I believe this will
> > > primarily be dependent on the number and composition of the indexes on
> > > your data as well as the number of entities persisted.  To me, this is
> > > the much riskier unknown because your average index structure is
> > > harder to update piecewise in parallel because the index must allow
> > > you to order/search all of the records' indexed columns.  In an RDBMS
> > > like SQL Server or Oracle, you'd see some level of index locking take
> > > place during each transaction (maybe one page of an index) to allow
> > > concurrent updates to different sections of an index before the
> > > updates are committed, the transaction is ended and the locks are
> > > released.
>
> > > In relational persistence systems, this gets slower as the indexes
> > > become larger and is usually overcome with a technique like
> > > pa

[appengine-java] Re: Spring MVC + Sitemesh problem

2009-10-26 Thread xueqiang.mi

I deploy a simple site by using Spring MVC and Sitemesh on the-
focus.appspot.com
it really works well now, but I spent much time to deploy and debug it
before it goes well.

On Oct 25, 7:03 pm, Shponter  wrote:
> Works fine for me too (even with Sitemesh 3).
> It took some time and I don't exactly know where the problem was...
> I have copied files from the example sitemesh app and evertythig works
> fine now.
--~--~-~--~~~---~--~~
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: Retrieving the number of entities into the DS

2009-10-26 Thread Patrizio Munzi




Hi,

I thought of only keys queries but since I've got to use encoded keys I
don't know if they work.

However, I'll try it!

thanks

Yasuo Higa wrote:

  Hi Patrizio,
  
  
what's the best way to know the number of entities of a specific kind
saved into the DS?
Of course I'd like to know the optimized way, without retrieving all the
objects.


  
  If you have less than or equal to 1000 entities for a specific kind,
the following codes are efficient.

Low level API:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
int count = ds.prepare(new Queue("your kind").setKeysOnly()).countEntities();

JDO:
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Xxx.class);
query.setResult("count(this)");
int count = (Integer) query.exeucte();

If you have more than 1000 entities for a specific kind,
the following codes are efficient.

Low level API:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
int count = ds.prepare(new Query("your kind").setKeysOnly())
.asList(FetchOptions.Builder.withOffset(0)).size();

JDO:
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Xxx.class);
query.setResult("key");// "key" is a name of primary key field
int count = ((List) query.exeucte()).size();

Hope this helps,

Yasuo higa



  


-- 

Patrizio Munzi
Product Specialist
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: patrizio.mu...@eris4.com
web: http://www.eris4.com
skype: eris4_munzi



--~--~-~--~~~---~--~~
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: Retrieving the number of entities into the DS

2009-10-26 Thread Yasuo Higa

Hi Patrizio,
>
> what's the best way to know the number of entities of a specific kind
> saved into the DS?
> Of course I'd like to know the optimized way, without retrieving all the
> objects.
>
If you have less than or equal to 1000 entities for a specific kind,
the following codes are efficient.

Low level API:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
int count = ds.prepare(new Queue("your kind").setKeysOnly()).countEntities();

JDO:
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Xxx.class);
query.setResult("count(this)");
int count = (Integer) query.exeucte();

If you have more than 1000 entities for a specific kind,
the following codes are efficient.

Low level API:
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
int count = ds.prepare(new Query("your kind").setKeysOnly())
.asList(FetchOptions.Builder.withOffset(0)).size();

JDO:
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Xxx.class);
query.setResult("key");// "key" is a name of primary key field
int count = ((List) query.exeucte()).size();

Hope this helps,

Yasuo higa

--~--~-~--~~~---~--~~
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] Retrieving the number of entities into the DS

2009-10-26 Thread Patrizio Munzi

Hi all,

what's the best way to know the number of entities of a specific kind 
saved into the DS?
Of course I'd like to know the optimized way, without retrieving all the 
objects.

Thanks

--~--~-~--~~~---~--~~
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: POLYMORPHISM: Failing to retrieve child-objects in a one-to-many JDO relationship

2009-10-26 Thread Patrizio Munzi




Hey guys,

no feedback on this??

BR
    Patrizio

Patrizio Munzi wrote:

  
Hi Jason and Max,
  
I was making some tests on this today and I've found out that
one-to-many relationship child objects retrieving works as long as the
one-to-many relationship doesn't involve polymorphisms.
For example, if we make the Child class abstract and save subclasses
into the list the retrieving fails.
  
In the following the snippet that fails.
Is this a bug?
Am I doing something wrong??
  
Thanks
  
  ---
        String parentId = "test";
        PersistenceManager pm = PMF.get().getPersistenceManager();
        pm.currentTransaction().begin();
        Parent parent = new Parent();
        Child subChild = new SubChild();
        subChild.setParentId(parentId);
        parent.getChilds().add(subChild);
        pm.makePersistent(parent);
        pm.currentTransaction().commit();
        pm.close();
  
        pm = PMF.get().getPersistenceManager();
        parent = pm.getObjectById(Parent.class, parentId);
        assertEquals(1, parent.getModules().size());
        pm.close();
---
---
public abstract class Child implements Serializable {
  
    private static final long serialVersionUID = -5125563546796512541L;
  
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
    protected String encodedKey;
  
    @Persistent
    @Extension(vendorName="datanucleus", key="gae.pk-name",
value="true")
    protected String parentId;
  
    [...]
}
  
@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable="true")
public class SubChild extends Child {
  
    private static final long serialVersionUID = 521265701642620882L;
  
    @Persistent(defaultFetchGroup="true")
    private String name;
  
}
--
  
Jason (Google) wrote:
  Max is right, although there's a small issue with the
syntax:

@Persistent(mappedBy="parent", defaultFetchGroup = "true")
public List childs;


- Jason


On Mon, Oct 19, 2009 at 10:26 PM, Max Zhu 
wrote:
Hi
Lars, 
  
Try to annotate your relationship as follows:
  
       @Persistent(mappedBy="parent", default-fetch-group="true")
       public List childs;
  
  
  
  On Tue, Oct 20, 2009 at 12:19 AM, Lars  wrote:
  

Hi,
I am failing to retrieve child-objects in a one-to-many JDO relation
in the datastore. The case is as follows;

I have two classes (Parent & Child, code-snippet below) with a
defined
one-to-many relation.
It is no problem storing the structure with the 'store'-operation
defined below. This is easily verified by web-browsing the datastore.

However, when retrievning the parent-object from the datastore
('fetchParents'), the ''childs' attribute is always null. What must be
done to (auto-)populate this attribute from the datastore?
Also, the 'parent'-attribute of the Child-objects will also be null if
they are fetched in a similar way.

All clues appreciated...

Lars

- - - - - - - Code samples below - - - - - -

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ParentDTO  {
       @PrimaryKey
       @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   @Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
       private String encodedKey;

       @Persistent
       public String name;

       @Persistent(mappedBy="parent")
       public List childs;

       public ParentDTO()
       {

       }

       public void add(Child c)
       {
               if (childs == null)
                       childs = new ArrayList();
               kids.add(c);
       }
}

 - - - -

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Child {
       @PrimaryKey
       @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   @Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
       public String encodedKey;
       @Persistent
       public String name;

       @Persistent
       public Parent parent;

       public Child()
       {
       }

       public String getEncodedKey() {
               return encodedKey;
       }
}

- - - - -

Storing to datastore (works perfectly)

               public void store()
               {
                       Parent p = new Parent();
                       p.navn = "nils";

                       Child c = new Child();
                       c.name = "jim";
                       p.add(c);

                       c = new ChildDTO();
                       c.name = "anne";
                       p.add(c);

                       PersistenceManager pm =
PMF.get().getPersistenceManager();
            

[appengine-java] Re: JDO/JPA Snippets That Work - Optimistic Locking With @Version

2009-10-26 Thread Patrizio Munzi




Max,

no feedback on this??

BR,
    Patrizio

Patrizio Munzi wrote:

  
Hi Max,
  
I've just read your new post and I've got two questions.
1) should we discuss your new posts in this mailing list or in the blog?
  
Since you haven't answer my first question yet, :-P, I'm going to ask
my second question in both ways.
  
2) Before your new post the only way I knew for transaction isolation
was using the JDOCanRetryException (or at least we'll use it as soon as
the bug fix about it will be released), now we've got also this
JDOOptimisticVerificationException. Now, I can imagine the difference
between them but I'd like to know what's the best way to deal with both
of them. I mean, should we use both of them? Using the
JDOCanRetryException mechanism shouldn't be need of the
JDOOptimisticVerificationException.
  
We'd be very grateful if you could clarify this out.
  
Thanks
  
Max Ross wrote:
  http://gae-java-persistence.blogspot.com/2009/10/optimistic-locking-with-version.html


  
  
  -- 
  
  Patrizio Munzi
Product Specialist
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: patrizio.mu...@eris4.com
web: http://www.eris4.com
skype: eris4_munzi
  
  
  
  


-- 

Patrizio Munzi
Product Specialist
Viale Bruno Buozzi, 19 - 00197 Roma (Italy)
tel: +39 06 4543 3540
fax: +39 06 4543 3587
mobile: +39 393 7195 164
mail: patrizio.mu...@eris4.com
web: http://www.eris4.com
skype: eris4_munzi



--~--~-~--~~~---~--~~
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: Performance difference between local dev server and App Engine

2009-10-26 Thread Dominik Steiner

Hi leszek,

when you say that first the data is kept in memory and from time to
time persisted to disk, is there a way to trigger that the local
development server should save it to disk immediately?

The problem is that we are using a GAE app only locally (no internet
access) and have sometimes seen strange save issue, where adding new
data supposedly has work and on the next start it is not there
anymore. (so that's why I guess that your explanantion could be the
reason for that - but I would say that this only happened 10% of the
time)

Thanks for any help in advance.

Dominik

On Oct 26, 4:26 am, leszek  wrote:
> The development server contains local implementation of low-level
> datastore operations. It is something kept in memory and from time to
> time persisted to disk. In production environment (app engine) the low-
> level engine is Google's Big Table. So you cannot compare performance
> between local and production environment - the underlying technology
> is completely different.
> The development server is only to make your solution running - to
> optimize and orchestrate it you need the app engine (production)
> environment. So I think that finding bottlenecks in your application
> and some refactoring is necessary if current efficiency is not enough.
--~--~-~--~~~---~--~~
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: SimpleDS: an alternative for Datastore persistence

2009-10-26 Thread Nacho Coloma
>
> I will try to do so during 1-2 weeks and give you some input. I hope
> that you plan to keep your project alive.
>

We are using it on a daily basis :)

I have the intention to make small additions for the typical AppEngine daily
stuff (sharding and multiple index), but we still have to give it definitive
shape. Also, keep in mind that I am not sure if we will ever include "IN"
and "!=" operators. Other than that, you should be fine.

Regards,

Nacho.

--~--~-~--~~~---~--~~
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] I have deleted all indexes but can not add any new ones?

2009-10-26 Thread Chris

Hi,

I have removed all indexes for an app but now when I come to add a new
one it says I am over ym quota.  What can I do to resolve this?

Thanks
--~--~-~--~~~---~--~~
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: Performance difference between local dev server and App Engine

2009-10-26 Thread leszek

The development server contains local implementation of low-level
datastore operations. It is something kept in memory and from time to
time persisted to disk. In production environment (app engine) the low-
level engine is Google's Big Table. So you cannot compare performance
between local and production environment - the underlying technology
is completely different.
The development server is only to make your solution running - to
optimize and orchestrate it you need the app engine (production)
environment. So I think that finding bottlenecks in your application
and some refactoring is necessary if current efficiency is not enough.
--~--~-~--~~~---~--~~
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: Storing and managing a collection of objects in a HttpSession.

2009-10-26 Thread leszek

http://code.google.com/intl/pl/appengine/docs/java/config/appconfig.html

===
App Engine includes an implementation of sessions, using the servlet
session interface. The implementation uses the App Engine datastore
and memcache to store session data.

This feature is off by default. To turn it on, add the following to
appengine-web.xml:

true

The implementation creates datastore entities of the kind _ah_SESSION,
and memcache entries using keys with a prefix of _ahs.
==
--~--~-~--~~~---~--~~
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: SimpleDS: an alternative for Datastore persistence

2009-10-26 Thread leszek

Thanks for javadoc.

Several months ago I ported my application to Google App Engine and
reported my adventures here:
http://hoteljavaopensource.blogspot.com/2009/09/migration-to-google-app-engine.html
Finally I realized that I reduced my JPA layer to basic CRUD
operations and simple query. To keep backward compatiblity I had to
fill the gap with some additional coding. For the time being I also do
not use transactions - being honest I'm not sure if I understand this
'entity group' transactions mechanism fully.

That's very interesting what you have done, I will try to suck it in
and get rid of this JPA/Google App Engine stuff - paying full respect
to datanucleus it is nonsense for me to keep all this stuff to
implement CRUD and basic query.
I will try to do so during 1-2 weeks and give you some input. I hope
that you plan to keep your project alive.


--~--~-~--~~~---~--~~
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: Access to "Show All Applications" from the App Engine Administration Console

2009-10-26 Thread 杨磊
you are right, thanks.



在2009-10-26,Prashant  写道:
http://groups.google.com/group/google-appengine-java/subscribe


--~--~-~--~~~---~--~~
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: Access to "Show All Applications" from the App Engine Administration Console

2009-10-26 Thread Prashant
http://groups.google.com/group/google-appengine-java/subscribe

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Update: i test it on production server, child objects are not even getting
saved !

--~--~-~--~~~---~--~~
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: Access to "Show All Applications" from the App Engine Administration Console

2009-10-26 Thread 杨磊
hi all

how could i unsubscribe this goolge-appangine-java emails.

thanks.






在2009-10-17,Jorge  写道:
>
>Yap, that' s the URL that wouldn' reply.
>
>If this helps someone from Google, my account is athenas...@gmail.com
>
>Thanks Prashant!
>
>Jorge Gonzalez
>
>On Oct 16, 11:54?am, Prashant  wrote:
>> make sure you tryhttp://appengine.google.com/if it doesn't help wait for
>> someone from google to reply.
>>

--~--~-~--~~~---~--~~
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] JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Hi,

I have following object child relationship. All the objects are getting
saved properly but when I try to fetch child object I am getting *null*.
This error is not because of lazy loading as I am accessing the child before
closing the PersistentManager.


 Parent Object Class ==
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Block implements Serializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long block_id;

@Persistent(dependent = "true")
private BlockModule block_module;





= Child class hierarchy 
@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(customStrategy = "*complete-table*")
@Discriminator(strategy = DiscriminatorStrategy.CLASS_NAME)
public *abstract *class BlockModule extends Serializable{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
protected Key key;

public *abstract *String getTitle(HttpServletRequest req);

public *abstract *String getContent(HttpServletRequest req);
}




@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class BlockTextHTML extends BlockModule{

@Persistent
private String block_title;

@Persistent
private String block_content;






I test by putting BlockTextHTML as child object of Block.

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