当只需要对数据库进行一次查询或简单的更新时,让会话bean直接访问数据库是正确的选择。
When just a query or a simple update to a database is needed, a session bean directly accessing the database is the right choice.
对于该场景,假定用户保留所选择的默认集合,输入一个简单的查询字符串,然后单击Search按钮。
For this scenario, assume that the user leaves the default collection selected, enters a simple query string, and then clicks the Search button.
如果您的服务是对一个具有良好索引的数据库的简单查询,花费少于100毫秒的时间,那么您将看到这两个选择之间巨大的差异。
If your services are doing simple inquiries into a well-indexed database that take less than 100 milliseconds, then you will see a big difference between the two choices.
应用推荐