[jBPM] - Re: IdentityService
by Dámaris Suárez
Dámaris Suárez [http://community.jboss.org/people/dhamaris] created the discussion
"Re: IdentityService"
To view the discussion, visit: http://community.jboss.org/message/603178#603178
--------------------------------------------------------------
How did you have configured your IdentityService? I cannot even initialize mine!
I'm currently using jbpm 4.4 and I put this in my configuration:
<?xml version="1.0" encoding="UTF-8"?>
<jbpm-configuration>
<!-- <import resource="jbpm.default.cfg.xml" /> -->
<import resource="jbpm.tx.spring.cfg.xml" />
<import resource="jbpm.jpdl.cfg.xml" />
<import resource="jbpm.identity.cfg.xml" />
<import resource="jbpm.businesscalendar.cfg.xml" />
<import resource="jbpm.console.cfg.xml" />
<import resource="jbpm.jobexecutor.cfg.xml" />
<script-manager default-expression-language="juel"
default-script-language="juel"
read-contexts="execution, environment, process-engine, spring"
write-context="">
<script-language name="juel"
factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
</script-manager>
<transaction-context>
<object class="identitySession" />
</transaction-context>
<hibernate-session current="true" />
</jbpm-configuration>
And in my applicationContext-process.xml I added a IdentityService bean to try to make sure it initialized:
<bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
<bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />
Nevertheless, everytime I debug my IdentityService object is null...
Any ideas?
Thanks!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/603178#603178]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[Datasource Configuration] - Unable to get managed connection for jdbc
by titang
titang [http://community.jboss.org/people/titang] created the discussion
"Unable to get managed connection for jdbc"
To view the discussion, visit: http://community.jboss.org/message/602594#602594
--------------------------------------------------------------
Hi everybody,
I have been searching how to solve my problem but I can't find any solution. I am quite sure I must have forgotten something but I don't know what. So I guess I need some help unfortunaltely.
So I am having the following exceptions when I try to deploy my application:
ERROR org.rhq.core.pc.inventory.InventoryManager org.rhq.core.pc.inventory.InventoryManager Call to getAvailablity() on ResourceComponent for Resource[id=-49, type=Service Binding Manager, key=ServiceBindingManager, name=Service Binding Manager, parent=JBoss AS 6 (default)] failed.: org.rhq.core.pc.inventory.TimeoutException: Call to org.rhq.plugins.jbossas5.serviceBinding.ManagerComponent.getAvailability() org.rhq.plugins.jbossas5.serviceBinding.ManagerComponent.getAvailability() with args [] timed out. Invocation thread will be interrupted
2011-04-28 18:09:01,309 ERROR http://community.jboss.org/message/602594#602594 Unable to get managed connection for jdbc (ResourceContainer.invoker.nonDaemon-1) org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/test; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/test)
I am focusing on the second error but the first one may be the cause of the SQL Exception. I could not find any information on the first exception and have absolutely no idea which part of my app raises this exception.
The second error appears when I use this code:
DataSource ds = (DataSource)((Context)(new InitialContext()).lookup("java:/comp/env")).lookup("jdbc/test");
final Connection conn = ds.getConnection();
In order to declare my data source (an Oracle 10g database), I used the following files:
oracle-ds.xml:
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/test</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:oracle:thin:@test-oracle:1521:test</connection-url>
<!--
Here are a couple of the possible OCI configurations.
For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.92...
<connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
or
<connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>
Clearly, its better to have TNS set up properly.
-->
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<user-name>test</user-name>
<password>test</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
jboss-web.xml:
<jboss-web>
<!-- A security domain that restricts access
<security-domain>java:/jaas/JBossWS</security-domain>
-->
<context-root>test</context-root>
<resource-ref>
<res-ref-name>jdbc/test</res-ref-name>
<!--res-type>javax.sql.DataSource</res-type-->
<jndi-name>jdbc/test</jndi-name>
</resource-ref>
</jboss-web>
web.xml:
<resource-ref>
<description>Oracle data source</description>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
No other resources are declared. The oracle datasource is up in the admin-console.
If you have any idea, thank you. If there are any informations lacking, tell me, I will add them as soon as possible. Thank you
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602594#602594]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[jBPM] - jBPM 4.x suspend/Resume
by Tony D
Tony D [http://community.jboss.org/people/pushpak1981] created the discussion
"jBPM 4.x suspend/Resume"
To view the discussion, visit: http://community.jboss.org/message/603136#603136
--------------------------------------------------------------
I have some processes which are having java activity nodes which are refering to EJB's. My Process.jpdl.xml file has only one async node during the start. As per the docs a new transaction is started at every a sync node so in my case my entire workflow will be processes into a single Thread (transaction). If suppose i call a jboss shutdown in while the process is execution then goes into an error state.
Is there any way in which i can suspend the current Process instance and then again start when the server is started ? i.e. wait for the process instance to complete the current activity and then go to suspend and then again continue from the next activity when again server is started.
I tried by getExecutionService().endProcessInstance("processinstanceid", Execution.STATE_SUSPENDED); But was not suspending the process.
Any Help would be highly appreciated.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/603136#603136]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[Beginner's Corner] - setting up JBoss with SEAM
by Mike Quin
Mike Quin [http://community.jboss.org/people/sanfran0201] created the discussion
"setting up JBoss with SEAM"
To view the discussion, visit: http://community.jboss.org/message/599941#599941
--------------------------------------------------------------
Hi,
I have a very simple SEAM example (shown below) that is not working.
I'm very new to JBoss and hibernate and SEAM and all that stuff. I have been reading http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/html/ http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/html/
I don't want to run seam-gen on my jboss-5.1.0. I just need a simple and straightforward instructions on how to setup jboss 5.1 with SEAM and to run this extremely simple helloworld example. However if seam-gen is absolutely required (which sounds irrational), then please confirm and I'll use it.
Any help is appreciated.
Thank you
Mike
I'm deploying org.jboss.seam-jboss-seam-2.1.0.SP1.jar inside my ear.
I have also attached the server.log file if that would help.
public class InjectionServlet extends HttpServlet {
* @In(value=InjectableComponent.NAME, create = true, required = true)*
* private InjectableComponent injectableComponent;*
public void service(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Hello World Seam Servlet!</title>");
out.println("</head>");
out.println("<body>");
if (injectableComponent == null) {
out.println("Injection not working.");
} else {
out.println(injectableComponent.getTitle());
}
out.println("</body>");
out.println("</html>");
}
}
package com.example.bean;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
*@Name("injectableComponent")*
*(a)Scope(ScopeType.EVENT)*
public class InjectableComponent {
public static final String NAME = "injectableComponent";
public InjectableComponent() {
}
@Create
public void init() {
System.out.println("Good Morning.");
}
public String getTitle() {
return "Hello World.";
}
}
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- Seam -->
* <listener>*
* <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>*
* </listener>*
<servlet>
<servlet-name>InjectionServlet</servlet-name>
<servlet-class>com.example.ui.InjectionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>InjectionServlet</servlet-name>
<url-pattern>/ioc</url-pattern>
</servlet-mapping>
</web-app>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>EJB3</display-name>
<module>
<ejb>Simple-server.jar</ejb>
</module>
<module>
<web>
<web-uri>Simple-web.war</web-uri>
<context-root>/seam</context-root>
</web>
</module>
</application>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/599941#599941]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[jBPM] - jbpm5 and birt 2.6.2
by Chris Melas
Chris Melas [http://community.jboss.org/people/melc] created the discussion
"jbpm5 and birt 2.6.2"
To view the discussion, visit: http://community.jboss.org/message/602977#602977
--------------------------------------------------------------
If anyone is interested on upgrading birt report runtime of jbpm5 to the current birt version which is birt 2.6.2, then it is necessary to do the following,
1.replace all links in build.xml related to birt 2.3.2 / 2_3_2 with the corresponding birt 2.6.2 / 2_6_2 in order to use the installation process via ant , otherwise just place the necessary birt folders/files in jboss (i.e. jboss-5.1.0.GA/server/default/data/birt/ReportEngine, jboss-5.1.0.GA/server/default/data/birt/overall_activity.rptdesign, jboss-5.1.0.GA/server/default/data/birt/process_summary.rptdesign). Please note that the report files will have to be opened and saved with the birt 2.6.2 eclipse editor in order to get the 2.6.2 formating.
2.replace the birt libraries in jbpm-gwt-console-server-5.1.0.M1.war : chartengineapi-2.3.2.jar, coreapi-2.3.2.jar, dataadapterapi-2.3.2.jar, dteapi-2.3.2.jar,engineapi-2.3.2.jar, modelapi-2.3.2.jar,scriptapi-2.3.2.jar with the ones found in birt 2.6.2 runtime. The corresponding jar libraries in 2.6.2 do not have the 2.6.2 suffix but it does not matter, however it's good practice to have it in order to know which version has been used.
3. replace the js rhino library in jbpm-gwt-console-server-5.1.0.M1.war: js-1.6R2.jar with the js.jar inside rhino1_7R2.zip
This procedure seems to do the job, however i would greatly appreciate if anyone could point out any side effects that occur due to the replacement of these libraries, thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602977#602977]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months