In this case, we would mock the query method of the database connection object so that we could just return back the results instead of calling out to the database for them.
在这里,我们可以模拟数据库连接对象的查询方法,这样我们就只需要返回结果,而不需要真正地去查询数据库。
Listing 4 shows an excerpt from a method that establishes a DB2 database connection.
清单4显示了一个用于建立DB 2数据库连接的方法的摘录。
It is in this method call that the database connection is obtained and subsequently closed.
就是在该方法调用中,我们获得然后再关闭数据库连接。
In a production implementation, you would use this method to create the internals of a database connection pool.
在一个生产实现中,可以使用该方法来创建数据库连接池的间隔。
Using this method, a connection is created each time you access the database from your program, thereby incurring a substantial processing overhead.
通过该方法,每当您从程序访问数据库时,都要创建连接,从而招致大量的处理开销。
The second method demonstrates accessing the database directly using a pooled database connection.
第二个方法演示了使用池态数据库连接直接访问数据库。
It seeks the same method used to create the data model, a database connection, or a DDL script, then performs the compare, and displays the results in the compare pane.
它寻找用于创建数据模型、数据库连接或ddl脚本的相同方法,然后执行比较,并在比较面板中显示结果。
The connection manager can then call this method when the resource adapter indicates a connection error, or even periodically to remove broken connections from the pool.
然后连接管理器在资源适配器指示连接错误时调用这个方法,甚至定期调用该方法,以便从池中排除坏掉的连接。
Rather than reassociating the connection handle with the managed connection the next time a method is called, the optimization uses lazy association.
这种优化使用惰性关联,而不是在下次调用方法时重新将连接句柄与托管连接关联。
An alternative to consider if your data is going to be exposed over HTTP is a SPARQL connection method over HTTP, which makes your data "Linked data" -ready and can be completely distributed.
如果数据将通过HTTP公开,那么另一种备选方法是基于HTTP的SPARQL连接,这种方法使您的数据成为“链接数据”并且可以实现完全分布。
The maximum time the method will wait for a connection in this situation is specified by the connection pool's connection timeout property.
对于这种情况,该方法等待连接的最大等待时间是由连接池的连接超时属性指定的。
This method works fine as long as the connection to the server is not lost, in which case your connection to the server is rarely re-established.
只要与服务器的连接不断开这种方法就能良好运行,这种情况下很少需要重新建立到服务器的连接。
As with all JDBC resources, invoke the connections close method when you are done with the connection.
和所有JDBC资源一样,在使用完连接时,要调用连接关闭方法。
The dashed arrows in Figure 3 indicate the notification of the connection manager by the EJB container when a method completes.
图3中虚线箭头表示方法完成时ejb容器对连接管理器的通知。
The goal of the IOR is to enable the client to make a connection to the server so that it can complete a method call.
IOR 的目的就是使客户机能够连接到服务器,以便它能够完成方法调用。
The following method, in a class called DatabaseExample, takes a database Connection object, reads the records from the database, and prints the values.
下面的方法,在一个被称为DatabaseExample 的类中,使用数据库Connection对象,从数据库中读取记录并打印出数值。
This is the only configurable LTC setting for Web components (servlets), and applies to bean managed transactions using the LocalTransaction.begin method on a Connection.
该属性是We b组件(servlet)唯一能配置的ltc设定值,通过在连接上使用LocalTransaction. begin方法应用于bean管理事务。
Provide the queue manager name and select the appropriate connection method, as shown in Figure 4
提供队列管理器名称并选择适当的连接方法,如图 4 所示。
However, instead of specifying a callback method, specify a delegate for the connection, once you have set this to self.
但是,一旦您将代理设置为self,就应该为连接指定一个代理,而不是一个回调方法。
The session bean method then opens a connection with a messaging provider to send and receive messages.
然后由该会话bean方法打开与一个消息传递提供者的连接,以便发送和接收消息。
This matches any call to a method defined on a JDBC connection that returns a Statement or any subclass thereof.
这个建议匹配的方法调用是在JDBC连接上定义的,而且会返回Statement或任何子类。
Next, you obtain a handle to your LDAP connection established earlier in the Activator class’s initializeLDAP method.
接下来,将获得前面使用 Activator类的initializeLDAP方法建立的LDAP连接的一个句柄。
The lookupStats() method uses the three different mappings to look up the connection and the SQL associated with this statement.
lookupStats()方法使用这三个不同的映射来查询与这条语句关联的连接和SQL。
Things to note about this method are the use of the default connection and setting the autocommit mode to false.
对于这个方法,需要注意默认连接的使用,还要将自动提交模式设为false。
Once an authenticated connection is open, the getFeed() method retrieves the contacts feed.
一旦打开了一个已验证连接,getFeed()方法就会检索联系人提要。
The connect method accepts a timeout parameter, and if the connection does not succeed within the stipulated time period, it gives up.
connect方法接受一个超时参数,如果在指定的时间段内未能成功地连接,它就会放弃。
The simpleQuery() method in Listing 8 declares several variables and then establishes a database connection using a helper method defined in Listing 2.
清单 7 中的 simpleQuery()方法声明几个变量,然后使用清单2中定义的helper 方法建立一个数据库连接。
This is the only configurable LTC setting for Web components (servlets), and applies to bean managed transactions using the LocalTransaction.begin method on a connection.
该属性是We b组件(Servlet)唯一可配置的LTC设置,通过在连接上使用LocalTransaction. begin方法应用于Bean管理的事务。
When the explicit proxy server allows the connect method, the TLS handshake is sent, followed by the WebSocket connection upgrade handshake.
当显式的代理服务器允许CONNECT方法时,TLS握手被发送出去,后面紧跟着WebSocket连接升级握手。
The Geronimo team has been careful to implement the established standards, so the simple JNDI lookup method of obtaining a remote connection to a stateless session bean works as advertised.
Geronimo团队已经认真实现了健全的标准,推广用简单的JNDI 查询方法获得与无状态会话 bean 的远程连接。
应用推荐