Re: [jboss-user] [Datasource Configuration] - Problem of jboss server starting on connection failover
by Samarjit Chakraborty
Samarjit Chakraborty [http://community.jboss.org/people/samarjit] replied to the discussion
"Problem of jboss server starting on connection failover"
To view the discussion, visit: http://community.jboss.org/message/538160#538160
--------------------------------------------------------------
Dear Priyanka,
I've got this reference from http://community.jboss.org/wiki/JBossJCADatabaseFailover http://community.jboss.org/wiki/JBossJCADatabaseFailover
In JBoss v5.0.x or greater <ha-local-tx-datasource> elements are no longer supported. Instead of that you can put the <connection-url> separated by delimiters in your main <local-tx-datasource> element inside *-ds.xml. Even <url-delimiter> can be included inside.
I've tested it using this configuration:
<datasources>
<local-tx-datasource>
<!-- The jndi name of the DataSource, it is prefixed with java:/ -->
<!-- Datasources are not available outside the virtual machine -->
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@localhost:1521:orcl|jdbc:oracle:thin:@localhost:1521:study</connection-url>
<url-delimiter>|</url-delimiter>
<!-- The driver class -->
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<!-- The login and password -->
<user-name>xxx</user-name>
<password>yyy</password>
<min-pool-size>5</min-pool-size>
<!-- The maximum connections in a pool/sub-pool -->
<max-pool-size>20</max-pool-size>
<!-- The time before an unused connection is destroyed -->
<idle-timeout-minutes>0</idle-timeout-minutes>
<!-- Whether to check all statements are closed when the connection is returned to the pool,
this is a debugging feature that should be turned off in production -->
<track-statements/>
<!-- Benefits from prepared statement caching -->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
And it is working. When i stopped the instance of database representing "url1" JBoss automatically bound the JNDI name to "url2". Please check it out.
Let me know whether you succeeded or not.
Best of luck
Samarjit
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538160#538160]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 2 months
[JBoss Web Services] - Trouble with sample web service (Cannot obtain endpoint for: xxx)
by Magnus Andersson
Magnus Andersson [http://community.jboss.org/people/DrNoID] created the discussion
"Trouble with sample web service (Cannot obtain endpoint for: xxx)"
To view the discussion, visit: http://community.jboss.org/message/538151#538151
--------------------------------------------------------------
I am trying to set up a web service in my application but I can't get it to run.
I use JBoss 5.1.0 and Eclipse.
I have set up a dynamic web project, added to a ear, and added a sample web service to the web project.
When I deploy the ear from Eclipse it starts allright:
00:40:34,796 INFO [TomcatDeployment] deploy, ctxPath=/MyProjectWebservice
00:40:35,578 INFO [WSDLFilePublisher] WSDL published to: file:/C:/JBoss/jboss-5.1.0.GA/server/default/data/wsdl/MyProjectEAR.ear/MyProjectWebservice.war/HelloWorldService5815640636885811535.wsdl
The endpoint is there (but has wrong "path")
http://localhost:8080/jbossws/services http://localhost:8080/jbossws/services
*Registered Service Endpoints* | Endpoint Name | jboss.ws:context=MyProjectEAR-MyProjectWebservice,endpoint=HelloWorld |
| Endpoint Address | http://localhost:8080/MyProjectEAR-MyProjectWebservice/HelloWorld?wsdl (http://localhost:8080/MediaLibraryEAR-MediaLibraryWebservice/HelloWorld2S...) |
| %1,2% | StartTime | StopTime |
|
| null |
|
|
| RequestCount | ResponseCount | FaultCount |
| 0 | 0 | 0 |
| MinProcessingTime | MaxProcessingTime | AvgProcessingTime |
| 0 | 0 | 0 |
|
| %1,3% |
If I click the link it can't find anything and if I change the path to http://localhost:8080/MediaLibraryEAR-MediaLibraryWebservice/HelloWorld2S... http://localhost:8080/MyProjectWebservice/HelloWorld?wsdl it throws 'Cannot obtain endpoint for: xxx':
*exception*
javax.servlet.ServletException: Servlet.init() for servlet HelloWorld threw exception
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)
*root cause*
javax.xml.ws.WebServiceException: Cannot obtain endpoint for: jboss.ws:context=/MyProjectWebservice,endpoint=HelloWorld
org.jboss.wsf.common.servlet.AbstractEndpointServlet.initEndpoint(AbstractEndpointServlet.java:153)
org.jboss.wsf.common.servlet.AbstractEndpointServlet.initServiceEndpoint(AbstractEndpointServlet.java:124)
org.jboss.wsf.common.servlet.AbstractEndpointServlet.init(AbstractEndpointServlet.java:72)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Unknown Source)
What is wrong with my settings? Why can't it find the endpoint (or why is it pointing wrong)?
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee" xmlns:web=" http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>MyProjectWebservice</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<display-name>HelloWorld</display-name>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>org.jboss.samples.webservices.HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/538151#538151]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years, 2 months