DBScriptRunner-tags.xml Sample

This topic inludes the source code for the DBScriptRunner-tags.xml Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/ExtensionDevKit/ControlDevKit/DBScripter/dbScript/

Sample Source Code


01 <?xml version="1.0" encoding="UTF-8"?>
02 
03 <control-tags 
04 xmlns="http://www.bea.com/2003/03/controls/" 
05 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
06   <control-tag name="dbscr-connection" multiple="false" allow-declaration-override="true" >
07     <description>Class-level attributes of datasource, set on JCX</description>
08     <attribute name="data-source-jndi-name" required="false">
09       <description/>
10       <type>
11         <text max-length="255" long="false"/>
12       </type>
13     </attribute>
14     <attribute name="batch-size" required="false">
15       <description>Sets the number of INSERT statements the control will batch in one SQL command execution, if the driver reports that it supports batches.  </description>
16       <type>
17         <text/>
18       </type>
19       <default-value>1</default-value>
20     </attribute>
21   </control-tag>
22   <method-tag name="dbscript"  multiple="false"  method-location="interface-method">
23     <description>Tags on JCX methods, determine whether the method adefines a data source, bruns a built-in script, or cruns a script pointed to by a file </description>
24             <attribute name="new-data-source-type" required="false">
25                 <description>Type of DataSource to create.  Determines driver class.  If present, signals that this method defines a JDBC Connection Pool and or DataSources</description>
26                 <type>
27                     <text max-length="255" long="false"/>
28                 </type>
29             </attribute>
30             <attribute name="new-data-source-name" required="false">
31                 <description>Name of DataSource to create.  </description>
32                 <type>
33                     <text max-length="255" long="false"/>
34                 </type>
35             </attribute>
36             <attribute name="data-source-url-defaults" required="false">
37                 <description>URL of DataSource to create, if not provided as method parameters.  </description>
38                 <type>
39                     <text max-length="255" long="false"/>
40                 </type>
41             </attribute>
42             <attribute name="data-source-properties" required="false">
43                 <description>Properties of DataSource to create, if not provided as method parameters.  </description>
44                 <type>
45                     <text max-length="1024" long="true"/>
46                 </type>
47             </attribute>
48             <attribute name="prompt-for-url" required="false">
49                 <description>Whether parts of URL for DataSource are provided as method parameters.  </description>
50                 <type>
51                     <boolean/>
52                 </type>
53             </attribute>
54             <attribute name="prompt-for-username" required="false">
55                 <description>Whether database username and password for DataSource are provided as method parameters.  </description>
56                 <type>
57                     <boolean/>
58                 </type>
59             </attribute>
60             <attribute name="create-notx-data-source" required="false">
61                 <description>Create a second datasource that does not participate in global transactions (useful for scripts).
62                 </description>
63                 <type>
64                     <boolean/>
65                 </type>
66             </attribute>
67             <attribute name="wls-admin-user" required="false">
68                 <description>WLS admin user with permission to create DataSources.  Used at runtime only.  Leave blank if application forces logon.</description>
69                 <type>
70                     <text/>
71                 </type>
72             </attribute>
73             <attribute name="wls-admin-pwd" required="false">
74                 <description>Password for WLS admin user.</description>
75                 <type>
76                     <text/>
77                 </type>
78             </attribute>
79       <attribute name="script-file" required="false">
80         <description>A SQL Script file compiled into the jar</description>
81         <type>
82           <text max-length="255" long="false"/>
83         </type>
84         <default-value/>
85       </attribute>
86   </method-tag>
87 </control-tags>