Skip to content

Commit

Permalink
Change the package name and version
Browse files Browse the repository at this point in the history
  • Loading branch information
ascrutae committed Nov 19, 2018
1 parent 9fdd260 commit 912e2c9
Show file tree
Hide file tree
Showing 24 changed files with 97 additions and 76 deletions.
2 changes: 1 addition & 1 deletion oracle-10.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

/**
* Constants variables
*
* @author zhang xin
*/
public final class Constants {
public static final String STATEMENT_INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.jdbc.oracle.StatementExecuteMethodsInterceptor";
public static final String STATEMENT_INTERCEPT_CLASS = "io.skywalking.apm.plugin.jdbc.oracle.StatementExecuteMethodsInterceptor";

public static final String PREPARED_STATEMENT_INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.jdbc.oracle.PreparedStatementExecuteMethodsInterceptor";
public static final String PREPARED_STATEMENT_INTERCEPT_CLASS = "io.skywalking.apm.plugin.jdbc.oracle.PreparedStatementExecuteMethodsInterceptor";
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle;
package io.skywalking.apm.plugin.jdbc.oracle;

import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle.define;
package io.skywalking.apm.plugin.jdbc.oracle.define;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -34,19 +34,19 @@
* {@link ConnectionInstrumentation} define that the oracle plugin intercept the following methods that the class which
* extend oracle.jdbc.driver.PhysicalConnection
*
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.oracle.CreatePreparedStatementInterceptor</code>
* 2. Enhance <code>prepareCall</code> by <code>org.apache.skywalking.apm.plugin.jdbc.oracle.CreateCallableInterceptor</code>
* 3. Enhance <code>createStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.oracle.CreateStatementInterceptor</code>
* 1. Enhance <code>prepareStatement</code> by <code>io.skywalking.apm.plugin.jdbc.oracle.CreatePreparedStatementInterceptor</code>
* 2. Enhance <code>prepareCall</code> by <code>io.skywalking.apm.plugin.jdbc.oracle.CreateCallableInterceptor</code>
* 3. Enhance <code>createStatement</code> by <code>io.skywalking.apm.plugin.jdbc.oracle.CreateStatementInterceptor</code>
* 4. Enhance <code>commit, rollback, close, releaseSavepoint</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.ConnectionServiceMethodInterceptor</code>
*
* @author zhangxin
*/
public class ConnectionInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

public static final String ENHANCE_CLASS = "oracle.jdbc.driver.PhysicalConnection";
public static final String PREPARED_STATEMENT_INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.jdbc.oracle.CreatePreparedStatementInterceptor";
public static final String CALLABLE_INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.jdbc.oracle.CreateCallableInterceptor";
public static final String CREATE_STATEMENT_INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.jdbc.oracle.CreateStatementInterceptor";
public static final String PREPARED_STATEMENT_INTERCEPT_CLASS = "io.skywalking.apm.plugin.jdbc.oracle.CreatePreparedStatementInterceptor";
public static final String CALLABLE_INTERCEPT_CLASS = "io.skywalking.apm.plugin.jdbc.oracle.CreateCallableInterceptor";
public static final String CREATE_STATEMENT_INTERCEPT_CLASS = "io.skywalking.apm.plugin.jdbc.oracle.CreateStatementInterceptor";
public static final String T4C_CONNECTION_CLASS = "oracle.jdbc.driver.T4CConnection";

@Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/


package org.apache.skywalking.apm.plugin.jdbc.oracle.define;
package io.skywalking.apm.plugin.jdbc.oracle.define;

import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle.define;
package io.skywalking.apm.plugin.jdbc.oracle.define;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -26,8 +26,8 @@
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch;

import static io.skywalking.apm.plugin.jdbc.oracle.Constants.PREPARED_STATEMENT_INTERCEPT_CLASS;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static org.apache.skywalking.apm.plugin.jdbc.oracle.Constants.PREPARED_STATEMENT_INTERCEPT_CLASS;

public class OracleCallableInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle.define;
package io.skywalking.apm.plugin.jdbc.oracle.define;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -26,41 +26,47 @@
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch;

import static io.skywalking.apm.plugin.jdbc.oracle.Constants.PREPARED_STATEMENT_INTERCEPT_CLASS;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static org.apache.skywalking.apm.plugin.jdbc.oracle.Constants.PREPARED_STATEMENT_INTERCEPT_CLASS;

public class OraclePrepareStatementInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

public static final String ENHANCE_CLASS = "oracle.jdbc.driver.OraclePreparedStatement";
public static final String PREPARED_STATEMENT_WRAPPER_CLASS = "oracle.jdbc.driver.OraclePreparedStatementWrapper";
public static final String T4C_PREPARED_STATEMENT_CLASS = "oracle.jdbc.driver.T4CPreparedStatement";

@Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
@Override
protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
return new ConstructorInterceptPoint[0];
}

