mminor modification
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: ch.qos.logback:logback-classic:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/d90276fff414f06cb375f2057f6778cd63c6082f/logback-classic-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/f4915df0360e7529c61f9e78ef3a06c19238e62e/logback-classic-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@@ -1,11 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: ch.qos.logback:logback-core:1.1.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.3/e3c02049f2dbbc764681b40094ecf0dcbc99b157/logback-core-1.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.3/a69d9a62a693f391ad19d8ac19fa85a7a60cbc7c/logback-core-1.1.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@@ -1,11 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: commons-fileupload:commons-fileupload:1.3.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-fileupload/commons-fileupload/1.3.1/c621b54583719ac0310404463d6d99db27e1052c/commons-fileupload-1.3.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/commons-fileupload/commons-fileupload/1.3.1/a1fa20f7f3ad210f4b2eb51b63be3f0273be263a/commons-fileupload-1.3.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: eu.webtoolkit:jwt:3.3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/eu/webtoolkit/jwt/3.3.4/jwt-3.3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
9
.idea/libraries/Gradle__javax_javaee_api_6_0.xml
generated
9
.idea/libraries/Gradle__javax_javaee_api_6_0.xml
generated
@@ -1,9 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: javax:javaee-api:6.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/javax/javaee-api/6.0/d6f416983ea13c334d5c599a9045414ecaf5d66d/javaee-api-6.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
@@ -1,11 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.apache.commons:commons-lang3:3.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.4/5fe28b9518e58819180a43a850fbc0dd24b7c050/commons-lang3-3.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.4/b49dafc9cfef24c356827f322e773e7c26725dd2/commons-lang3-3.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
@@ -1,11 +0,0 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Gradle: org.slf4j:slf4j-api:1.7.7">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.7/2b8019b6249bb05d81d3a3094e468753e2b21311/slf4j-api-1.7.7.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.7/acd62e31cc314266e73eebed0b6dd7ea974a0ed/slf4j-api-1.7.7-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
39
jpacrepo.iml
39
jpacrepo.iml
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="jpacrepo" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="1.0" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.id="jpacrepo" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/classes/main" />
|
||||
<output-test url="file://$MODULE_DIR$/build/classes/test" />
|
||||
@@ -14,32 +14,22 @@
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.11" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: org.apache.commons:commons-compress:1.9" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: org.tukaani:xz:1.5" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: javax:javaee-api:7.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-io:commons-io:2.4" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: com.sun.mail:javax.mail:1.5.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: javax.activation:activation:1.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.11" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.thoughtworks.xstream:xstream:1.4.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: xmlpull:xmlpull:1.1.3.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: xpp3:xpp3_min:1.1.4c" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-io:commons-io:2.4" level="project" />
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: jboss-client">
|
||||
<CLASSES>
|
||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-client:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jackson-provider:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jaxb-provider:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: xmlpull:xmlpull:1.1.3.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: xpp3:xpp3_min:1.1.4c" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:jaxrs-api:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:1.0.1.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.httpcomponents:httpclient:4.2.6" level="project" />
|
||||
@@ -48,15 +38,22 @@
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-mapper-asl:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-jaxrs:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.codehaus.jackson:jackson-xc:1.9.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.bind:jaxb-impl:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.apache.httpcomponents:httpcore:4.2.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: commons-logging:commons-logging:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: org.jboss.resteasy:resteasy-jaxb-provider:3.0.11.Final" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.bind:jaxb-impl:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.bind:jaxb-core:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.xml.fastinfoset:FastInfoset:1.2.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: javax.xml.bind:jaxb-api:2.2.7" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: com.sun.istack:istack-commons-runtime:2.16" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Gradle: javax.xml.bind:jsr173_api:1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="Gradle: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Gradle: jboss-client">
|
||||
<CLASSES>
|
||||
<root url="jar:///opt/wildfly/bin/client/jboss-client.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@@ -124,6 +124,7 @@ public class PacmanWebService
|
||||
{
|
||||
output.write(bytes);
|
||||
}
|
||||
output.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -131,7 +132,6 @@ public class PacmanWebService
|
||||
}
|
||||
finally
|
||||
{
|
||||
output.close();
|
||||
input.close();
|
||||
}
|
||||
};
|
||||
|
@@ -6,8 +6,10 @@ import org.jpacrepo.model.PkgData;
|
||||
import org.jpacrepo.pacbase.Hasher;
|
||||
import org.jpacrepo.pacbase.MD5InputStream;
|
||||
import org.jpacrepo.pacbase.Parser;
|
||||
import org.jpacrepo.service.PacmanService;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.naming.*;
|
||||
import javax.ws.rs.client.*;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
@@ -19,6 +21,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.DigestInputStream;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Created by walter on 29/03/15.
|
||||
@@ -99,4 +102,47 @@ public class ClientTest
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void traverseJndiNode(String nodeName, Context context)
|
||||
{
|
||||
try
|
||||
{
|
||||
NamingEnumeration<NameClassPair> list = context.list(nodeName);
|
||||
while (list.hasMore())
|
||||
{
|
||||
String childName = nodeName + "" + list.next().getName();
|
||||
System.out.println(childName);
|
||||
traverseJndiNode(childName, context);
|
||||
}
|
||||
} catch (NamingException ex)
|
||||
{
|
||||
// We reached a leaf
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void invokeStatelessBean() throws Exception
|
||||
{
|
||||
// Let's lookup the remote stateless calculator
|
||||
|
||||
Properties prop = new Properties();
|
||||
InputStream in = getClass().getClassLoader().getResourceAsStream("jboss-ejb-client.properties");
|
||||
prop.load(in);
|
||||
prop.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
|
||||
|
||||
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
|
||||
// prop.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
|
||||
prop.put(Context.PROVIDER_URL, "http-remoting://odroid-u3:8080");
|
||||
// prop.put(Context.PROVIDER_URL, "remote://odroid-u3:4447");
|
||||
prop.put(Context.SECURITY_PRINCIPAL, "jpacrepo");
|
||||
prop.put(Context.SECURITY_CREDENTIALS, "password01.");
|
||||
prop.put("jboss.naming.client.ejb.context", true);
|
||||
Context context = new InitialContext(prop);
|
||||
Context ctx = new InitialContext(prop);
|
||||
traverseJndiNode("/", context);
|
||||
// final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo-1.0/remote/PacmanServiceEJB!service.PacmanService");
|
||||
final PacmanService stateService = (PacmanService) ctx.lookup("/jpacrepo/PacmanServiceEJB!org.jpacrepo.service.PacmanService");
|
||||
stateService.deletePackage("google-earth-7.1.4.1529-1-x86_64.pkg.tar.xz");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user