[JBossWS] - Hold the client ip from the client calls made to the web se
by adinarayana.gunnam
Hi
I am working on Ejb3 web services.I want to hold the client ip from the client calls made
to the web service.I deployed this service in jboss AS 4.2.1
In the service implementation i started using
@Resource
SessionContext sessionCtx;
My idea is to get the MessageContext from this SessionContext and finally to
get the HttpServletRequest.
I got the sessionCtx(BaseSessionContext) object.When i am trying to access the
MessageContect using the below syntax
System.out.println(sessionCtx.getMessageContext());
I got ---ERROR [SOAPFaultHelperJAXWS] SOAP request exception
javax.ejb.EJBException: java.lang.IllegalStateException: No message context found
Please provide me with correct solution to this problem.Please also suggest if there is any
alternate approach to get the client ip in the service implementation.
Thanks
Adinarayana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100639#4100639
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100639
17Â years, 2Â months
[Installation, Configuration & DEPLOYMENT] - Re: MBeans waiting for other MBeans
by javajambal
hi,
my persistence.xml looks like this
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="sampledb">
org.hibernate.ejb.HibernatePersistence
<jta-data-source>java:datasource/sampleDS</jta-data-source>
com.c.p.model.C1
com.c.p.dvrsched.model.C2
</persistence-unit>
and my sample-ds.xml looks like this
<local-tx-datasource>
<jndi-name>datasource/sampleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@127.0.0.l:1521:orcl</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>scott</user-name>
tiger
<min-pool-size>3</min-pool-size>
<max-pool-size>25</max-pool-size>
<type-mapping>Oracle10g</type-mapping>
</local-tx-datasource>
<local-tx-datasource>
<!-- The jndi name of the DataSource, it is prefixed with java:/ -->
<!-- Datasources are not available outside the virtual machine -->
<jndi-name>jdbc/TestingDS</jndi-name>
<!-- For in-process persistent db, saved when jboss stops.
The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
-->
<connection-url>jdbc:hsqldb:target/testdb</connection-url>
<!-- The driver class -->
<driver-class>org.hsqldb.jdbcDriver</driver-class>
<!-- The login and password -->
<user-name>sa</user-name>
<!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
<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 -->
<!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
<!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<!-- HSQL DB benefits from prepared statement caching -->
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>Hypersonic SQL</type-mapping>
<!-- When using in-process (standalone) mode -->
jboss:service=Hypersonic,database=testdb
</local-tx-datasource>
<!-- For hsqldb accessed from jboss only, in-process (standalone) mode -->
testdb
true
I appreciate your help..
thanks..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100638#4100638
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100638
17Â years, 2Â months
[Clustering/JBoss] - Port Numbers in Horizontal Cluster
by jboss_cody
Hello again,
I have a new question regarding the BindException which I receive when I start certain nodes in my cluster.
I have a vertical cluster defined, which works as of now. The I.P.'s are concurrent, (i.e. 10.0.0.1, 10.0.0.2, 10.0.0.3). Now I want to introduced another set of concurrent nodes, with a different range of I.p. addresses. (i.e. 10.0.0.11, 10.0.0.12, 10.0.0.13). When I do this, the first range of nodes (1-3) see the new nodes, but I get BindingExceptions when I start my new nodes. Can someone please explain to me why the new nodes (ip's 11-13) must have different port numbers? All nodes are referring to the same cluster, (DefaultPartition). I do not understand why the first set of nodes are able to use the same port numbers, while the second set of nodes must have different values... Any advice/tips/guidance is greatly appreciated.
Thanks in advance...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100633#4100633
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100633
17Â years, 2Â months