I am having multiple datasources creating at runtime. so for each user there is a seperate database schema. so when they are registering the database is created and from that time onwards they have to acces their own database.
I had configured in ds.xml, persistance.xml and components.xml but dynamiclly how can i achieve this.
Can i change the connection string. or can i create a new EntityManager or EntityManagerFactory with new connection settings.