[Datasource Configuration] - one data source with multiple Oracle database users
by Nicolas Kaczmarski
Nicolas Kaczmarski [http://community.jboss.org/people/pekka_x] created the discussion
"one data source with multiple Oracle database users"
To view the discussion, visit: http://community.jboss.org/message/568176#568176
--------------------------------------------------------------
Dear All,
I have 2 application using 2 differents datasources :
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>TooWsDataSource</jndi-name>
<connection-url>jdbc:oracle:thin:@172.25.225.40:1521:paid</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>Too</user-name>
<password>too</password>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</local-tx-datasource>
<!-- New schema for EPT/WS -->
<local-tx-datasource>
<jndi-name>TooWsDataSourcePt</jndi-name>
<connection-url>jdbc:oracle:thin:@172.25.225.40:1521:paid</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>Too2</user-name>
<password>too</password>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
But when the second application do an sql request the user used is "Too" instead of "Too2".
Have you ideas?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/568176#568176]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[Beginner's Corner] - Is Quartz already cluster aware?
by Alessandro Novarini
Alessandro Novarini [http://community.jboss.org/people/a.novarini] created the discussion
"Is Quartz already cluster aware?"
To view the discussion, visit: http://community.jboss.org/message/571527#571527
--------------------------------------------------------------
Hello all,
I had a quick search on the forum, so apologize if I didn't see a similar topic about it.
I'm working on an application deployed on JBoss 5.1, and developers now need to move it in a cluster environment.
One of the issues they're facing is the scheduling, because the scheduled ejbs have to be clustered but they must share the same scheduler, so that the ejbs are triggered only on one node and not on every node.
I was told quartz is already configured to work in a cluster, and that the only thing I have to do is to configure the DefaultDS to point to an external db instead of the local hsqldb.
My concern is - before picking the wrong road - that as JBoss starts, with the 'all' configuration set, in the log I see the following lines:
*[StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
17:33:40,715 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
17:33:40,716 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.*
This worries me because, unless the cluster configuration overwrites quartz configuration after it prints these lines, quartz seems rely on the quartz.properties.
Is this a real concern or this is exactly the reality and I have to configure the scheduler as written?
Thanks in advance
Ale
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/571527#571527]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[Beginner's Corner] - Getting CacheManager via JNDI
by Alessandro Novarini
Alessandro Novarini [http://community.jboss.org/people/a.novarini] created the discussion
"Getting CacheManager via JNDI"
To view the discussion, visit: http://community.jboss.org/message/571530#571530
--------------------------------------------------------------
Hello all,
I'm working on JBoss 5.1, so I don't have Infinispan installed nor I can change the default jbosscache.
I need to retrieve the CacheManager for storing object from my code, and I tried to get the CacheManager using JNDI.
In the configuration file of the cache, inside the .SAR archive, I saw that the CacheManager is bound to the name java:CacheManager
I tried, from an external client to lookup the cache pointing to that name (java:CacheManager), but the code raised an Exception telling me that than name was not bound.
Is the CacheManager an object I can use from an external application? Or this is something usable only "inside" the application server?
Do I need to configure it in some way to enable the jndi?
Thanks in advance,
Ale
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/571530#571530]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[jBPM] - Modelling a Process Cancellation
by Yang Yang Qian
Yang Yang Qian [http://community.jboss.org/people/yangyang.qian] created the discussion
"Modelling a Process Cancellation"
To view the discussion, visit: http://community.jboss.org/message/573760#573760
--------------------------------------------------------------
Hi all,
I am a new user to jBPM and I've been trying to use it as a simple state-machine to model a process-cancellation proof-of-concept.
My aim is to define a workflow where two approvers need to sequentially approve a request that has been submitted. At any point in the process, someone, for example the person for whom the request was made, can cancel / withdraw the request. As soon as the request is cancelled, all tasks / executions / states must stop.
(I suppose I'm trying to implement the type of pattern that is decribed here http://www.workflowpatterns.com/patterns/control/cancellation/wcp20.php http://www.workflowpatterns.com/patterns/control/cancellation/wcp20.php ... perhaps it's over-described :p )
My current process definition tries to do this by introducing a Monitor state that lasts until there is an external event to trigger the "cancel" transition, at which time the process goes to the cancel end state and stops the other executions. But creating a Monitor state purely for cancellation seems rather awkward ...
I wasn't sure what the recommended practice for modelling a process cancellation would be in jBPM ... I've found some posts on using the API (the ExecutionService.deleteProcessInstance() function I suppose?) but I am not sure that doing so is correct since that will be a runtime solution? I suppose I can call it at runtime from the servlet associated with the cancellation button? Or is there a more elegant model-based solution?
Thanks all!
test_Cancellation_Model.jpdl.xml:
<?xml version="1.0" encoding="UTF-8"?>
<process name="test" xmlns="http://jbpm.org/4.4/jpdl">
<start g="39,68,48,48" name="Start">
<transition to="fork1"/>
</start>
<fork g="135,158,48,48" name="fork1">
<transition to="Approval 1"/>
<transition to="Monitor"/>
</fork>
<state g="115,272,92,52" name="Monitor">
<transition g="-39,-18" name="cancel" to="End - Cancelled Request"/>
</state>
<state g="247,154,92,52" name="Approval 1">
<on event="start"><event-listener class="OnApprovalListener1"/></on>
<transition g="-30,-4" name="approve" to="Approval 2"/>
<transition g="-34,-18" name="reject" to="End - Rejected Request"/>
</state>
<state g="396,60,92,52" name="Approval 2">
<on event="start"><event-listener class="OnApprovalListener2"/></on>
<transition g="-25,-9" name="approve" to="End - Approved Request"/>
<transition g="-4,-8" name="reject" to="End - Rejected Request"/>
</state>
<end g="638,77,48,48" name="End - Approved Request" state="Completed"/>
<end g="635,154,48,48" name="End - Rejected Request" state="Rejected"/>
<end-cancel g="641,277,48,48" name="End - Cancelled Request"/>
</process>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573760#573760]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[Spring Integration] - Application with ws client return an exception with spring
by Marcos Simón
Marcos Simón [http://community.jboss.org/people/marsim86] created the discussion
"Application with ws client return an exception with spring"
To view the discussion, visit: http://community.jboss.org/message/560700#560700
--------------------------------------------------------------
Hi,
I got an application that runs over JBoss 6 M4, with Spring and JSF that works fine.
But now I got other applicaction (that will run in the same server) that I have to install spring. This application call to webservice and it do well, but when I put spring jar file (just only the file, without change the configurations), the application returns an exception:
javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
at javax.faces.component.MethodBindingMethodExpressionAdapter.i nvoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(A ctionListenerImpl.java:102)
at javax.faces.component.UICommand.broadcast(UICommand.java:315 )
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot. java:775)
at javax.faces.component.UIViewRoot.processApplication(UIViewRo ot.java:1267)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(Invok eApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl. java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:31 2)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:324)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:242)
at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.d oFilter(FilterDispatcher.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:274)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:242)
at org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invok e(SecurityAssociationValve.java:181)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListene rValve.event(CatalinaContext.java:285)
at org.jboss.modcluster.catalina.CatalinaContext$RequestListene rValve.invoke(CatalinaContext.java:261)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCo ntextValve.java:88)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentVa lve.invoke(SecurityContextEstablishmentValve.java:93)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invok e(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCa cheValve.invoke(ActiveRequestResponseCacheValve.java:53)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:362)
at org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:951)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/BeansException
at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFacto ry.getSpringBusFactory(JBossWSBusFactory.java:121)
at org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFacto ry.createBus(JBossWSBusFactory.java:54)
at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)& lt; br /> at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.jav a:106)
at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.jav a:97)
at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate( ProviderImpl.java:62)
at javax.xml.ws.Service.(Service.java:57)
at diz.relev3.integ.sicof2.IntegSicof2.*(IntegSicof2.jav a:43)*
at com.datinza.web.beans.PacienteBean.conexionGAIA(PacienteBean .java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.el.parser.AstValue.invoke(AstValue.java:196)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionIm pl.java:276)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMeth odExpression.java:98)
at javax.faces.component.MethodBindingMethodExpressionAdapter.i nvoke(MethodBindingMethodExpressionAdapter.java:88)
... 30 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.BeansException from BaseClassLoader@1069693{vfs:///C:/Desarrollo/jboss-6.0.0.201 00721-M4/server/default/conf/jboss-service.xml}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(Bas eClassLoader.java:480)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 47 more
My code just call IngegSicof2 constructor, and as I said before it works fine if the spring isn't loaded. I´ve configure correctly spring (unless as I think is the correct form) but the exception goes on.
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
* Generated source version: 2.2
*
*/
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = "http://localhost:8080/integ_sicof2/servicios?wsdl")
@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = "http://10.1.1.2:8080/integ_sicof2/servicios?wsdl")
public class IntegSicof2
extends Service
{
private final static URL INTEGSICOF2_WSDL_LOCATION;
private final static WebServiceException INTEGSICOF2_EXCEPTION;
private final static QName INTEGSICOF2_QNAME = new QName("diz.relev3.integ.sicof2", "integ-sicof2");
static {
URL url = null;
WebServiceException e = null;
try {
url = new URL("http://10.1.1.2:8080/integ_sicof2/servicios?wsdl");
} catch (MalformedURLException ex) {
e.printStackTrace();
e = new WebServiceException(ex);
}
INTEGSICOF2_WSDL_LOCATION = url;
INTEGSICOF2_EXCEPTION = e;
}
public IntegSicof2() {
super(__getWsdlLocation(), INTEGSICOF2_QNAME);
}
...
}
package diz.relev3.integ.sicof2;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2-12/14/2009 02:16 PM(ramkris)-
* Generated source version: 2.2
*
*/
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = " http://localhost:8080/integ_sicof2/servicios?wsdl http://localhost:8080/integ_sicof2/servicios?wsdl")
//@WebServiceClient(name = "integ-sicof2", targetNamespace = "diz.relev3.integ.sicof2", wsdlLocation = " http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl")
public class IntegSicof2
extends Service
{
private final static URL INTEGSICOF2_WSDL_LOCATION;
private final static WebServiceException INTEGSICOF2_EXCEPTION;
private final static QName INTEGSICOF2_QNAME = new QName("diz.relev3.integ.sicof2", "integ-sicof2");
static {
System.out.println("URL url = null;");
URL url = null;
System.out.println(" WebServiceException e = null;");
WebServiceException e = null;
System.out.println("try");
try {
System.out.println("url = new URL(\" http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl\");");
url = new URL(" http://10.1.1.2:8080/integ_sicof2/servicios?wsdl http://10.1.1.2:8080/integ_sicof2/servicios?wsdl");
System.out.println("Ha hecho la url ok.");
} catch (MalformedURLException ex) {
System.out.println("catch (MalformedURLException ex) {");
e.printStackTrace();
e = new WebServiceException(ex);
}
System.out.println("INTEGSICOF2_WSDL_LOCATION = url;");
INTEGSICOF2_WSDL_LOCATION = url;
System.out.println("INTEGSICOF2_EXCEPTION = e;");
INTEGSICOF2_EXCEPTION = e;
System.out.println("He llegado al final del static");
}
public IntegSicof2() {
super(__getWsdlLocation(), INTEGSICOF2_QNAME);
System.out.println("super(__getWsdlLocation(), INTEGSICOF2_QNAME);");
}
/*
public IntegSicof2(WebServiceFeature... features) {
super(__getWsdlLocation(), INTEGSICOF2_QNAME, features);
}
*/
public IntegSicof2(URL wsdlLocation) {
super(wsdlLocation, INTEGSICOF2_QNAME);
}
/*
public IntegSicof2(URL wsdlLocation, WebServiceFeature... features) {
super(wsdlLocation, INTEGSICOF2_QNAME, features);
}
*/
public IntegSicof2(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
/*
public IntegSicof2(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
super(wsdlLocation, serviceName, features);
}
*/
/**
*
* @return
* returns IntegSicof2SOAP
*/
//@WebEndpoint(name = "integ-sicof2SOAP")
public IntegSicof2SOAP getIntegSicof2SOAP() {
return super.getPort(new QName("diz.relev3.integ.sicof2", "integ-sicof2SOAP"), IntegSicof2SOAP.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns IntegSicof2SOAP
*/
//@WebEndpoint(name = "integ-sicof2SOAP")
public IntegSicof2SOAP getIntegSicof2SOAP(WebServiceFeature... features) {
return super.getPort(new QName("diz.relev3.integ.sicof2", "integ-sicof2SOAP"), IntegSicof2SOAP.class, features);
}
private static URL __getWsdlLocation() {
if (INTEGSICOF2_EXCEPTION!= null) {
throw INTEGSICOF2_EXCEPTION;
}
return INTEGSICOF2_WSDL_LOCATION;
}
}
This class was generated automaticaly by the JAX-WS, and I try to quit annotations and other changes, but nothing.
An other thing that I don`t understand is although I put the call into try/catch block, the exception is not catched, and it goes up until the navigator.
I think the exception isn't launched by webservice call, but if it don't launch the exception, what do it?, when I debug (and the stacktrace says the same) the exception appears when this code line is executed.
I will be very grateful with any help, I think I will go mad.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/560700#560700]
Start a new discussion in Spring Integration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Tools] - Cannot install JBoss Tools RichFaces
by Alexander Hachmann
Alexander Hachmann [http://community.jboss.org/people/ahachmann] created the discussion
"Cannot install JBoss Tools RichFaces"
To view the discussion, visit: http://community.jboss.org/message/571480#571480
--------------------------------------------------------------
Hello,
I am back in dependencie hell of eclipse.
I cannot install several plugins, especially RichFaces, as I am missing dependencies :-(
Cannot complete the install because one or more required items could not be found.
Software being installed: JBoss Tools RichFaces 3.2.0.v20101016-0359-H111-Beta1 (org.jboss.tools.richfaces.feature.feature.group 3.2.0.v20101016-0359-H111-Beta1)
Missing requirement for filter properties ~= $0: XULRunner 1.9.12.v20101016-0359-H111-Beta1 (org.jboss.tools.xulrunner.feature.feature.group 1.9.12.v20101016-0359-H111-Beta1) requires 'org.mozilla.xulrunner.cocoa.macosx [1.9.1.2a]' but it could not be found
Cannot satisfy dependency:
From: JBoss Tools RichFaces 3.2.0.v20101016-0359-H111-Beta1 (org.jboss.tools.richfaces.feature.feature.group 3.2.0.v20101016-0359-H111-Beta1)
To: org.jboss.tools.xulrunner.feature.feature.group 0.0.0
What Shall I do? I added the Update Site of JBoss Tools, and I cannot find those dependencies.
Thx for any help,
Alexander
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/571480#571480]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years