Daily Archives: 17/04/2010

1-2-3 guide to modifying your DirectJNgine app to support AppEngine (proposal for DJN 1.3 alpha 1)

In order to work around AppEngine’s limitations in your existing DirectJNgine application, you need to follow three steps:  

Step 1

First of all, we have provided a new way to reference the files: if you were adding a script entry in your HTML to reference the DirectJNgine generated api/MyApi.js API with the following src attribute,  

src='api/MyApi.js'

now you will write it as follows 

src='/XXX/djn/directprovider/src=api/MyApi.js'

where XXX is the context.  

This will always work, whether you are running under AppEngine or not!  

Step 2

Next, you will need to set the new createSourceFiles servlet parameter to false to avoid the DirectJNgine servlet to attempt to create the server side javascript files, as follows:  

<init-param>
  <param-name>createSourceFiles</param-name>
  <param-value>false</param-value>
</init-param> 

 

Step 3

Lastly, you will need to to set the batchRequestsMultithreadingEnabled servlet parameter to false too, because Google’s AppEngine does not support multithtreading.  

That’s it!  

For more details, check the User’s Guide.