[JBoss Remoting] - client side socket timeout
by Mayank Mittal
Mayank Mittal [http://community.jboss.org/people/mayankmit2002] created the discussion
"client side socket timeout"
To view the discussion, visit: http://community.jboss.org/message/594000#594000
--------------------------------------------------------------
Hello ,
I've an EJB3 application running on Jboss Server and a RMI client to invoke its methods. No i've an issue in setting up time out for specific calls.
I want to set up the time out to 1 sec. I've used follwing contest properties to set up the timeout but are not working.
private static Properties getContextProperties ()
{
final Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
props.put("jnp.sotimeout", "1000");
props.put("jsun.rmi.transport.tcp.readTimeout", "10");
props.put("socketTimeout", "1000");
props.put("jnp.timeout", "1000");
props.put("timeout", "1000");
if (mActiveNetworkAddress != null)
{
props.put(NamingContext.JNP_LOCAL_ADDRESS, mActiveNetworkAddress);
}
// for HA-JNDI lookup
props.put(Context.PROVIDER_URL, "Server01:1100,Server02:1100");
props.put(NamingContext.JNP_DISABLE_DISCOVERY, "true");
return props;
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/594000#594000]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[Beginner's Corner] - Deployments missing dependencies when publishing to JBoss
by G S
mrfrankblack [http://community.jboss.org/people/mrfrankblack] created the discussion
"Deployments missing dependencies when publishing to JBoss"
To view the discussion, visit: http://community.jboss.org/message/566330#566330
--------------------------------------------------------------
Hi, I'm trying to put an EAR file on the server (EJB+JPA) but it's giving me the following error. I put the MYSQL connector in the deploy folder, since it didn't seem to be recognising the datasource, but no luck...I'm using JBoss 5.1.0 and Eclipse Helios
{code}
17:42:05,537 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA' **")
Deployment "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
Deployment "persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA" is missing the following dependencies:
Dependency "jboss.jca:name=mysqlds,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=mysqlds,service=DataSourceBinding' **")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA' **
Deployment "jboss.jca:name=mysqlds,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=mysqlds,service=DataSourceBinding' **
17:42:05,557 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
17:42:05,624 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
17:42:05,632 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 47s:910ms
17:42:41,244 WARN [SaxJBossXBParser] schema_reference.4: Failed to read schema document ' http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. @ vfszip:/C:/Users/George/Desktop/jboss-5.1.0.GA/server/default/deploy/ObligEAR.ear/ObligatorioJPA.jar/META-INF/persistence.xml[2,248]
17:42:41,284 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10738507{vfszip:/C:/Users/George/Desktop/jboss-5.1.0.GA/server/default/deploy/ObligEAR.ear/EJBObli.jar/}
17:42:41,284 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@10738507{vfszip:/C:/Users/George/Desktop/jboss-5.1.0.GA/server/default/deploy/ObligEAR.ear/EJBObli.jar/}
17:42:41,301 INFO [JBossASKernel] Created KernelDeployment for: EJBObli.jar
17:42:41,301 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3
17:42:41,301 INFO [JBossASKernel] with dependencies:
17:42:41,302 INFO [JBossASKernel] and demands:
17:42:41,302 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
17:42:41,302 INFO [JBossASKernel] persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA
17:42:41,302 INFO [JBossASKernel] and supplies:
17:42:41,302 INFO [JBossASKernel] Class:ejb.ListaContactosRemote
17:42:41,302 INFO [JBossASKernel] jndi:ObligEAR/ListaContactos/remote-ejb.ListaContactosRemote
17:42:41,302 INFO [JBossASKernel] jndi:ObligEAR/ListaContactos/remote
17:42:41,302 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3) to KernelDeployment of: EJBObli.jar
17:42:41,305 INFO [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@10efa29{name=jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
17:42:41,411 WARN [HDScanner] Failed to process changes
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3" is missing the following dependencies:
Dependency "<UNKNOWN jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA' **")
Deployment "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
Deployment "persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA" is missing the following dependencies:
Dependency "jboss.jca:name=mysqlds,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=mysqlds,service=DataSourceBinding' **")
DEPLOYMENTS IN ERROR:
Deployment "<UNKNOWN jboss.j2ee:ear=ObligEAR.ear,jar=EJBObli.jar,name=ListaContactos,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=ObligEAR.ear/ObligatorioJPA.jar#ObligatorioJPA' **
Deployment "jboss.jca:name=mysqlds,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=mysqlds,service=DataSourceBinding' **
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
{code}
and here's the Persistence.xml
{xml}
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="ObligatorioJPA" transaction-type="JTA">
<jta-data-source>java:mysqlds</jta-data-source>
<class>bean.Contacto</class>
<class>bean.Empleado</class>
<class>bean.Direccion</class>
<properties>
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.use_sql_comments" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.hbm2ddl.auto" value="update" />
</properties>
</persistence-unit>
</persistence>
{xml}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566330#566330]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months
[Beginner's Corner] - JBoss clustering, mod_ajp and sticky sessions
by Willem Noorduin
Willem Noorduin [http://community.jboss.org/people/willemnoorduin] created the discussion
"JBoss clustering, mod_ajp and sticky sessions"
To view the discussion, visit: http://community.jboss.org/message/601585#601585
--------------------------------------------------------------
We have the following architecture:
JBoss-EWS 1.0.1 on 192.168.0.1
JBoss-AS 5.1.0 on 192.168.0.2 (jboss1) and 192.168.0.3 (jboss2)
On the JBoss-AS's there are instances app_i1 on jboss1, and app_i2 on jboss2, and hose together form a cluster (the instances are based on the all profile, so clustering is on.
We have deployed a application app to these instances, such that we can run the application like:
mailto:root@192.168.0.1 root(a)192.168.0.1 # lynx jboss1:8080/app
mailto:root@192.168.0.1 root(a)192.168.0.1 # lynx jboss2:8080/app
To configure the commnication between the JBoss-EWS and our JBoss-AS cluster we have made a
Virtual host copnfiguration:
<Proxy balancer://cluster/>
BalancerMember ajp://jboss1:8009/app/ route="node1" loadfactor=1 ping=10 ttl=600
BalancerMember ajp://jboss2:8009/app/ route="node2" loadfactor=1 ping=10 ttl=600
</Proxy>
<VirtualHost *:80>
ServerAdmin http://community.jboss.org/mailto:aap@noot.mies aap(a)noot.mies
DocumentRoot /apps/www.application.nl/data
ServerName http://www.application.nl www.application.nl
ErrorLog logs/www.application.nl-error_log
CustomLog logs/www.application.nl-access_log combined
LogLevel debug
ProxyTimeout 40
ProxyStatus On
ProxyPass /app balancer://cluster/ stickysession=JSESSIONID|jsessionid timeout=10
<Location /balancer-manager>
SetHandler balancer-manager
</Location>
</VirtualHost>
We started this configuration successfully, but what we see is that everytime apache sends a request to for example jboss1, it gets its response from the other clusternode on jboss2, resulting in a 404 and a failure, The solution for this problem is obviously sticky sessions, but I can not get this working. I have tested the following things:
A. Swiching back to good old mod_jk:
workers.properties:
#
# Connection to nlptc27b16 brpp cluster
#
worker.node1.port=8009
worker.node1.host=node1
worker.node1.type=ajp13
worker.node1.lbfactor=50
#
# Connection to nlptc27b17 brpp cluster
#
worker.node2.port=8009
worker.node2.host=node2
worker.node2.type=ajp13
worker.node2.lbfactor=50
#
# Loadbalancing behaviour
#
worker.loadbalancer_cluster.type=lb
worker.loadbalancer_cluster.balance_workers=node1,node2
worker.loadbalancer_cluster.sticky_session=1
I can get this to work (i.e. with the proper JkMounts I can reach the application via its url http://www.application.nl/app www.application.nl/app). But when I call some functionality (for example login to the app), the same problem occurs. I can see (for example with http watch that the application sends it request to one server and receives the answer from the other. I think this is typical round robin without sticky session.
B. Isolating one node
When I isolate one node in the mod_jk configuration, it does work allright, but obviously we want a cluster running.
When I isolate one node in the proxy_ajp configuration, it doesn't work, but I think I have some of the settings wrong.
*Question*
Can you help me with the settings of JBoss-EWS / JBoss-AS and maybe the application itself ? I have read many solutions on the JBoss Community, but they are all for a wrong version (for example UseJK, which isn't needed anymore by 5.1.0) or they simply don't apply / work in our situation ?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/601585#601585]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 8 months