i have used a method before for a cloud central database
here is what i did :
1- Created a back-end admin page to create users
1-1 each user is created, a database with that user will be created ex : i create a user called Erel then a database will be created named Erel
2- in the B4J login page :
i used the code to connect to a database and that database name is the user name that i have entered earlier
this solution is working with 45+ customers using our cloud point of sales app.
hope that gives you an idea