See Oregano, a Multiuser server for Flash clients, written in Java and released free and open source.