01-08-2013 04:55 PM
…
<!– This Spring config file is NOT used in Alfresco, as the Activiti engine is wired in a different way there –>
<bean id="demoDataGenerator" class="org.activiti.explorer.demo.DemoDataGenerator" init-method="init">
<property name="processEngine" ref="processEngine" />
<property name="createDemoUsersAndGroups" value="true" />
<property name="createDemoProcessDefinitions" value="true" />
<property name="createDemoModels" value="true" />
</bean>
<bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:db.properties" />
<!– Allow other PropertyPlaceholderConfigurer to run as well –>
<property name="ignoreUnresolvablePlaceholders" value="true" />
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
<property name="defaultAutoCommit" value="false" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
…
db=h2
jdbc.driver=org.h2.Driver
jdbc.url=jdbc:h2:tcp://localhost/activiti
jdbc.username=sa
jdbc.password=
./apache-tomcat-7.0.34/bin/startup.sh
nohup java -jar h2/bin/h2-1.3.170.jar &
or
nohup java -jar h2/bin/h2-1.3.170.jar &
./apache-tomcat-7.0.34/bin/startup.sh
package quickstart;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import sun.misc.BASE64Encoder;
public class QuickStart {
public static void main(String[] args) throws Exception {
StringBuffer output = new StringBuffer();
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet getRequest = new HttpGet("http://127.0.1.1:8082/activiti-rest/service/process-instances");
//HttpGet getRequest = new HttpGet("http://127.0.1.1:8082/activiti-rest/service/process-definitions");
BASE64Encoder encoder = new BASE64Encoder();
String encodedUserPass = encoder.encode("kermit:kermit".getBytes());
getRequest.addHeader("Authorization", "Basic " + encodedUserPass);
HttpResponse response = httpClient.execute(getRequest);
System.out.println (response.toString());
if (response.getStatusLine().getStatusCode() != 200) {
// URL Not found
} else {
BufferedReader br = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
String responseText;
while ((responseText = br.readLine()) != null) { //This hits every time.
output.append(responseText); //This line NEVER hit on my machines,
}
System.out.println("output contents begin: \n" + output.toString() + "\n\noutput contents end");
}
try {
System.out.println(response.getStatusLine().toString());
} finally {
getRequest.releaseConnection();
}
}
}
Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/netx.jar
Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/plugin.jar
Have no file for /usr/lib/jvm/java-7-openjdk-i386/jre/lib/jfr.jar
HTTP/1.1 200 OK [Content-Type: application/octet-stream, Cache-Control: max-age=10, Last-Modified: Tue, 8 Jan 2013 21:27:59 GMT, Content-Length: 0]
output contents begin:
output contents end
HTTP/1.1 200 OK
BUILD SUCCESSFUL (total time: 9 seconds)
01-08-2013 06:26 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.