Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005340 [Quercus] minor always 01-21-13 21:13 02-05-13 04:01
Reporter ngoc View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 4.0.34
Summary 0005340: Make QuercusCompiledScript Serializable
Description My project need save QuercusCompiledScript to datastore-memcache (appengine).
So I need QuercusCompiledScript implements Serializable .

- I can extends or rewrite another version of it , but it have QuercusScriptEngine and QuercusProgram fields non Serializable too .
- make transient it will cause null if reconstruct from datastore
Additional Information Example my code in use :

QuercusScriptEngine engine = new QuercusScriptEngine(new QuercusScriptEngineFactory(), quercus);

String sayHelloVN ="<h1>hello <?php echo 'vietnam'; ?> </h1>" ;
CompiledScript script = engine.compile(sayHelloVN);

MemcacheService syncCache = MemcacheServiceFactory.getMemcacheService();
syncCache.put("test", script );

CompiledScript compiledscript = (CompiledScript)syncCache.get("test");
compiledscript.eval();
Attached Files

- Relationships

- Notes
(0006180)
ngoc
02-05-13 03:59

Please fix this issue , all CompiledScript is Serializable except QuercusCompiledScript
 
(0006181)
ngoc
02-05-13 04:01

String sayHelloVN ="<h1>hello </h1>" +
                    "<?php return 'Boy'; ?>";
          QuercusScriptEngine engine = new QuercusScriptEngine(new QuercusScriptEngineFactory());
          
          
          QuercusCompiledScript script = (QuercusCompiledScript) engine.compile(sayHelloVN);
         System.out.println(script.eval());
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(baos);
         oos.writeObject(script);

Sample test code
 

- Issue History
Date Modified Username Field Change
01-21-13 21:13 ngoc New Issue
02-05-13 03:59 ngoc Note Added: 0006180
02-05-13 04:01 ngoc Note Added: 0006181


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker