亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sharkfromscratch2.html

?? SHARK工作流引擎的啟動(dòng)測(cè)試
?? HTML
字號(hào):
<html>
	<head>
		<title>Shark from Scratch II</title>
		<link type="text/css" href="sfs.css" rel="stylesheet" id="stylesheet">
		<style>
		body
		{
			margin-left: 40px;
			margin-right: 40px;
		}
		</style>

	</head>
<body>
	
	<h1>Shark from Scratch II - Starting the Engine and Logging in.</h1>
	
	<p>In this document, I am going to walk through the creation of some sample code.  As before, I am not going to cover 
	any topics not directly related to the subject.  You will have to know how to write, compile and execute Java programs. 
	Additionally, you need to have a Shark build running and be able to use the administrator application that comes supplied 
	with Shark.</p>
	
	<p>As before, I have the following setup:
		<ol>
			<li>MySQL - I'm using 4.0.16-nt </li>
			<li>MySQL Connector - I have mysql-connector-java-3.0.11-stable-bin.jar</li>
			<li>Ant 1.6.x - Not required... but I've provided a build file....</li>
			<li>Java - I'm using the Sun j2sdk version 1.4.2_04</li>
			<li>CVS, Winzip, etc.  as needed</li>
		</ol>
	</p>	
	<p>And my Shark build is at C:\Shark after I do a 
	<pre>	make -install</pre>
	</p>
	
	<p>The strategy is to iteratively build up some classes to demonstrate how to get around a bit in Shark.  The interface will be 
	a command line out of a main method.  The idea is to get the new user started and somewhat comfortable with coding for Shark.</p>
	
	<p>The code will be excessively pedantic and will be overly commented.  It will NOT be production quality.  So don't even think about
	basing your killer app on this code.  Also, there will be generated HTML pages of the source so you can 
	just follow along in a different browser window.</p>
	
	<h3>Files</h3>
	
	<p>You can read this and click through to links that take you to the source, which was generated by the outstanding Java2Html (
	<a href="http://www.java2html.com">www.java2html.com</a> ).  Additionally, I have provided the sources and ant build files that I used to 
	create all of this. They can be found here (TODO: Link up the SFSII Zip file). </p>	
	
	<p>Click <a href="./code/index.html" target="_new">here</a> to open the browsable source in a new window.</p>
	
	<h2>Starting Shark</h2>
	
	<p>Starting Shark is really as simple as this:</p>
	<pre>	Shark.configure(new Properties("Shark.conf")); </pre>
	<p>That said, the majority of the first timer questions on the Shark mailing list seem to be about starting / configuring shark. You have to 
	configure Shark (see Shark from Scratch TODO add link).  Then you have to make sure that all of the necessary jars are available to your 
	code.  The code we build here will NOT live in the Shark directory.  This is intentional so that we can experience the joy of classpath 
	problems.</p>
	
	<p>The absolute bare minimum set of jars to start Shark (with my configuration) is this: </p>
	<ul>
		<li>C:\Shark\lib\sharkkernel-standard.jar</li>
		<li>C:\Shark\lib\sharkclientapi.jar</li>
		<li>C:\Shark\lib\sharkcommonapi.jar</li>
		<li>C:\Shark\lib\sharkinternalapi.jar</li>
		<li>C:\Shark\lib\sharkxpdl-standard.jar</li>
		<li>C:\Shark\lib\sharkinstancepersistence-dods.jar</li>
		<li>C:\Shark\lib\dods-runtime.jar</li>
		<li>C:\Shark\lib\util.jar</li>
		<li>C:\Shark\lib\sharkutilities-dods.jar</li>
		<li>C:\Shark\lib\mysql-connector-java-3.0.11-stable-bin.jar</li>
		<li>C:\Shark\lib\sharkrepositorypersistence-dods.jar</li>
		<li>C:\Shark\lib\sharkscripting-standard.jar</li>
		<li>C:\Shark\lib\sharkutilities-map.jar</li>
		<li>C:\Shark\lib\sharkutilities-misc.jar</li>
		<li>C:\Shark\lib\xercesImpl.jar</li>
		<li>C:\Shark\lib\xml-apis.jar</li>
	</ul>
	
	<h3>Building the sample</h3>
	<p>Because this one is small, I have inlined the code here for perusal. Of course, all of the source code and a build script are provided.  
	Look here <b><font size="4">(TODO link to source zip)</font></b>. This first example is found in the <code>first</code> package if you 
	are following along at home.</p>
	
	<p>run "ant -p" to see the targets available. If you don't use c:\Shark as your install directory, you will have to change the 
	<code>shark.dir</code> property in the build script.  The class we are running is called <code>Simple</code>.  Before we run 
	it... lets have a look at the code.</p>
	
	<pre>package first;
	
