| 1 | = !FrontController design = |
| 2 | |
| 3 | == Request/response database usage (pseudocode) == |
| 4 | |
| 5 | ||''Flow in time''||''Layer''||''Layer''||''Layer''||''Who''|| |
| 6 | || ||'''Context'''||'''Session'''||'''Request'''|| || |
| 7 | ||'''Once:'''||!DataSource(!ConnPool=100) or !EntityManagerFactory() || || || FC init()|| |
| 8 | ||'''Begin'''|| || ||<- !HttpRequest|| User|| |
| 9 | ||..|| ||<- !CreateDatabase(Conn=1) or !CreateDatabase(!EntMan) || || FC|| |
| 10 | ||..|| ||''Subsequent requests: getDatabase, reuse existing connectionless db'' || || FC|| |
| 11 | ||..|| !GetConnection(1) or !GetEntityManager() || || || FC|| |
| 12 | ||..|| !ConnPool-1 || || || FC|| |
| 13 | ||..|| Connection conn ->|| || || FC|| |
| 14 | ||..|| || Database.useConnection(conn) || || FC|| |
| 15 | ||..|| || Response = Service.handleRequest() || || Application service|| |
| 16 | ||..|| || Close connection, !ConnPool+1 || || FC|| |
| 17 | ||..|| || Send response ->|| || FC|| |
| 18 | ||'''End'''|| || || Get response || User|| |