[JBossWS] - Need Help
by bilal_0003
hi
im using jboss 4.0.5 in my app with Hibernate 3.1 and actually the problem im facing is ,
i have created a DS file for my project addressbook
<local-tx-datasource>
<jndi-name>PostgresqlAddressBookDS</jndi-name>
<connection-url>jdbc:postgresql://192.168.1.11:5432/addressbook</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
backend
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL
<new-connection-sql>select 1</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL
<check-valid-connection-sql>select 1</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
<type-mapping>PostgreSQL 8.2</type-mapping>
-->
</local-tx-datasource>
the thing is actually i want jboss to crate sessions and bind them with JNDI
so then i use them in my app for this i craeted a file hibernate-service.xml
java:PostgresqlAddressBookDS
org.hibernate.dialect.PostgreSQLDialect
java:addressbookSessionFactory
org.hibernate.cache.HashtableCacheProvider
update-drop
false
but the problem is when i start jboss it gives arroe no DS find
but i already give it
both of these files are in deploy folder and the interesting thing after jboss throw exception that it did't find ny data source ,if i change my hibrenate-service file just add a space and save it it give no error and create session
cus some tell me im doing right and wat steps i should do to configure jboss with hibernate for session handling and where to specify my *.cfg.xml file
plz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046621#4046621
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046621
18 years, 11 months
[Clustering/JBoss] - Re: Sever Failover
by bstansberry@jboss.com
Not easy to do reliably. :(
In 4.0.x, the master node is always the JGroups coordinator, which as I said is usually the node that's been running longest. Usually but not always. So, starting the node you want as master first is a quasi-solution
But, that's not very nice and isn't bulletproof, since if there is a disruption on the network, another server can become coordinator. Plus if you need to restart the preferred master, it won't be coordinator again unless you restart all the nodes.
In 4.2 we introduced the ability to configure a pluggable policy for determining the master. Pluggable = implement an interface and specify in the service.xml for your HASingleton the class of the impl. There's no implementation yet of a policy that does what you want, though. There's a JIRA for it: http://jira.jboss.com/jira/browse/JBAS-4228 and I'd be quite happy if someone from the community wanted to implement that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046616#4046616
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046616
18 years, 11 months
[JBossWS] - Problem trying to use a jmx component to call my webservice
by rickcr
I'm a bit confused what is going wrong here. I have a simple class that can call my webservice by creating a javax.xml.ws.Service and getting a handle to my endpoint interface. This works fine if I call this class from a servlet.
I know annotated this class so that it would show up as a JMX component and I'm trying to call the test method (echo) through the JMX console. When I try this, however, I'll get an error back...
org.jboss.ws.WSException: Cannot load java type: com.foobar.edsf.example.ejb.webservices.jaxws.TestEchoExample
I'm not sure why I'm getting such an error. Apparently JBoss is trying to make this class in the package jaxws? (since I don't have that package named anywhere in my examples).
Here is the class I'm trying to use as a JMX component...
| package com.foobar.edsf.example.client;
|
| import java.net.URL;
|
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
|
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jboss.annotation.ejb.Management;
|
| import com.foobar.edsf.example.ejb.webservices.Echo;
|
| @org.jboss.annotation.ejb.Service(objectName="examples:service=TestEcho")
| @Management(ITestEcho.class)
| public class TestEchoExample implements ITestEcho {
| private static Log log = LogFactory.getLog(TestEchoExample.class);
|
| public String echo(String s) {
| String retVal = "Failed";
| try {
| Service service = Service.create(
| new URL("http://localhost:8080/edsf-1-edsf-examples-ejb/EchoBean?wsdl"),
| new QName("http://webservices.ejb.example.edsf.foobar.com/", "EchoBeanService") );
| Echo echo = service.getPort(Echo.class);
| retVal = echo.testEchoExample(s);
| log.info("In TestEcho client. Echo response with call to echo: "+ retVal);
| } catch (Exception e) {
| e.printStackTrace();
| retVal = e.toString();
| }
| return retVal;
| }
| }
| [/CODE]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046610#4046610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046610
18 years, 11 months