import org.enhydra.shark.Shark;

import java.util.Properties;
import java.io.FileInputStream;

/**
 * Does nothing more than start the Shark engine.
 */
public class Simple
{
   public static void main(String[] args)
   {
      try
      {
         Properties props = new Properties();
         props.load(new FileInputStream("C:\\Shark\\Shark.conf"));

         System.out.println("Enginename from Shark.conf is : " + props.getProperty("enginename"));

         // Make SURE every instance of shark that connects to the same database uses a different
         // enginename.
         props.setProperty("enginename", "rross");

         Shark.configure(props);

      }
      catch (Exception e)
      {
         // It's not like I am going to revive the thing if it crashes...
         e.printStackTrace();
      }
   }
}
</pre>

 <p>Pretty simple.  Load the properties file, supply a different engine name and hand the properties object over to Shark.</p>
 
 <h3>Start your engines</h3>
 
 <p>To run it, just type "ant runFirst" at the command prompt.  This will be how we run all of the targets, BTW.  When you do, you should see
 the following output (roughly).  </p>
 
 <pre>C:\dev\SharkFromScratch>ant runFirst
Buildfile: build.xml

runFirst:
     [java] Enginename from Shark.conf is : Shark
     [java] SharkEngineManager -> Shark engine is being initialized ...
     [java] File dodsConf.xml not exists on path: 'dodsconf' using default insted
     [java] Shark -> Initializing of shark engine has finished
     [java] Shark -> Initializing lasted 5 [s]
     [java] Shark -> firstEngine ready and waiting ...

BUILD SUCCESSFUL
Total time: 6 seconds</pre> 
	
	<p>Everything looks good, with one exception.  "File dodsConf.xml not exists on path: 'dodsconf' using default insted".  Ignoring the 
	grammar and spelling issues, this is saying that it could not find my copy of dodsConf.xml.  If I do a quick search in my Shark directory,
	I see that dodsConf.xml does indeed exist.  What is happening is that the Shark.conf file has relative paths by default and when you 
	run in the directory that holds the build file (C:\dev\SharkfromScratch for me), Shark expects to find all of it's conf and other info here.
	Notice that it still started up.  I doubt however, that it would have been happy for long.</p>
	
	<h3>Fixing up the configuration</h3>
	
	<p>Rather than edit the Shark.conf file on disk, I am going to edit the properties handed to the Shark engine at start time.  This gives 
	me a little better control over what goes in, and allows me to continue to use the 'official' Shark.conf for the applications like 
	runsa.bat without tweaking the file all day long.</p>

	<p>Simply put, I am going to load the properties file and prepend the Shark install directory to all of the relative file names in the
	properties before I give them to Shark.</p>

	<p>In <code>second.Simple</code>, you can see this happen.  It's not magic, and I've just hardcoded the Shark install path, but it does 
	get the job done.</p> <b><font size="4">TODO : Link to J2H output (the code html) here.</font></b>  	
	
	<p>Running this, you should get the following output (or very similar): </p>
	
	<pre>C:\dev\SharkFromScratch>ant runSecond
Buildfile: build.xml

runSecond:
     [java] Fixing up Shark config
     [java] SharkEngineManager -> Shark engine is being initialized ...
     [java] Shark -> Initializing of shark engine has finished
     [java] Shark -> Initializing lasted 5 [s]
     [java] Shark -> secondEngine ready and waiting ...

BUILD SUCCESSFUL
Total time: 6 seconds</pre>

	<p>As you can see, Shark is no longer complaining about not being able to find dodsConf.xml. At this point, we seem to have started 
	Shark properly</p>
	
	<h2>Digging around in Shark</h2>
	
	<p>Now that we can start shark, lets see what we have got. The <code>third</code> package is our first real attempt to build a program.  The <code>Workflow</code>
	class provides a method called <code>init</code> that encapsulates the work we have done so far.   </p>
	
	<h3>Logging in </h3>
	<p>Next up, we log in.  Actually, what we do is get a SharkConnection object and call it's connect method. This code snippet is from the 
	<code>login</code> method.</p>
	
