Mixing AS1.0 and AS2.0 in the same webapp

Todd Hivnor <[email protected]> Fri, 17 Feb 2006 14:51:03 -0800
Newsgroups gmane.comp.java.openamf.user
Message-ID <[email protected]>
I would like to create a single webapp, which contains 2 different Flash 
movies. Once uses AS1.0 and the other uses AS2.0, but both use OpenAMF. 
(Why? I'm working on converting from AS1.0 to AS2.0, and want to be able 
to deploy both while I work on the conversion.)

In web.xml, I can define 2 different servlets. And each servlet can have 
its own OpenAMF config file, I've tried having 2 OpenAMF config files, 
one with force-lower-case-keys=true and the other with 
force-lower-case-keys=false. However, it seems that OpenAMF considers 
this "force-lower-case-keys" property to be global. I can't have it true 
for one servlet and false for another.

I looked into the source code, and found that OpenAMFConfig is a 
singleton. That is, OpenAMFConfig.getInstance() always returns the same 
instance. I'm wondering if this could be changed. I may try to muck 
around with the code myself, but thought there might be some important 
reason why OpenAMFConfig should be a singleton. It seems to me that we 
should be able to have 1 OpenAMFConfig per Gateway Servlet.

So: is there any structural reason why OpenAMFConfig should be a singleton?

If not, I will try to make the change locally. If it works I will make a 
patch available. Perhaps it can go into the main source tree.

 - Todd




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642