@Override protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
return new InstanceMethodsInterceptPoint[] {
new InstanceMethodsInterceptPoint() {
@Override public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("execute")
.or(named("executeQuery"))
.or(named("executeUpdate"))
.or(named("executeLargeUpdate"));
}
@Override
protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
return new InstanceMethodsInterceptPoint[]{
new InstanceMethodsInterceptPoint() {
@Override
public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("execute")
.or(named("executeQuery"))
.or(named("executeUpdate"))
.or(named("executeLargeUpdate"));
}

@Override public String getMethodsInterceptor() {
return PREPARED_STATEMENT_INTERCEPT_CLASS;
}
@Override
public String getMethodsInterceptor() {
return PREPARED_STATEMENT_INTERCEPT_CLASS;
}

@Override public boolean isOverrideArgs() {
return false;
@Override
public boolean isOverrideArgs() {
return false;
}
}
}
};
}

@Override protected ClassMatch enhanceClass() {
@Override
protected ClassMatch enhanceClass() {
return MultiClassNameMatch.byMultiClassMatch(ENHANCE_CLASS, PREPARED_STATEMENT_WRAPPER_CLASS, T4C_PREPARED_STATEMENT_CLASS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.jdbc.oracle.define;
package io.skywalking.apm.plugin.jdbc.oracle.define;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -26,44 +26,50 @@
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
import org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch;

import static io.skywalking.apm.plugin.jdbc.oracle.Constants.STATEMENT_INTERCEPT_CLASS;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static org.apache.skywalking.apm.plugin.jdbc.oracle.Constants.STATEMENT_INTERCEPT_CLASS;

public class OracleStatementInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

public static final String ENHANCE_CLASS = "oracle.jdbc.driver.OracleStatement";
public static final String STATEMENT_WRAPPER_CLASS = "oracle.jdbc.driver.OracleStatementWrapper";
public static final String T4C_STATEMENT_CLASS = "oracle.jdbc.driver.T4CStatement";

@Override protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
@Override
protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
return new ConstructorInterceptPoint[0];
}

@Override protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
return new InstanceMethodsInterceptPoint[] {
new InstanceMethodsInterceptPoint() {
@Override public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("execute")
.or(named("executeQuery"))
.or(named("executeUpdate"))
.or(named("executeLargeUpdate"))
.or(named("executeBatchInternal"))
.or(named("executeUpdateInternal"))
.or(named("executeQuery"));
}
@Override
protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
return new InstanceMethodsInterceptPoint[]{
new InstanceMethodsInterceptPoint() {
@Override
public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("execute")
.or(named("executeQuery"))
.or(named("executeUpdate"))
.or(named("executeLargeUpdate"))
.or(named("executeBatchInternal"))
.or(named("executeUpdateInternal"))
.or(named("executeQuery"));
}

@Override public String getMethodsInterceptor() {
return STATEMENT_INTERCEPT_CLASS;
}
@Override
public String getMethodsInterceptor() {
return STATEMENT_INTERCEPT_CLASS;
}

@Override public boolean isOverrideArgs() {
return false;
@Override
public boolean isOverrideArgs() {
return false;
}
}
}
};
}

@Override protected ClassMatch enhanceClass() {
@Override
protected ClassMatch enhanceClass() {
return MultiClassNameMatch.byMultiClassMatch(ENHANCE_CLASS, STATEMENT_WRAPPER_CLASS, T4C_STATEMENT_CLASS);
}
}
10 changes: 5 additions & 5 deletions oracle-10.x-plugin/src/main/resources/skywalking-plugin.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

oracle-10.x=org.apache.skywalking.apm.plugin.jdbc.oracle.define.DriverInstrumentation
oracle-10.x=org.apache.skywalking.apm.plugin.jdbc.oracle.define.ConnectionInstrumentation
oracle-10.x=org.apache.skywalking.apm.plugin.jdbc.oracle.define.OracleCallableInstrumentation
oracle-10.x=org.apache.skywalking.apm.plugin.jdbc.oracle.define.OraclePrepareStatementInstrumentation
oracle-10.x=org.apache.skywalking.apm.plugin.jdbc.oracle.define.OracleStatementInstrumentation
oracle-10.x=io.skywalking.apm.plugin.jdbc.oracle.define.DriverInstrumentation
oracle-10.x=io.skywalking.apm.plugin.jdbc.oracle.define.ConnectionInstrumentation
oracle-10.x=io.skywalking.apm.plugin.jdbc.oracle.define.OracleCallableInstrumentation
oracle-10.x=io.skywalking.apm.plugin.jdbc.oracle.define.OraclePrepareStatementInstrumentation
oracle-10.x=io.skywalking.apm.plugin.jdbc.oracle.define.OracleStatementInstrumentation
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>

<modules>
<module>oracle-10.x-plugin</module>
Expand Down Expand Up @@ -70,6 +70,11 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion resin-3.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>

<groupId>org.apache.skywalking</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/


package org.apache.skywalking.apm.plugin.resin.v3;
package io.skywalking.apm.plugin.resin.v3;

import com.caucho.server.connection.CauchoRequest;
import com.caucho.server.http.HttpResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/

package org.apache.skywalking.apm.plugin.resin.v3.define;
package io.skywalking.apm.plugin.resin.v3.define;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -32,7 +32,7 @@ public class ResinV3Instrumentation extends ClassInstanceMethodsEnhancePluginDef

private static final String ENHANCE_CLASS = "com.caucho.server.dispatch.ServletInvocation";

private static final String METHOD_INTERCET_CLASS = "org.apache.skywalking.apm.plugin.resin.v3.ResinV3Interceptor";
private static final String METHOD_INTERCET_CLASS = "io.skywalking.apm.plugin.resin.v3.ResinV3Interceptor";

@Override
protected ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
Expand Down
2 changes: 1 addition & 1 deletion resin-3.x-plugin/src/main/resources/skywalking-plugin.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

resin-3.x=org.apache.skywalking.apm.plugin.resin.v3.define.ResinV3Instrumentation
resin-3.x=io.skywalking.apm.plugin.resin.v3.define.ResinV3Instrumentation
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import com.caucho.server.connection.CauchoRequest;
import com.caucho.server.http.HttpResponse;
import java.util.List;

import io.skywalking.apm.plugin.resin.v3.ResinV3Interceptor;
import org.apache.skywalking.apm.agent.core.context.SW3CarrierItem;
import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
import org.apache.skywalking.apm.agent.core.context.trace.LogDataEntity;
Expand Down
2 changes: 1 addition & 1 deletion resin-4.x-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>org.openskywalking</groupId>
<artifactId>java-plugin-extensions</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>

<groupId>org.apache.skywalking</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/


package org.apache.skywalking.apm.plugin.resin.v4;
package io.skywalking.apm.plugin.resin.v4;

import com.caucho.server.http.CauchoRequest;
import java.lang.reflect.Method;
Expand Down
Loading

0 comments on commit 912e2c9

Please sign in to comment.