<pre>SharkConnection conn = Shark.getInstance().getSharkConnection();

try
{
   conn.connect(userName, password, props.getProperty("enginename"), null);
}
</pre>

	<p>That fourth parameter to the connect call is 'scope' but last time I checked, it wasn't connected to anything.  Using the "runThird" target
	in the build.xml provided, we should see something very like :</p>

<pre>C:\dev\SharkFromScratch>ant runThird
Buildfile: build.xml

runThird:
     [java] Fixing up Shark config
     [java] SharkEngineManager -> Shark engine is being initialized ...
     [java] Shark -> Initializing of shark engine has finished
     [java] Shark -> Initializing lasted 5 [s]
     [java] Shark -> thirdEngine ready and waiting ...

BUILD SUCCESSFUL
Total time: 6 seconds</pre>

	<p>The observant amongst you will have notice that no new information was provided when we logged in. This is fine, the connection is not 
	null and no exceptions were thrown, so we are good to go.</p>
	
	<p>It is important to note that a brand spanking new database, after a call to <code>recreateDB</code>, will not actually have any users 
	in the database.  If you have not already done so, you can run the Shark Swing Application (<code>C:\Shark\runsa.bat</code> for me) and login
	as "admin" with the password "enhydra".  This will create the admin user.  In fact, if you login to the swing app with any unknown name, it will
	create a new user with the given name and password.</p>
	
	<h3>Classpaths</h3>
	
	<p>A quick note about classpaths.  In the build.xml file provided, the same class path is used for all of the targets, but as you can 
	see, I have commented it so that you can tell what files were required at any given point.  Not all of the files that a Shark 'make' produces
	will be necessary for a given install, so maybe that will help you trim down your classpath a little.</p>
	
