[jBPM] - Work Item not persisted
by Swaminathan Bhaskar
Swaminathan Bhaskar [https://community.jboss.org/people/swaminathan.bhaskar] created the discussion
"Work Item not persisted"
To view the discussion, visit: https://community.jboss.org/message/760675#760675
--------------------------------------------------------------
Hello all;
I am using JPA persistence with jBPM 5.3 with MySQL database. I created a new domain specific task and a corresponding work item handler and expect the work item to be persisted along with the session info as well as process instance info when I kill the process at the point shown in red below ... but do not see that happening. Any ideas or thoughts
Here is the code for the work item handler
public class CustomWorkItemHandler implements WorkItemHandler {
@Override
public void executeWorkItem(WorkItem item, WorkItemManager manager) {
System.out.printf("\n-----> Waiting in custom work item %s <ID:%d> for 60 secs\n", item.getName(), item.getId());
// Expect an entry in the DB for this work item when I kill the process
// Artificial wait
try {
Thread.sleep(60000);
}
catch (Exception ex) {
}
System.out.printf("\n-----> Completing custom work item %s <ID:%d>\n", item.getName(), item.getId());
manager.completeWorkItem(item.getId(), null);
}
@Override
public void abortWorkItem(WorkItem item, WorkItemManager manager) {
}
}
Here is the main process code:
public class sample07 {
public static final String BPMN_RESOURCE = "sample07.bpmn";
public static final String BPM_PROCESS = "sample07";
public static final String WORK_ITEM_NAME = "custom_work_item";
public static final void main(String[] args) {
if (args.length != 2) {
System.out.printf("Usage: java %s <session-id> <process-id>\n", sample07.class.getName());
System.exit(1);
}
try {
int sessionId = Integer.parseInt(args[0]);
long processId = Long.parseLong(args[1]);
// Setup Datasource
PoolingDataSource mysqlDS = new PoolingDataSource();
mysqlDS.setUniqueName("jdbc/MySQL-DS");
mysqlDS.setClassName("com.mysql.jdbc.jdbc2.optional.MysqlXADataSource");
mysqlDS.setMaxPoolSize(3);
mysqlDS.setAllowLocalTransactions(true);
mysqlDS.getDriverProperties().put("user", "mydbuser");
mysqlDS.getDriverProperties().put("password", "mydbpass");
mysqlDS.getDriverProperties().put("url", "jdbc:mysql://localhost:3306/mytestdb");
mysqlDS.init();
// Setup JPA persistence
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
// Load and setup the BPM process
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(BPMN_RESOURCE), ResourceType.BPMN2);
// Do we have any errors ?
if (kbuilder.hasErrors()) {
if (kbuilder.getErrors().size() > 0) {
for (KnowledgeBuilderError error : kbuilder.getErrors()) {
System.out.printf("Error building KnowledgeBase: %s\n", error.getMessage());
}
}
throw new RuntimeException("Error building KnowledgeBase");
}
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
StatefulKnowledgeSession ksession = null;
if (sessionId > 0) {
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
// Register the custom work item handler
ksession.getWorkItemManager().registerWorkItemHandler(WORK_ITEM_NAME, new CustomWorkItemHandler());
ProcessInstance processInstance = ksession.getProcessInstance(processId);
// Did the process instance complete successfully ?
if (processInstance.getState() == ProcessInstance.STATE_COMPLETED) {
System.out.printf("\n-----> Restarted business process [%s] successfully completed\n", processInstance.getProcessId());
}
logger.dispose();
}
else {
ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
// Register the custom work item handler
ksession.getWorkItemManager().registerWorkItemHandler(WORK_ITEM_NAME, new CustomWorkItemHandler());
System.out.printf("\n-----> Session ID: %d\n", ksession.getId());
// Create the process instance
ProcessInstance processInstance = ksession.createProcessInstance(BPM_PROCESS, null);
System.out.printf("\n-----> Starting new Business process %s <ID:%d>\n", processInstance.getProcessId(), processInstance.getId());
// Start the BPM process
ksession.startProcessInstance(processInstance.getId());
// Did the process instance complete successfully ?
if (processInstance.getState() == ProcessInstance.STATE_COMPLETED) {
System.out.printf("\n-----> Business process %s <ID:%d> successfully completed\n", processInstance.getProcessId(), processInstance.getId());
}
logger.dispose();
}
}
catch (Exception ex) {
ex.printStackTrace(System.err);
System.exit(1);
}
System.exit(0);
}
}
And here is the persistence.xml:
<persistence version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/MySQL-DS</jta-data-source>
<mapping-file>META-INF/JBPMorm.xml</mapping-file>
<mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
<!-- Process Related -->
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
<property name="hibernate.connection.autocommit" value="false" />
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
Any help appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760675#760675]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[JBoss Web Services] - Problem implementing ws-security service (and client) in AS7.1.1
by Dimitris Keramidas
Dimitris Keramidas [https://community.jboss.org/people/varkon] created the discussion
"Problem implementing ws-security service (and client) in AS7.1.1"
To view the discussion, visit: https://community.jboss.org/message/735080#735080
--------------------------------------------------------------
Hello,
I have been trying to migrate a secure web service deployed in JBoss AS 5.1 to AS7.1. Having realized that the process is quite different now, I decided to start small and follow the https://docs.jboss.org/author/display/AS71/WS-Security WS-Security for AS7.1 documentation.Unfortunately, I did not manage to get the service working as expected (sign & encrypt). I keep getting errors like this:
WARNING: WSP0075: Policy assertion "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding" was evaluated as "UNKNOWN".
WARNING: WSP0075: Policy assertion "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Wss10" was evaluated as "UNKNOWN".
WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:129)
at $Proxy22.sayHello(Unknown Source)
at Test.main(Test.java:22)
or this (with a slightly altered WSDL):
WARNING: WSP0075: Policy assertion "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding" was evaluated as "UNKNOWN".
WARNING: WSP0075: Policy assertion "{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}Wss10" was evaluated as "UNKNOWN".
WARNING: WSP0019: Suboptimal policy alternative selected on the client side with fitness "UNKNOWN".
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}AsymmetricBinding: Received Timestamp does not match the requirements
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token: The received token does not match the token inclusion requirement
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}X509Token
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}InitiatorToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}RecipientToken
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}IncludeTimestamp: Received Timestamp does not match the requirements
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:129)
at $Proxy22.sayHello(Unknown Source)
at Test.main(Test.java:22)
I have tried changing the ws-securitypolicy configuration in my WSDL - as described in the http://docs.oasis-open.org/ws-sx/ws-securitypolicy/v1.3/ws-securitypolicy... WS-SecurityPolicy standard - but to no avail.
Are the sample web services described in the above https://docs.jboss.org/author/display/AS71/WS-Security WS-Security link located anywhere? I would very much like to download them, and try to deploy them as they are. Perhaps I might get a better idea of what I might be doing wrong.
Regards,
Dimitris
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/735080#735080]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[Datasource Configuration] - accessing custom created datasources in JBOSS 7.1
by Srinivas Reddy Bijjam
Srinivas Reddy Bijjam [https://community.jboss.org/people/srinivas.bijjam] created the discussion
"accessing custom created datasources in JBOSS 7.1"
To view the discussion, visit: https://community.jboss.org/message/761532#761532
--------------------------------------------------------------
Greetings of the day
Generally we define the datasource in standalone.xml and then we will use the same in the application code based on JNDI Name and this is working fine for me. But we have a peculiar functionality where in we create the custom datasources through our application and then create the datasource xml with custom names like oracle.Host_Name-ds.xml, sqlserver.Host_Name-ds.xml, mysql.Host_Name-ds.xml,oracle.Host_Name1-ds.xml etc etc and we use this datasources to connect
String dsName = oracle.Host_Name; try { javax.sql.DataSource ds = DataSourceHelper.getDataSource(dsName); conn = ds.getConnection(); }
in JBOSS 4.x we used to create these files on fly(through application) and store them in application server/server/default/deploy folder and we used to access the data source with out any problem.
In JBoss 7.X, how to bind the created datasources so that we will access them without change in the code. I don't want to change the code because there are so many instances where we are using it and also it will impact other functionality
Regards Srini
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761532#761532]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[Datasource Configuration] - Deploying datasource via -ds.xml files in JBoss AS 7.1.1.Final
by Srinivas Reddy Bijjam
Srinivas Reddy Bijjam [https://community.jboss.org/people/srinivas.bijjam] created the discussion
"Deploying datasource via -ds.xml files in JBoss AS 7.1.1.Final"
To view the discussion, visit: https://community.jboss.org/message/762017#762017
--------------------------------------------------------------
Dear All
* I am getting the following error while looking up the datasource that was bounded by ds.xml file but it is working fine with the datasource that is defined in standalonefull.xml*
*+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) java.lang.ClassCastException: javax.naming.Reference cannot be cast to javax.sql.DataSource+*
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at xxx.utils.DataSourceHelper.getDataSource(DataSourceHelper.java:31)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at java.lang.reflect.Method.invoke(Method.java:597)+
+22:53:08,531 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:105)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:56)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,546 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)+
+22:53:08,562 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$1.processInvocation(EjbExceptionTransformingInterceptorFactories.java:65)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)+
+22:53:08,578 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)+
+22:53:08,593 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)+
+22:53:08,609 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)+
+22:53:08,609 ERROR [stderr] (http--127.0.0.1-8080-4) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)+
*java code to look up is*
|
| |
| Context ctx = new InitialContext(); |
|
| |
| return (javax.sql.DataSource) ctx.lookup("java:/"+dsName); |
*mydatasource-ds.xml*
<?xml version="1.0" encoding="UTF-8"?><datasources>
<xa-datasource enabled="true" jndi-name="java:/mydatasource" pool-name="mydatasource" use-java-context="true">
<xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</xa-datasource>
</datasources>
*standalonefull.xml content is*
<datasources>
<xa-datasource jndi-name="java:/xxx-oraclePool" pool-name="xxx-oraclePool" enabled="true" use-java-context="true">
<xa-datasource-property name="URL">
jdbc:oracle:thin:@localhost:1521:orcl
</xa-datasource-property>
<driver>ojdbc6</driver>
<xa-pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<is-same-rm-override>false</is-same-rm-override>
<no-tx-separate-pools>true</no-tx-separate-pools>
</xa-pool>
<security>
<user-name>xxx</user-name>
<password>xxx</password>
</security>
</xa-datasource>
<drivers>
<driver name="ojdbc6" module="com.oracle.ojdbc6">
<driver-class>oracle.jdbc.OracleDriver</driver-class>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
*module.xml is*
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
What is the reason it is throwing error for ds.xml but working fine for standalone-full.xml?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762017#762017]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[JBoss Tools] - JBoss Tools: Hibernate Tools: LGPL and EPL license conflict in the same file
by Tapio Siilola
Tapio Siilola [https://community.jboss.org/people/esiilola] created the discussion
"JBoss Tools: Hibernate Tools: LGPL and EPL license conflict in the same file"
To view the discussion, visit: https://community.jboss.org/message/752204#752204
--------------------------------------------------------------
Hello
My perspective is that of a lawyer, so please excuse me for digging into old stuff - it merely comes with the job. :)
I'm tasked with analyzing Hibernate Tools, a part of JBoss Tools, to find out its licensing. In particular, the package I need to review is an "all sources" package of JBoss Tools available at: http://downloads.sourceforge.net/jboss/JBossTools-ALL-sources-3.0.3.v2009..., (http://downloads.sourceforge.net/jboss/JBossTools-ALL-sources-3.0.3.v2009... the /hibernatetools folder contains Hibernate Tools (v.3.2.4 I believe).
I understand this version of Hibernate Tools (without accounting for dependencies) is predominantly licensed with LGPL v.2.1 (or later), and parts are under Eclipse Public License 1.0. However, upon a cursory review I found two files (there may be more) which contain both the LGPL and EPL license headers. These files are:
hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/views/contentoutline/JFaceNodeAdapterFactoryForXML.java
hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/navigator/ClearPlaceHolderJob.java
The EPL copyright holder is "IBM and others", while the LGPL copyright holder is JBoss. It seems to me this combination of two copyleft (albeit weak) licenses in one file may not be compatible.
For the vast majority of files in this package, when JBoss is a co-copyright owner in a file the file is distributed under the EPL license. Is this two licenses in a single file simply an oversight, and can the file be considered to be fully under one of the licenses? Or is there something else at play here, perhaps a different interpretation of the licenses, or a permission from the copyright holder? Our issue is simply wanting our forms of use/redistribution of the component to be compliant with whatever the license terms are. Here's the license header of the first file:
*/*******************************************************************************
* Copyright (c) 2001, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org http://www.fsf.org.
*/
*
Thank you in advance for your time and any possible replies.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/752204#752204]
Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month
[EJB3] - Remote EJB3 client deploy fail.
by Bob Kung
Bob Kung [https://community.jboss.org/people/r4_1314] created the discussion
"Remote EJB3 client deploy fail."
To view the discussion, visit: https://community.jboss.org/message/744203#744203
--------------------------------------------------------------
Hi all,
I have a war builds on spring jndi template to invoke ejbs which deployed on a remote Jboss as 7.1.0 server. And my deploy server also a jboss 7.1.0 server.
The jndi config is
"java.naming.factory.initial": "org.jboss.naming.remote.client.InitialContextFactory",
"java.naming.security.principal":"user",
"java.naming.security.credentials":"user",
"java.naming.provider.url": "remote://192.168.1.153:4447",
"jboss.naming.client.ejb.context": true
The first time I packed the war with a jboss-client-7.1.0.Final.jar, but I got the *linkage error of org/jboss/remoting/Connection*. So I removed that jar, deployed again. Another error appeared
(http--0.0.0.0-8080-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.abc.war:main" from Service Module Loader
18:35:33,214 ERROR [stderr] (http--0.0.0.0-8080-1) javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.abc.war:main" from Service Module Loader
18:35:33,215 ERROR [stderr] (http--0.0.0.0-8080-1) at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)
18:35:33,225 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
18:35:33,226 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
18:35:33,226 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.init(InitialContext.java:240)
18:35:33,227 ERROR [stderr] (http--0.0.0.0-8080-1) at javax.naming.InitialContext.<init>(InitialContext.java:214)
18:35:33,227 ERROR [stderr] (http--0.0.0.0-8080-1) at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)
18:35:33,228 ERROR [stderr] (http--0.0.0.0-8080-1) at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)
Any idea for this?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/744203#744203]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month