freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

javajdbc外文翻譯外文文獻(xiàn)英文文獻(xiàn)(存儲(chǔ)版)

  

【正文】 on at the end of this article. Two of the most successful examples of Struts extensions are the Struts Validation framework and the Tiles framework. I assume that you are already familiar with the Struts framework and know how to create simple applications using it. Please see the Resources section if you want to know more about Struts. PlugInAccording to the Struts documentation A plugin is a configuration wrapper for a modulespecific resource or service that needs to be notified about application startup and shutdown events. What this means is that you can create a class implementing the PlugIn interface to do something at application startup or shutdown. Say I am creating a web application where I am using Hibernate as the persistence mechanism, and I want to initialize Hibernate as soon as the application starts up, so that by the time my web application receives the first request, Hibernate is already configured and ready to use. We also want to close down Hibernate when the application is shutting down. We can implement this requirement with a Hibernate PlugIn by following two simple steps.Create a class implementing the PlugIn interface, like this: public class HibernatePlugIn implements PlugIn{ private String configFile。 }}The class implementing PlugIn interface must implement two methods: init() and destroy(). init() is called when the application starts up, and destroy() is called at shutdown. Struts allows you to pass init parameters to your PlugIn class. For passing parameters, you have to create JavaBeantype setter methods in your PlugIn class for every parameter. In our HibernatePlugIn class, I wanted to pass the name of the configFile instead of hardcoding it in the application.Inform Struts about the new PlugIn by adding these lines to : strutsconfig ! Message Resources messageresources parameter= / plugin className= setproperty property=configFile value=// /plugin/strutsconfigThe className attribute is the fully qualified name of the class implementing the PlugIn interface. Add a setproperty element for every initialization parameter which you want to pass to your PlugIn class. In our example, I wanted to pass the name of the config file, so I added the setproperty element with the value of config file path. Both the Tiles and Validator frameworks use PlugIns for initialization by reading configuration files. Two more things which you can do in your PlugIn class are: If your application depends on some configuration files, then you can check their availability in the PlugIn class and throw a ServletException if the configuration file is not available. This will result in ActionServlet being unavailable. The PlugIn interface39。)。 } // Process any ActionForm bean related to this request ActionForm form = processActionForm(request, response, mapping)。 // Process the returned ActionForward instance processForwardConfig(request, response, forward)。 if (action == null) { return。 if (mapping == null) { return。 for path 39。 } public String getConfigFile() { return name。s take a look at some numbers from Windows 2000. Table 199 lists all the statistics we39。ll see a differentiation in the timings of about 50%. Given a situation in which you need to make several tight calls to the database using a Statement, a predefined SELECT statement can save you a significant amount of time.Table 197: Select timings (in milliseconds)DriverStatementdefineColumnType( )OCI1310Thin1310Now that we39。ll see that this time, the batched PreparedStatement object bees more efficient than the Statement object at about 50 inserts. This is an improvement over the prepared statement without batching.Figure 193WARNING: There39。ll see a different story.Table 193: OCI driver timings (in milliseconds)InsertsStatementPreparedStatement1101131,0002,8041,412Figure 191 is a graph of the timings needed to insert varying numbers of rows using both a Statement object and a PreparedStatement object. The number of inserts begins at 1 and climbs in intervals of 10 up to a maximum of 150 inserts. For this graph and for those that follow, the lines themselves are polynomial trend lines with a factor of 2. I chose polynomial lines instead of straight trend lines so you can better see a change in the performance as the number of inserts increases. I chose a factor of 2 so the lines have only one curve in them. The important thing to notice about the graph is that it39。s automit feature is on, which means that each SQL statement is mitted as it is executed. If more than one SQL statement is executed by your program, then a small performance increase can be achieved by turning off automit. Let39。ll not show the code for the examples in this chapter. I39。s efficiency, you can use the EXPLAIN PLAN facility to explain how the database39。ll first look at automit. Next, we39。ll be surprised at the reality of performance for these objects, and I hope you39。s more important to turn off automit for managing multistep transactions than for gaining performance. But on a heavily loaded system where many users are mitting transactions, the amount of time it takes to perform mits can bee quite significant. So my remendation is to turn off automit and manage your transactions manually. The rest of the tests in this chapter are performed with automit turned off. SQL92 Token ParsingLike automit, SQL92 escape syntax token parsing is on by default. In case you don39。ll get better performance if you execute your SQL statements using a Statement object instead of a PreparedStatement object. Given that, you may ask: why use a PreparedStatement at all? It turns out that there are some reasons why you might use a PreparedStatement object to execute SQL statements. First, there are several types of operations
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1