</body>
</html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人亚洲综合a∨婷婷| 国产成人在线网站| 97精品超碰一区二区三区| 日韩欧美一区二区三区在线| 依依成人综合视频| 国产凹凸在线观看一区二区| 欧美一区国产二区| 亚洲一区二区美女| av不卡一区二区三区| 欧美精品一区二区久久久| 亚洲成va人在线观看| 91蜜桃在线免费视频| 国产无一区二区| 麻豆精品视频在线观看免费| 欧美日韩精品一区二区三区四区 | 欧美一卡二卡三卡| 亚洲综合小说图片| 99在线热播精品免费| 国产亚洲欧美激情| 九九九精品视频| 欧美一区二区在线免费观看| 亚洲国产精品一区二区www| 91天堂素人约啪| 国产精品久久久久aaaa| 国产成人在线视频网址| 久久嫩草精品久久久精品| 另类小说欧美激情| 日韩美女一区二区三区四区| 丝袜美腿亚洲色图| 欧美日韩精品欧美日韩精品一| 亚洲欧洲日韩av| 福利一区二区在线| 2020国产精品久久精品美国| 久久精品国产久精国产| 欧美一级生活片| 免费观看一级欧美片| 制服视频三区第一页精品| 五月天视频一区| 欧美三级韩国三级日本一级| 亚洲成人免费在线观看| 欧美丝袜丝nylons| 亚洲午夜激情av| 欧美日韩亚洲综合| 亚洲第一搞黄网站| 欧美优质美女网站| 亚洲一区二区偷拍精品| 欧美三级电影在线观看| 婷婷成人综合网| 这里只有精品99re| 激情深爱一区二区| 久久久久久电影| 成人久久视频在线观看| 国产精品你懂的在线| 99精品视频在线播放观看| 亚洲精品免费在线播放| 欧美日韩亚洲国产综合| 视频一区二区三区中文字幕| 欧美一区二区三区四区高清| 蜜臀av性久久久久蜜臀av麻豆| 日韩你懂的在线播放| 国产精品911| 亚洲视频精选在线| 欧美三级三级三级爽爽爽| 秋霞电影网一区二区| 久久久久久久综合狠狠综合| 成人精品视频一区二区三区 | 中文字幕电影一区| 99免费精品视频| 亚洲观看高清完整版在线观看| 欧美精品自拍偷拍| 韩国v欧美v亚洲v日本v| 国产精品视频线看| 91在线精品一区二区| 亚洲午夜精品一区二区三区他趣| 欧美一卡二卡在线| 丁香六月综合激情| 一区二区高清在线| 日韩亚洲欧美综合| 国产不卡在线视频| 亚洲一区二区三区四区在线 | 欧美自拍偷拍一区| 蜜臀精品一区二区三区在线观看| 久久久www成人免费无遮挡大片| 不卡在线视频中文字幕| 国产乱码精品一区二区三区忘忧草| 综合久久综合久久| 欧美一区二区免费观在线| 国产精品一卡二卡| 亚洲综合男人的天堂| 精品久久国产老人久久综合| 99在线精品观看| 视频一区二区三区在线| 国产精品萝li| 日韩欧美一区二区在线视频| 国产成人av资源| 午夜av一区二区三区| 中文字幕精品三区| 555夜色666亚洲国产免| 99久久99久久精品免费看蜜桃| 日本中文字幕一区二区有限公司| 国产精品国产三级国产a| 在线播放一区二区三区| 成人午夜电影小说| 日本不卡视频一二三区| 亚洲视频在线一区观看| 欧美成人伊人久久综合网| 色综合欧美在线| 国产乱码精品一区二区三区av| 亚洲成人三级小说| 国产精品久久久久久久第一福利 | 色综合激情五月| 国产一区二三区| 亚洲国产精品一区二区www| 中文字幕电影一区| 欧美大度的电影原声| 欧美在线视频你懂得| 国产91对白在线观看九色| 看片网站欧美日韩| 午夜在线电影亚洲一区| 亚洲欧美在线aaa| 久久久五月婷婷| 91精品国产高清一区二区三区 | av中文一区二区三区| 九色porny丨国产精品| 亚洲国产精品影院| 亚洲欧美另类小说| 国产精品网站在线播放| 精品欧美久久久| 日韩一区二区免费视频| 欧美日韩欧美一区二区| 91国偷自产一区二区开放时间| 成人国产精品免费观看动漫| 精品亚洲porn| 免费日韩伦理电影| 午夜精品国产更新| 亚洲制服丝袜在线| 亚洲精品日韩一| 亚洲色图.com| 综合久久久久久| 国产精品不卡一区二区三区| 国产欧美精品一区二区三区四区| 日韩欧美中文一区二区| 欧美一级精品大片| 欧美一区二区三区视频| 欧美日韩免费一区二区三区| 欧美日韩精品一区二区| 欧美日韩一本到| 欧美探花视频资源| 欧美日韩一区三区四区| 欧美中文字幕不卡| 欧美在线一区二区| 欧美午夜宅男影院| 欧美日韩你懂得| 91精品国产综合久久婷婷香蕉| 欧美日韩中文国产| 欧美精品高清视频| 欧美一区二区三区四区在线观看| 欧美二区三区的天堂| 欧美精品日韩一区| 日韩视频一区在线观看| 日韩一区二区免费电影| 日韩欧美国产一区二区在线播放| 欧美一区二区三区视频在线观看| 欧美一级专区免费大片| 日韩三级免费观看| 久久久久综合网| 国产精品欧美一区喷水| 日韩理论片网站| 1024成人网| 亚洲一区影音先锋| 日韩精品欧美精品| 蜜臀久久久久久久| 国产传媒欧美日韩成人| 大白屁股一区二区视频| 91亚洲国产成人精品一区二三| 色屁屁一区二区| 91麻豆精品国产91久久久久久久久 | 欧洲一区二区三区在线| 在线观看91视频| 91精品婷婷国产综合久久竹菊| 日韩精品自拍偷拍| 国产人久久人人人人爽| 中文字幕日韩一区二区| 一区二区视频在线| 天天色天天爱天天射综合| 久久国产精品99久久久久久老狼| 国产在线视频精品一区| av成人动漫在线观看| 欧美日韩在线三级| 日韩美一区二区三区| 久久婷婷色综合| 成人欧美一区二区三区| 视频一区欧美日韩| 国产综合色产在线精品 | 日韩成人av影视| 国产成人亚洲综合a∨猫咪| 99久精品国产| 91精品欧美福利在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲欧洲另类国产综合|