Skip to content

Commit e0b7f60

Browse files
committed
Merge pull request #122 from scouter-project/master
merge for release
2 parents 2241f26 + 29817d3 commit e0b7f60

File tree

15 files changed

+32
-9
lines changed

15 files changed

+32
-9
lines changed

scouter.agent.host/src/scouter/agent/Configure.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ public boolean saveText(String text) {
335335
File file = getPropertyFile();
336336
OutputStream out = null;
337337
try {
338+
if (file.getParentFile().exists() == false) {
339+
file.getParentFile().mkdirs();
340+
}
338341
out = new FileOutputStream(file);
339342
out.write(text.getBytes());
340343
return true;

scouter.agent.java/src/scouter/agent/Configure.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ public boolean saveText(String text) {
652652
File file = getPropertyFile();
653653
OutputStream out = null;
654654
try {
655+
if (file.getParentFile().exists() == false) {
656+
file.getParentFile().mkdirs();
657+
}
655658
out = new FileOutputStream(file);
656659
out.write(text.getBytes());
657660
return true;

scouter.agent.java/src/scouter/agent/asm/JDBCPreparedStatementASM.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class JDBCPreparedStatementASM implements IASM, Opcodes {
3939
public final HashSet<String> noField = new HashSet<String>();
4040
public JDBCPreparedStatementASM() {
4141
target.add("org.mariadb.jdbc.MariaDbClientPreparedStatement");
42+
target.add("org.mariadb.jdbc.MariaDbServerPreparedStatement");
4243
target.add("org/mariadb/jdbc/MySQLPreparedStatement");
4344
target.add("oracle/jdbc/driver/OraclePreparedStatement");
4445
target.add("org/postgresql/jdbc2/AbstractJdbc2Statement");
@@ -54,7 +55,7 @@ public JDBCPreparedStatementASM() {
5455
target.add("cubrid/jdbc/driver/CUBRIDPreparedStatement");
5556

5657
// @skyworker - MySQL ServerPreparedStatement는 특별히 필드를 추가하지 않음
57-
noField.add("org.mariadb.jdbc.MariaDbClientPreparedStatement");
58+
noField.add("org.mariadb.jdbc.MariaDbServerPreparedStatement");
5859
noField.add("com/mysql/jdbc/ServerPreparedStatement");
5960
noField.add("jdbc/FakePreparedStatement2");
6061
}

scouter.agent.java/src/scouter/agent/asm/JDBCResultSetASM.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public JDBCResultSetASM() {
4242
target.add("oracle/jdbc/driver/SensitiveScrollableResultSet");
4343
target.add("org/hsqldb/jdbc/JDBCResultSet");
4444
target.add("cubrid/jdbc/driver/CUBRIDResultSet");
45+
target.add("org.mariadb.jdbc.MariaDbResultSet");
4546
}
4647

4748
public ClassVisitor transform(ClassVisitor cv, String className, ClassDesc classDesc) {

scouter.agent.java/src/scouter/agent/asm/JDBCStatementASM.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
public class JDBCStatementASM implements IASM, Opcodes {
3737
public final HashSet<String> target = HookingSet.getHookingClassSet(Configure.getInstance().hook_jdbc_stmt_classes);
3838
public JDBCStatementASM() {
39-
target.add("org.mariadb.jdbc.MariaDbStatement");
39+
target.add("org/mariadb/jdbc/MariaDbStatement");
4040
target.add("org/mariadb/jdbc/MySQLStatement");
4141
target.add("oracle/jdbc/driver/OracleStatement");
4242
target.add("com/mysql/jdbc/StatementImpl");

scouter.deploy/build-server.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@
140140
<copy todir="./out/package/scouter/server">
141141
<fileset dir="../scouter.server/scripts"/>
142142
</copy>
143+
<fixcrlf srcdir="../scouter.server/scripts" includes="**/*.sh"
144+
eol="lf"
145+
eof="remove"
146+
/>
143147
<copy todir="./out/package/scouter/server/conf">
144148
<fileset dir="../scouter.server/conf"/>
145149
</copy>

scouter.deploy/build.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
<property name="deploy-dir" value="./out/package"/>
55
<property name="outpack-dir" value="./out"/>
66

7-
<property name="VERSION" value="0.4.7"/>
7+
<property name="VERSION" value="0.4.8"/>
88

99

1010
<target name="packing">
1111
<mkdir dir="${outpack-dir}"/>
1212
<tar destfile="${outpack-dir}/${outpack-file}">
13+
<tarfileset dir="${deploy-dir}" mode="755" >
14+
<include name="**/*.sh"/>
15+
</tarfileset>
1316
<tarfileset dir="${deploy-dir}">
1417
<include name="**/*"/>
18+
<exclude name="**/*.sh"/>
1519
</tarfileset>
1620
</tar>
1721
<gzip src="${outpack-dir}/${outpack-file}" destfile="${outpack-dir}/${outpack-file}.gz"/>

scouter.server/scripts/sample1.startcon.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
. $(dirname $0)/env.sh
44

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

scouter.server/scripts/sample1.startup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ sleep 1
66
tail -100 nohup.out
77
echo "Scouter server launching..."
88
echo "See the nohup.out."
9+

scouter.server/scripts/sample2.readlink.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ TARGET_FILE=`basename $TARGET_FILE`
88
# Iterate down a (possible) chain of symlinks
99
while [ -L "$TARGET_FILE" ]
1010
do
11-
TARGET_FILE=`readlink $TARGET_FILE`
12-
cd `dirname $TARGET_FILE`
13-
TARGET_FILE=`basename $TARGET_FILE`
11+
TARGET_FILE=`readlink $TARGET_FILE`
12+
cd `dirname $TARGET_FILE`
13+
TARGET_FILE=`basename $TARGET_FILE`
1414
done
1515

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

0 commit comments

Comments
 (0)