Skip to content

Commit

Permalink
Merge pull request scouter-project#122 from scouter-project/master
Browse files Browse the repository at this point in the history
merge for release
  • Loading branch information
bill23-kim committed Mar 7, 2016
2 parents 2241f26 + 29817d3 commit e0b7f60
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 9 deletions.
3 changes: 3 additions & 0 deletions scouter.agent.host/src/scouter/agent/Configure.java
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ public boolean saveText(String text) {
File file = getPropertyFile();
OutputStream out = null;
try {
if (file.getParentFile().exists() == false) {
file.getParentFile().mkdirs();
}
out = new FileOutputStream(file);
out.write(text.getBytes());
return true;
Expand Down
3 changes: 3 additions & 0 deletions scouter.agent.java/src/scouter/agent/Configure.java
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ public boolean saveText(String text) {
File file = getPropertyFile();
OutputStream out = null;
try {
if (file.getParentFile().exists() == false) {
file.getParentFile().mkdirs();
}
out = new FileOutputStream(file);
out.write(text.getBytes());
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class JDBCPreparedStatementASM implements IASM, Opcodes {
public final HashSet<String> noField = new HashSet<String>();
public JDBCPreparedStatementASM() {
target.add("org.mariadb.jdbc.MariaDbClientPreparedStatement");
target.add("org.mariadb.jdbc.MariaDbServerPreparedStatement");
target.add("org/mariadb/jdbc/MySQLPreparedStatement");
target.add("oracle/jdbc/driver/OraclePreparedStatement");
target.add("org/postgresql/jdbc2/AbstractJdbc2Statement");
Expand All @@ -54,7 +55,7 @@ public JDBCPreparedStatementASM() {
target.add("cubrid/jdbc/driver/CUBRIDPreparedStatement");

// @skyworker - MySQL ServerPreparedStatement는 특별히 필드를 추가하지 않음
noField.add("org.mariadb.jdbc.MariaDbClientPreparedStatement");
noField.add("org.mariadb.jdbc.MariaDbServerPreparedStatement");
noField.add("com/mysql/jdbc/ServerPreparedStatement");
noField.add("jdbc/FakePreparedStatement2");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public JDBCResultSetASM() {
target.add("oracle/jdbc/driver/SensitiveScrollableResultSet");
target.add("org/hsqldb/jdbc/JDBCResultSet");
target.add("cubrid/jdbc/driver/CUBRIDResultSet");
target.add("org.mariadb.jdbc.MariaDbResultSet");
}

public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class JDBCStatementASM implements IASM, Opcodes {
public final HashSet<String> target = HookingSet.getHookingClassSet(Configure.getInstance().hook_jdbc_stmt_classes);
public JDBCStatementASM() {
target.add("org.mariadb.jdbc.MariaDbStatement");
target.add("org/mariadb/jdbc/MariaDbStatement");
target.add("org/mariadb/jdbc/MySQLStatement");
target.add("oracle/jdbc/driver/OracleStatement");
target.add("com/mysql/jdbc/StatementImpl");
Expand Down
4 changes: 4 additions & 0 deletions scouter.deploy/build-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
<copy todir="./out/package/scouter/server">
<fileset dir="../scouter.server/scripts"/>
</copy>
<fixcrlf srcdir="../scouter.server/scripts" includes="**/*.sh"
eol="lf"
eof="remove"
/>
<copy todir="./out/package/scouter/server/conf">
<fileset dir="../scouter.server/conf"/>
</copy>
Expand Down
6 changes: 5 additions & 1 deletion scouter.deploy/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<property name="deploy-dir" value="./out/package"/>
<property name="outpack-dir" value="./out"/>

<property name="VERSION" value="0.4.7"/>
<property name="VERSION" value="0.4.8"/>


<target name="packing">
<mkdir dir="${outpack-dir}"/>
<tar destfile="${outpack-dir}/${outpack-file}">
<tarfileset dir="${deploy-dir}" mode="755" >
<include name="**/*.sh"/>
</tarfileset>
<tarfileset dir="${deploy-dir}">
<include name="**/*"/>
<exclude name="**/*.sh"/>
</tarfileset>
</tar>
<gzip src="${outpack-dir}/${outpack-file}" destfile="${outpack-dir}/${outpack-file}.gz"/>
Expand Down
1 change: 1 addition & 0 deletions scouter.server/scripts/sample1.startcon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
. $(dirname $0)/env.sh

java -Xmx512m -classpath "$TUNAHOME/boot.jar" scouter.boot.Boot "$TUNAHOME/lib" -console

1 change: 1 addition & 0 deletions scouter.server/scripts/sample1.startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ sleep 1
tail -100 nohup.out
echo "Scouter server launching..."
echo "See the nohup.out."

7 changes: 4 additions & 3 deletions scouter.server/scripts/sample2.readlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ TARGET_FILE=`basename $TARGET_FILE`
# Iterate down a (possible) chain of symlinks
while [ -L "$TARGET_FILE" ]
do
TARGET_FILE=`readlink $TARGET_FILE`
cd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`
TARGET_FILE=`readlink $TARGET_FILE`
cd `dirname $TARGET_FILE`
TARGET_FILE=`basename $TARGET_FILE`
done

# Compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
PHYS_DIR=`pwd -P`
RESULT=$PHYS_DIR/$TARGET_FILE
echo $RESULT

1 change: 1 addition & 0 deletions scouter.server/scripts/sample2.startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ nohup java $JAVAOPTS -classpath "$TUNAHOME/boot.jar" scouter.boot.Boot "$TUNAHOM

echo "Scouter server launching..."
echo "See the nohup.out."

1 change: 1 addition & 0 deletions scouter.server/scripts/sample2.stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
. $(dirname $0)/env.sh

rm -f "$TUNAHOME/*.scouter"

1 change: 1 addition & 0 deletions scouter.server/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
nohup java -Xmx512m -classpath ./boot.jar scouter.boot.Boot ./lib > nohup.out &
sleep 1
tail -100 nohup.out

2 changes: 1 addition & 1 deletion scouter.server/scripts/stop.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rm -f *.scouter
rm -f *.scouter
5 changes: 3 additions & 2 deletions scouter.server/src/scouter/server/Configure.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,9 @@ public boolean saveText(String text) {
File file = getPropertyFile();
OutputStream out = null;
try {
File parentDir = file.getParentFile();
parentDir.mkdirs();
if (file.getParentFile().exists() == false) {
file.getParentFile().mkdirs();
}
out = new FileOutputStream(file);
out.write(text.getBytes());
return true;
Expand Down

0 comments on commit e0b7f60

Please sign in to comment.