Accessing a database pool from grails.
从Grails访问数据库池。
Select Using the Geronimo database pool wizard.
选择usingthe Geronimodatabase pool wizard。
Specify the database pool in the deployment descriptors.
在部署描述符中指定数据库池。
Listing 1: EMPdemo Cloudscape database pool deployment plan, Part I.
清单1:empdemoCloudscape数据库池部署计划(第i部分)。
Create a database Pool using JCC Drivers and database type of Other.
创建使用JCC驱动程序和O ther数据库类型的数据库池。
Create a database Pool using JCC Drivers and database type of DB2 XA.
创建使用JCC驱动程序和DB 2XA数据库类型的数据库池。
The viewer displays all the classes loaded for the database pool sample.
该查看器显示了为数据库池示例加载的所有类。
Listing 3: EMPdemo Microsoft SQL database pool deployment plan, Part ii.
清单3:empdemoMicrosoftSQL数据库池部署计划(第ii部分)。
Click Install to deploy the database pool used by the MyBankEJB application.
单击Install,以部署MyBankEJB应用程序使用的数据库池。
Select the entry for the database pool example and expand all the tree nodes.
选择数据库池示例的条目,并展开所有的树节点。
Modify a database pool: The deployment tool does not provide a modify command.
修改数据库池:该部署工具并没有提供修改命令。
Select Using the Geronimo database pool wizard to create new database pools.
选择Usingthe Geronimodatabase poolwizard创建新的数据库池。
In the Database pool creation wizard (Figure 3), enter or select the following values.
在数据库池创建向导(图3)中,输入或选择以下值。
The plan is an XML file that you can use in a command to deploy the database pool manually.
计划是一个XML文件,可以在命令中使用它手工部署数据库池。
You can also integrate more with Geronimo by creating a database pool bound for Lift to use.
还可以创建供Lift使用的数据库池绑定,从而使与Geronimo的集成更紧密。
There are two files in which you need to specify the resource references for the database pool.
您需要在两个文件中为数据库池指定资源参考。
Then click the Using the Geronimo database pool wizard link, and complete the following steps.
然后单击usingthe Geronimodatabase poolwizard链接,完成以下步骤。
Now that the database pool has been created, we just need to access it from our Grails application.
现在已经创建了数据库池,我们只需要从Grails应用程序访问它。
The viewer displays the dependencies of the DB2 database pool sample on DB2 JARs and system modules.
该查看器显示了DB 2数据库池示例对DB 2JAR和系统模块的依赖关系。
Once the connection is successful, the next screen provides the deployment option for this database pool.
连接成功之后,下一个屏幕提供这个数据库池的部署选项。
Later in this article, you will see how to create a database pool using the Geronimo database pool wizard.
在本文稍后的部分中,您将了解如何使用Geronimo数据库池向导来创建数据库池。
The Geronimo database pool wizard will create a plan that has such a dependency when Derby embedded is used.
Geronimo数据库池向导将在使用嵌入式Derby时创建一个具有此类依赖性的计划。
The database pool will keep a pool of connections to the SAMPLEDB database instance. To create a database pool.
该数据库池将保持到SAMPLEDB数据库实例的一个连接池。
If you use this plan you must specify the database Type to be Other when creating the database pool (see Figure 9).
如果要使用这个计划,那么在创建数据库池时必须把数据库类型设置为other(见图9)。
No matter what database configuration pool type you decide to use, you need to build a database pool deployment plan.
不管您决定使用哪种数据库配置池类型,您都需要制定一个数据库池部署计划。
Once the database pool has been deployed, application modules can refer to it using the name specified during configuration.
在部署数据库池之后,应用程序模块可以使用在配置过程中指定的名称来引用它。
Note that we called our database pool adserver and that is the resource-link you see in the resource-ref and the dependency.
注意,我们把数据库池称为adserver,并且这是您在resource -ref和依赖关系中看到的resource - link。
You also need to declare the resource reference in web.xml and look for the database pool via JNDI from the application code.
您还需要在web.xml 中声明该资源引用,并在应用程序代码中通过JNDI 查找数据库池。
To do this, you need to specify the name of the database pool to the ref-name, which should be mapped with the resource-ref in web.xml.
为此,您需要将数据库池的名称指定为ref - name,该名称应映射到web . xml中的resource - ref。
If the deployment is successful, the console returns to the database pool list screen where the new pool is listed in the running state.
如果部署成功,控制台就返回到数据库池列表屏幕,新的池应该处于正在运行状态。
应用推荐