[Java-link-svn] SF.net SVN: java-link: [17] trunk
Status: Pre-Alpha
Brought to you by:
welterde0
|
From: <wel...@us...> - 2006-10-24 17:40:00
|
Revision: 17
http://svn.sourceforge.net/java-link/?rev=17&view=rev
Author: welterde0
Date: 2006-10-24 09:47:32 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
pushed newest changes into repo
updated PROJECTS file(forgot to update, when libdb was added)
removed some local System-dependencies
updated StorageManager(removed old code, and removed need for the server.db)
Client::NET(commented NetworkManager out, i think it was mising)
updated Main to include getter for Core and an instruction to save before
shutting down
Server::JMX(added method for the Modules to register their JMX-Stuff)
fixed site.xml of Server||Share
Share::NET(added reusability for the LLConfiguration)
Share::NET(fixed some design mistackes on LL)
Server::Core(rewritten it from scratch)
Modified Paths:
--------------
trunk/PROJECTS
trunk/client/nbproject/project.properties
trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java
trunk/server/nbproject/project.properties
trunk/server/nbproject/project.xml
trunk/server/src/main/java/org/jlink/ServerNetwork.java
trunk/server/src/main/java/org/jlink/server/Main.java
trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java
trunk/server/src/site/site.xml
trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java
trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java
trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java
trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java
trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java
trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java
trunk/share/src/site/site.xml
Added Paths:
-----------
trunk/server/src/main/java/org/jlink/server/Core.java
Removed Paths:
-------------
trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java
Property Changed:
----------------
trunk/
trunk/client/
trunk/client/nbproject/
trunk/client/src/
trunk/client/src/main/
trunk/client/src/main/java/
trunk/client/src/main/java/org/
trunk/client/src/main/java/org/jlink/
trunk/client/src/main/java/org/jlink/frontend/
trunk/client/src/main/java/org/jlink/frontend/system/
trunk/server/
trunk/server/nbproject/
trunk/server/src/
trunk/server/src/main/
trunk/server/src/main/java/
trunk/server/src/main/java/org/
trunk/server/src/main/java/org/jlink/
trunk/server/src/main/java/org/jlink/server/
trunk/share/
trunk/share/nbproject/
trunk/share/src/
trunk/share/src/main/
trunk/share/src/main/assembly/
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Modified: trunk/PROJECTS
===================================================================
--- trunk/PROJECTS 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/PROJECTS 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,12 +1,13 @@
###################################################
######################PROJECTS#####################
###################################################
-1.Documentation
+1 Documentation
-2.Client
+2 Client
-3.Server
+3 Server
+3.1 libdb
-4.Share
+4 Share
-5.Themes
\ No newline at end of file
+5 Themes
\ No newline at end of file
Property changes on: trunk/client
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/nbproject
___________________________________________________________________
Name: svn:ignore
+ private
Modified: trunk/client/nbproject/project.properties
===================================================================
--- trunk/client/nbproject/project.properties 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/client/nbproject/project.properties 2006-10-24 16:47:32 UTC (rev 17)
@@ -2,4 +2,3 @@
#Sat May 13 22:20:34 CEST 2006
local.repository=/home/tassilo/.m2/repository
mvn.path=mvn
-project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/client
Property changes on: trunk/client/src
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main/java
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main/java/org
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main/java/org/jlink
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main/java/org/jlink/frontend
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/client/src/main/java/org/jlink/frontend/system
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Modified: trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java
===================================================================
--- trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/libdb/src/main/java/org/jlink/server/libdb/StorageManager.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -35,11 +35,6 @@
* @author welterde
*/
public class StorageManager {
- //Static Configuration
- public static final String ENV_SEP = System.getProperty("file.separator");
- public static final String DB_HOME = System.getProperty("user.home") +
- ENV_SEP + ".jlink" + ENV_SEP + "server" + ENV_SEP + "db";
- public static final String DB_CONF = DB_HOME + ENV_SEP + "config.xml";
/** Creates a new instance of StorageManager */
public StorageManager() {
@@ -61,7 +56,7 @@
throw new NullPointerException("the config may not be null");
// <editor-fold defaultstate="collapsed" desc=" create Driver ">
- String driverClass = conf.getString("server.db.driver", "org.jlink." +
+ String driverClass = conf.getString("driver", "org.jlink." +
"server.libdb.drivers.JackrabbitDriver");
log.info("creating DatabaseDriver: " + driverClass);
//try to create the driver wanted
@@ -95,8 +90,8 @@
String config = null;
//load the strings from the config, with local defaults
- home = conf.getString("server.db.home", "db");
- config = conf.getString("server.db.conf", "db/config.xml");
+ home = conf.getString("home", "db");
+ config = conf.getString("conf", "db/config.xml");
this.db_driver.init(config, home);
} catch(RepositoryException exc) {
log.fatal("cannot init driver", exc);
Property changes on: trunk/server
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/server/nbproject
___________________________________________________________________
Name: svn:ignore
+ private
Modified: trunk/server/nbproject/project.properties
===================================================================
--- trunk/server/nbproject/project.properties 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/nbproject/project.properties 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,5 +1,5 @@
#The netbeans freeform property file
-#Mon May 15 20:20:00 CEST 2006
-local.repository=/home/tassilo/.m2/repository
+#Mon Oct 09 20:16:43 CEST 2006
+local.repository=/Users/welterde/.m2/repository
mvn.path=mvn
-project.directory=/home/tassilo/Documents/dev/jlink/feature_maven2/server
+
Modified: trunk/server/nbproject/project.xml
===================================================================
--- trunk/server/nbproject/project.xml 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/nbproject/project.xml 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,121 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.ant.freeform</type>
- <configuration>
- <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
- <name>JLink Server</name>
- <properties>
- <property name="ant.script">nbproject/mavencall.xml</property>
- <property-file>nbproject/project.properties</property-file>
- </properties>
- <folders>
- <source-folder>
- <label>src/main/java</label>
- <type>java</type>
- <location>src/main/java</location>
- </source-folder>
- <source-folder>
- <label>src/test/java</label>
- <type>java</type>
- <location>src/test/java</location>
- </source-folder>
- </folders>
- <ide-actions>
- <action name="build">
- <script>${ant.script}</script>
- <target>build</target>
- </action>
- <action name="clean">
- <script>${ant.script}</script>
- <target>clean</target>
- </action>
- <action name="rebuild">
- <script>${ant.script}</script>
- <target>clean</target>
- <target>build</target>
- </action>
- <action name="javadoc">
- <script>${ant.script}</script>
- <target>javadoc</target>
- </action>
- <action name="run">
- <script>${ant.script}</script>
- <target>run</target>
- </action>
- <action name="test">
- <script>${ant.script}</script>
- <target>test</target>
- </action>
- </ide-actions>
- <view>
- <items>
- <source-file>
- <label>pom</label>
- <location>pom.xml</location>
- </source-file>
- <source-file>
- <label>mavencall</label>
- <location>nbproject/mavencall.xml</location>
- </source-file>
- <source-folder style="packages">
- <label>src/main/java</label>
- <location>src/main/java</location>
- </source-folder>
- <source-folder style="packages">
- <label>src/test/java</label>
- <location>src/test/java</location>
- </source-folder>
- <source-folder style="tree">
- <label>src/main/resources</label>
- <location>src/main/resources</location>
- </source-folder>
- <source-folder style="tree">
- <label>src/test/resources</label>
- <location>src/test/resources</location>
- </source-folder>
- <source-folder style="tree">
- <label>src/site</label>
- <location>src/site</location>
- </source-folder>
- <source-folder style="tree">
- <label>target</label>
- <location>target</location>
- </source-folder>
- </items>
- <context-menu>
- <action>
- <script>${ant.script}</script>
- <label>Refresh Project</label>
- <target>refresh-project</target>
- </action>
- <ide-action name="build"/>
- <ide-action name="clean"/>
- <ide-action name="rebuild"/>
- <ide-action name="javadoc"/>
- <ide-action name="run"/>
- <ide-action name="test"/>
- <action>
- <script>${ant.script}</script>
- <label>Format Code</label>
- <target>jalopy</target>
- </action>
- </context-menu>
- </view>
- <subprojects/>
- </general-data>
- <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
- <compilation-unit>
- <package-root>src/main/java</package-root>
- <classpath mode="compile">${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath>
- <built-to>target/classes</built-to>
- <source-level>1.4</source-level>
- </compilation-unit>
- <compilation-unit>
- <package-root>src/test/java</package-root>
- <unit-tests/>
- <classpath mode="compile">target/classes:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar</classpath>
- <built-to>target/test-classes</built-to>
- <source-level>1.4</source-level>
- </compilation-unit>
- </java-data>
- </configuration>
-</project>
\ No newline at end of file
+ <type>org.netbeans.modules.ant.freeform</type>
+ <configuration>
+ <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+ <name>JLink Server</name>
+ <properties>
+ <property name="ant.script">nbproject/mavencall.xml</property>
+ <property-file>nbproject/project.properties</property-file>
+ </properties>
+ <folders>
+ <source-folder>
+ <label>src/main/java</label>
+ <type>java</type>
+ <location>src/main/java</location>
+ </source-folder>
+ <source-folder>
+ <label>src/test/java</label>
+ <type>java</type>
+ <location>src/test/java</location>
+ </source-folder>
+ </folders>
+ <ide-actions>
+ <action name="build">
+ <script>${ant.script}</script>
+ <target>build</target>
+ </action>
+ <action name="clean">
+ <script>${ant.script}</script>
+ <target>clean</target>
+ </action>
+ <action name="rebuild">
+ <script>${ant.script}</script>
+ <target>clean</target>
+ <target>build</target>
+ </action>
+ <action name="javadoc">
+ <script>${ant.script}</script>
+ <target>javadoc</target>
+ </action>
+ <action name="run">
+ <script>${ant.script}</script>
+ <target>run</target>
+ </action>
+ <action name="test">
+ <script>${ant.script}</script>
+ <target>test</target>
+ </action>
+ </ide-actions>
+ <export>
+ <type>folder</type>
+ <location>target/classes</location>
+ <script>${ant.script}</script>
+ <build-target>build</build-target>
+ </export>
+ <export>
+ <type>folder</type>
+ <location>target/test-classes</location>
+ <script>${ant.script}</script>
+ <build-target>build</build-target>
+ </export>
+ <view>
+ <items>
+ <source-folder style="packages">
+ <label>src/main/java</label>
+ <location>src/main/java</location>
+ </source-folder>
+ <source-folder style="packages">
+ <label>src/test/java</label>
+ <location>src/test/java</location>
+ </source-folder>
+ <source-file>
+ <label>pom</label>
+ <location>pom.xml</location>
+ </source-file>
+ <source-file>
+ <label>mavencall</label>
+ <location>nbproject/mavencall.xml</location>
+ </source-file>
+ <source-folder style="tree">
+ <label>src/main/resources</label>
+ <location>src/main/resources</location>
+ </source-folder>
+ <source-folder style="tree">
+ <label>src/test/resources</label>
+ <location>src/test/resources</location>
+ </source-folder>
+ <source-folder style="tree">
+ <label>src/site</label>
+ <location>src/site</location>
+ </source-folder>
+ <source-folder style="tree">
+ <label>target</label>
+ <location>target</location>
+ </source-folder>
+ </items>
+ <context-menu>
+ <action>
+ <script>${ant.script}</script>
+ <label>Refresh Project</label>
+ <target>refresh-project</target>
+ </action>
+ <ide-action name="build"/>
+ <ide-action name="clean"/>
+ <ide-action name="rebuild"/>
+ <ide-action name="javadoc"/>
+ <ide-action name="run"/>
+ <ide-action name="test"/>
+ <action>
+ <script>${ant.script}</script>
+ <label>Format Code</label>
+ <target>jalopy</target>
+ </action>
+ </context-menu>
+ </view>
+ <subprojects/>
+ </general-data>
+ <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
+ <compilation-unit>
+ <package-root>src/main/java</package-root>
+ <classpath mode="compile">${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/yan/jfunutil/5.0/jfunutil-5.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/org/jlink/libdb/0.0.1-SNAPSHOT/libdb-0.0.1-SNAPSHOT.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/yan/yan/5.0/yan-5.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath>
+ <built-to>target/classes</built-to>
+ <source-level>1.5</source-level>
+ </compilation-unit>
+ <compilation-unit>
+ <package-root>src/test/java</package-root>
+ <unit-tests/>
+ <classpath mode="compile">target/classes:${local.repository}/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar:${local.repository}/junit/junit/3.8.1/junit-3.8.1.jar:${local.repository}/commons-beanutils/commons-beanutils/1.4/commons-beanutils-1.4.jar:${local.repository}/yan/jfunutil/5.0/jfunutil-5.0.jar:${local.repository}/log4j/log4j/1.2.13/log4j-1.2.13.jar:${local.repository}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:${local.repository}/org/apache/derby/derby/10.1.1.0/derby-10.1.1.0.jar:${local.repository}/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar:${local.repository}/org/apache/jackrabbit/jackrabbit-core/1.0.1/jackrabbit-core-1.0.1.jar:${local.repository}/commons-digester/commons-digester/1.6/commons-digester-1.6.jar:${local.repository}/ant/ant-optional/1.5.1/ant-optional-1.5.1.jar:${local.repository}/lucene/lucene/1.4.3/lucene-1.4.3.jar:${local.repository}/commons-cli/commons-cli/1.0/commons-cli-1.0.jar:${local.repository}/org/jlink/libdb/0.0.1-SNAPSHOT/libdb-0.0.1-SNAPSHOT.jar:${local.repository}/commons-configuration/commons-configuration/1.3/commons-configuration-1.3.jar:${local.repository}/commons-codec/commons-codec/1.3/commons-codec-1.3.jar:${local.repository}/commons-lang/commons-lang/1.0/commons-lang-1.0.jar:${local.repository}/commons-logging/commons-logging/1.0/commons-logging-1.0.jar:${local.repository}/org/jlink/share/0.0.1-SNAPSHOT/share-0.0.1-SNAPSHOT.jar:${local.repository}/xerces/xercesImpl/2.2.1/xercesImpl-2.2.1.jar:${local.repository}/xerces/xerces/1.2.3/xerces-1.2.3.jar:${local.repository}/xalan/xalan/2.7.0/xalan-2.7.0.jar:${local.repository}/yan/yan/5.0/yan-5.0.jar:${local.repository}/xerces/xmlParserAPIs/2.0.2/xmlParserAPIs-2.0.2.jar:${local.repository}/jdom/jdom/b9/jdom-b9.jar:${local.repository}/javax/servlet/servlet-api/2.2/servlet-api-2.2.jar:${local.repository}/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:${local.repository}/commons-beanutils/commons-beanutils-core/1.7.0/commons-beanutils-core-1.7.0.jar:${local.repository}/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar:${local.repository}/geronimo-spec/geronimo-spec-jta/1.0-M1/geronimo-spec-jta-1.0-M1.jar:${local.repository}/org/slf4j/slf4j-log4j12/1.0/slf4j-log4j12-1.0.jar:${local.repository}/jsr170/jcr/1.0/jcr-1.0.jar</classpath>
+ <built-to>target/test-classes</built-to>
+ <source-level>1.5</source-level>
+ </compilation-unit>
+ </java-data>
+ </configuration>
+</project>
Property changes on: trunk/server/src
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/server/src/main
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/server/src/main/java
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/server/src/main/java/org
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/server/src/main/java/org/jlink
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Modified: trunk/server/src/main/java/org/jlink/ServerNetwork.java
===================================================================
--- trunk/server/src/main/java/org/jlink/ServerNetwork.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/src/main/java/org/jlink/ServerNetwork.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -28,7 +28,6 @@
import java.io.IOException;
import org.jlink.Options;
//import::own::net
-import org.jlink.server.net.NetworkBackend;
import org.jlink.net.ConnectionHandler;
import org.jlink.net.ConnectionListener;
import org.jlink.net.Message;
@@ -62,11 +61,13 @@
ret.log.debug("Network::createParts()");
try {
ret.log.debug("trying to listen on Port: " + Options.NETWORK_LISTEN_PORT);
- ret.mod_back = NetworkBackend.listen(ret, Options.NETWORK_LISTEN_PORT);
+ //TODO: something to put here
ret.log.debug("ok we're listening");
- } catch (IOException ex) {
- ret.log.error("Cannot listen", ex);
- throw new RuntimeException("cannot listen", ex);
+ //} catch (IOException ex) {
+ // ret.log.error("Cannot listen", ex);
+ //throw new RuntimeException("cannot listen", ex);
+ } finally {
+
}
@@ -152,7 +153,6 @@
//Composite//
/////////////
private ServerCore mod_core = null;
- private NetworkBackend mod_back = null;
private Logger log = null;
////////////////////
Property changes on: trunk/server/src/main/java/org/jlink/server
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Added: trunk/server/src/main/java/org/jlink/server/Core.java
===================================================================
--- trunk/server/src/main/java/org/jlink/server/Core.java (rev 0)
+++ trunk/server/src/main/java/org/jlink/server/Core.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -0,0 +1,124 @@
+/*
+ * Core.java
+ *
+ * Created on 8. Oktober 2006, 18:30
+ *
+ * JLink: An Introversion Uplink Clone with multiplayer support.
+ * Copyright (C) 2006 Tassilo Schweyer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.jlink.server;
+
+//import::own
+//import::own::server
+import org.jlink.server.Main;
+import org.jlink.server.jmx.JMXAgent;
+//import::own::server::libdb
+import org.jlink.server.libdb.StorageManager;
+import org.jlink.server.libdb.StorageManagerJMX;
+//import::sys
+//import::sys::commons-configuration
+import org.apache.commons.configuration.Configuration;
+//import::sys::log4j
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author welterde
+ */
+public class Core implements Runnable {
+
+ /** Creates a new instance of Core */
+ public Core() {
+ log.debug("Core created");
+ }
+
+ public void init(Configuration conf) {
+ log.info("initing Core");
+ if(conf == null)
+ throw new NullPointerException("the config may not be null");
+ //init StorageManager
+ {
+ try {
+ log.info("creating StorageManager");
+ Configuration comp_conf = conf.subset("server.db");
+ this.app_storage = new StorageManager();
+ this.app_storage.init(comp_conf);
+ this.jmx_storage = new StorageManagerJMX(this.app_storage);
+ JMXAgent.getDefault().register("org.jlink.server.libdb:type=StorageManagerJMX", this.jmx_storage);
+ log.debug("done");
+ } catch(Exception exc) {
+ log.error("creation failed, ignoring(wish me luck)", exc);
+ //TODO: split problems into StorageManger and JMX
+ }
+ }
+ }
+
+
+
+ public void start() {
+ log.info("starting core...");
+ this.thread.start();
+ log.debug("core started");
+ }
+ public void run() {
+ log.debug("waiting for lock to run");
+ synchronized(runLock) {
+ log.debug("got lock");
+ while(true) {
+ if(this.doStop)
+ break;
+ try {
+ Thread.sleep(10);
+ } catch(Exception exc) {
+ log.error("unknown Exception cought", exc);
+ } catch(Error err) {
+ log.error("unknown Error caught", err);
+ } finally {
+
+ }
+ }
+ }
+ }
+ public void stop() {
+ this.doStop = true;
+ }
+ public void shutdown() {
+ stop();
+
+ }
+
+
+
+
+ //Composite getter
+ public StorageManager getStorage() {
+ return this.app_storage;
+ }
+
+
+ private Logger log = Logger.getLogger(Core.class);
+ private Thread thread = new Thread(this);
+ private Object runLock = "lock009ij";
+
+ private boolean doStop = false;
+
+ //Composite stuff
+ public StorageManager app_storage = null;
+ public StorageManagerJMX jmx_storage = null;
+
+}
Modified: trunk/server/src/main/java/org/jlink/server/Main.java
===================================================================
--- trunk/server/src/main/java/org/jlink/server/Main.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/src/main/java/org/jlink/server/Main.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -170,6 +170,7 @@
public static void shutdown() {
log.info("shutdown requested");
+ confSave();
//TODO: shutdown everything
log.info("shutdown complete, exiting");
System.exit(0);
@@ -188,11 +189,18 @@
}
}
public static void confReload() {
+ log.info("hit unimplemented method");
//TODO: write this
}
+ //Core Access
+ public static Core getCore() {
+ return app_core;
+ }
+
private static Configuration conf = null;
private static XMLConfiguration xconf = null;
private static Logger log = null;
+ private static Core app_core = null;
}
Modified: trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java
===================================================================
--- trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/src/main/java/org/jlink/server/jmx/JMXAgent.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -34,6 +34,8 @@
import javax.management.ObjectName;
import javax.management.MBeanServer;
import java.lang.management.ManagementFactory;
+import javax.management.OperationsException;
+import javax.management.MBeanRegistrationException;
//import::sys::log4j
import org.apache.log4j.Logger;
@@ -56,23 +58,23 @@
this.mbs.registerMBean(obj, name);
log.debug("done");
}
-// {
-// log.debug("registering StorageManagerJMX");
-// ObjectName name = new ObjectName("org.jlink.server.libdb:type=StorageManagerJMX");
-// StorageManagerJMX obj = new StorageManagerJMX();
-// this.mbs.registerMBean(obj, name);
-// log.debug("done");
-// }
- //Core::JMX::add()
- //Database::JMX::add()
+ }
+
+ public void register(String name, Object obj) {
+ //TODO: (low) add check for logging level
+ log.debug("registering JMX object name: " + name);
+ try {
+ ObjectName oname = new ObjectName(name);
+ this.mbs.registerMBean(obj, oname);
+ log.debug("registration complete");
+ } catch(OperationsException exc) {
+ log.warn("couldnt register JMX object ", exc);
+ } catch(MBeanRegistrationException exc) {
+ log.warn("couldnt register JMX object ", exc);
+ }
- //Frontend::JMX::add()
-
- //Network::JMX::add()
-
}
-
/**
* Returns an agent singleton.
*/
Deleted: trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java
===================================================================
--- trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/src/main/java/org/jlink/server/net/NetworkBackend.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,145 +0,0 @@
-/*
- * NetworkBackend.java
- *
- * Created on 2. März 2006, 22:45
- *
- * JLink: An Introversion Uplink Clone with multiplayer support.
- * Copyright (C) 2006 Tassilo Schweyer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.jlink.server.net;
-
-//import
-//import::own
-import org.jlink.Options;
-import org.jlink.ServerNetwork;
-//import::own::net
-import org.jlink.net.ConnectionHandler;
-import org.jlink.net.Message;
-//import::own::net::msgs
-import org.jlink.net.msgs.ConnectionStarting;
-import org.jlink.net.msgs.ConnectionAccepted;
-//import::sys
-import org.apache.log4j.Logger;
-import org.apache.log4j.NDC;
-//import::sys::io
-import java.io.IOException;
-//import::sys::net
-import java.net.Socket;
-import java.net.ServerSocket;
-
-
-/**
- *
- * @author tassilo
- */
-public class NetworkBackend {
-
- public static NetworkBackend listen(ServerNetwork net, int port) throws IOException {
- NetworkBackend ret = null;
- ret = new NetworkBackend();
- ret.log = Logger.getLogger("jlink.net.backend");
- ret.log.info("NetworkBackend::listen(" + port + ")");
-
- ret.mod_net = net;
- //creating Socket
- ret.log.debug("ServerSocket::create(port)");
- ret.conSock = new ServerSocket(port);
- ret.log.debug("SS::create(port)=> true");
-
- //starting Thread
- final NetworkBackend t = ret;
- ret.thread = new Thread() {
- public void run() {
- t.runNB();
- }
- };
- ret.thread.setDaemon(true);
- ret.thread.setName("network-runner");
- ret.thread.start();
-
- return ret;
- }
-
-
- private NetworkBackend() {
- }
-
-
- private void runNB() {
- //wait some time to get the creator time to start
- try {
- Thread.sleep(2000);
- } catch(Exception e) {
- //should not happen, ignore it
- }
- int c_err = Options.NETWORKBACK_C_ERR;
- try {
- while(true) {
- try {
- this.run();
- c_err++;
- if(c_err > (3 * Options.NETWORKBACK_C_ERR))
- c_err = Options.NETWORKBACK_C_ERR;
- } catch(Exception e) {
- log.error("NetworkBackend::catchException", e);
- c_err--;
- if(c_err < 0) {
- log.fatal("Error Count got too big => self-kill");
- throw new Error("c_err < 0");
- }
- }
- }
- } catch(Throwable t) {
- log.debug("Thread ended with Throwable", t);
- this.cleanup();
- }
- }
- private void run() throws Exception {
- NDC.clear();
- log.info("waiting for connection");
- Socket cur = this.conSock.accept();
- this.conCount++;
- NDC.push("" + this.conCount);
- log.info("got Connection from " + cur.getInetAddress());
- NDC.push("init");
- log.debug("creating ConnectionHandler");
- ConnectionHandler h = ConnectionHandler.connect(cur);
- log.debug("waiting for ConnectionStart");
- Message in0 = h.reciveMessage();
- log.debug("got Message, answering");
- h.sendMessage(new ConnectionAccepted());
- log.debug("registering Connection");
- this.mod_net.conRegister(conCount, h);
-
- NDC.pop();
- //put the connection somewhere
- NDC.pop();
- }
- private void cleanup() {
-
- }
-
- ////////////////////////
- ///internal Variables///
- ////////////////////////
- private ServerSocket conSock = null;
- private int conCount = 0;
- private Logger log = null;
- private Thread thread = null;
- private ServerNetwork mod_net = null;
-}
Modified: trunk/server/src/site/site.xml
===================================================================
--- trunk/server/src/site/site.xml 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/server/src/site/site.xml 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="JLink Client">
+<project name="JLink Server">
<bannerRight>
<src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src>
</bannerRight>
Property changes on: trunk/share
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/share/nbproject
___________________________________________________________________
Name: svn:ignore
+ private
Property changes on: trunk/share/src
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/share/src/main
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Property changes on: trunk/share/src/main/assembly
___________________________________________________________________
Name: svn:ignore
+ .DS_Store
Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/LLConfiguration.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -36,5 +36,8 @@
public String getDescription(int id, Locale l);
public String getDescription(int id);
- public void setValue(int id, String val);
+ public void setValue(int id, String val) throws LLConfigurationException;
+
+ //operations
+ public void reset();
}
Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/LLConfigurationException.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -43,4 +43,8 @@
public LLConfigurationException(String msg) {
super(msg);
}
+
+ public LLConfigurationException(String msg, Throwable t) {
+ super(msg, t);
+ }
}
Modified: trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/LLConnector.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -34,7 +34,9 @@
public void recive(LLEvent[] evts) throws LLConnectionException;
public boolean isAlive();
- public void close() throws LLConnectionException;
- public long ping() throws LLConnectionException;
+ public int ping() throws LLConnectionException;
+
+ public void connect() throws LLConnectionException;
+ public void disconnect() throws LLConnectionException;
}
Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConfiguration.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -25,6 +25,7 @@
import java.util.Locale;
import org.jlink.net.ll.LLConfiguration;
+import org.jlink.net.ll.LLConfigurationException;
/**
*
@@ -37,45 +38,113 @@
}
public String[] getNames() {
- return this.dat_names;
+ return null;
}
public String getDefault(int id) {
- return this.dat_default[id];
+ //bypass, if id is non valid
+ if(id > 1 || id < 0)
+ return null;
+ //The result, which will be returned later
+ String ret = null;
+ //get the right default value
+ if(id == 0)
+ ret = this.prop_hostname_default;
+ else
+ ret = this.prop_hostport_default;
+ //return it
+ return ret;
}
public String getValue(int id) {
- return this.dat_values[id];
+ //NOTE: C&P from getDefault(int id)
+ // without the default thingy
+ //bypass, if id is non valid
+ if(id > 1 || id < 0)
+ return null;
+ //The result, which will be returned later
+ String ret = null;
+ //get the right default value
+ if(id == 0)
+ ret = this.prop_hostname;
+ else
+ ret = this.prop_hostport;
+ //return it
+ return ret;
}
- public String getDescription(int id, final Locale l) {
+ public String getDescription(int id, Locale l) {
+ //Dirty-Hack: the Local is ignored, cause there actually no translations
return this.getDescription(id);
}
public String getDescription(int id) {
- return this.dat_descs[id];
+ //NOTE: C&P from getDefault(int id)
+ // with the descriptons
+ //bypass, if id is non valid
+ if(id > 1 || id < 0)
+ return null;
+ //The result, which will be returned later
+ String ret = null;
+ //get the right default value
+ if(id == 0)
+ ret = this.prop_hostname_desc;
+ else
+ ret = this.prop_hostport_desc;
+ //return it
+ return ret;
}
- public void setValue(int id, String val) {
- this.dat_values[id] = val;
+ public void setValue(int id, String val) throws LLConfigurationException {
+ //bypass, if id is non valid
+ if(id > 1 || id < 0)
+ return;
+ //check for non-null value
+ if(val == null)
+ throw new NullPointerException("Value may not be null");
+ //validate & set the value
+ if(id == 0) {
+ //check, if the hostname has zero-chars
+ if(val.equals(""))
+ throw new LLConfigurationException("The hostname may not be zero-lengthted");
+ this.prop_hostname = val;
+ } else {
+ //cast into an number
+ int p = 0;
+ try {
+ p = Integer.parseInt(val);
+ } catch(NumberFormatException exc) {
+ new LLConfigurationException("The Port may only be an number", exc);
+ }
+ //check port boundary
+ if(p < 1)
+ throw new LLConfigurationException("The port may not be smaller than 1");
+ if(p > 65536)
+ throw new LLConfigurationException("The port may not be bigger than 65536");
+ //set the value
+ this.prop_hostport = val;
+ }
}
+
+ public void reset() {
+ this.prop_hostname = this.prop_hostname_default;
+ this.prop_hostport = this.prop_hostport_default;
+ }
- private String[] dat_names = new String[] {
- "Host",
- "Port",
- "compress"
- };
- private String[] dat_default = new String[] {
- "localhost",
- "4236",
- "true"
- };
- private String[] dat_values = new String[3];
- private String[] dat_descs = new String[] {
- "The Hostname of the remote host",
- "The Port of the remote host",
- "Should the Data be compressed(true/false)"
- };
+ //////////////
+ //Properties
+ //////////////
+
+ //ID:0
+ private String prop_hostname = "localhost";
+ private String prop_hostname_default = "localhost";
+ private String prop_hostname_name = "Hostname";
+ private String prop_hostname_desc = "The name of the host, you want to connect to";
+ //ID:1
+ private String prop_hostport = "3742";
+ private String prop_hostport_default = "3742";
+ private String prop_hostport_name = "Port";
+ private String prop_hostport_desc = "The port of the host, you want to connect to";
}
Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLConnector.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -36,31 +36,57 @@
public class XMLConnector implements LLConnector {
/** Creates a new instance of XMLConnector */
- public XMLConnector(LLConfiguration conf) throws LLConfigurationException {
+ XMLConnector(String host, int port) {
+ //really basic checkings, should never happen, if so then bug
+ if(host == null)
+ throw new NullPointerException();
+ this.config_host = host;
+ this.config_port = port;
}
-
+
public void send(LLEvent evt) throws LLConnectionException {
}
-
+
public void send(LLEvent[] evts) throws LLConnectionException {
}
-
+
public LLEvent recive() throws LLConnectionException {
return null;
}
-
+
public void recive(LLEvent[] evts) throws LLConnectionException {
}
-
+
public boolean isAlive() {
return true;
}
+
+ public int ping() throws LLConnectionException {
+ return 0;
+ }
- public void close() throws LLConnectionException {
+ public void connect() throws LLConnectionException {
+ //bypass, if connect already has been called
+ if(this.status_connected)
+ return;
}
- public long ping() throws LLConnectionException {
- return 0L;
+ public void disconnect() throws LLConnectionException {
+ //bypass, if connect has never been called
+ if(!this.status_connected)
+ return;
+ //try to ping remote host, if there is an Exception
}
+
+
+
+
+ private boolean status_connected = false;//means the own state, not if it is really connect
+
+ //////////////////
+ //Configuration
+ //////////////////
+ private String config_host = "";
+ private int config_port = 0;
}
Modified: trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java
===================================================================
--- trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/main/java/org/jlink/net/ll/xml/XMLFactory.java 2006-10-24 16:47:32 UTC (rev 17)
@@ -40,17 +40,39 @@
}
public LLConfiguration getConfig() {
- return new XMLConfiguration();
+ //if there isnt already an config, create it
+ if(this.conf == null)
+ this.conf = new XMLConfiguration();
+ return this.conf;
}
public void setConfig(LLConfiguration conf) throws LLConfigurationException {
+ //first check for not null
+ if(conf == null)
+ throw new NullPointerException("config may not be null");
+ XMLConfiguration xconf = null;
+ //try to cast to it into an XMLConfiguration
+ try {
+ xconf = (XMLConfiguration) conf;
+ } catch(ClassCastException exc) {
+ //if this happens, someone is trying something nasty with us
+ throw new LLConfigurationException("didnt get an XMLConfiguration", exc);
+ }
+ this.conf = xconf;
}
public void resetConfig() {
+ //bypass, if there is no config doesnt exist
+ if(this.conf == null)
+ return;
+ this.conf.reset();
}
- public LLConnector create() throws LLConnectionException, LLConfigurationException {
+ public LLConnector create() throws LLConfigurationException {
return null;
}
+
+ private XMLConfiguration conf = null;
+
}
Modified: trunk/share/src/site/site.xml
===================================================================
--- trunk/share/src/site/site.xml 2006-10-09 17:49:22 UTC (rev 16)
+++ trunk/share/src/site/site.xml 2006-10-24 16:47:32 UTC (rev 17)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<project name="JLink Client">
+<project name="JLink Share">
<bannerRight>
<src>http://sflogo.sourceforge.net/sflogo.php?group_id=162264&type=3</src>
</bannerRight>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|