[Clustering/JBoss] - Re: Slow failover - Plz read
by mohitanchlia
I got the logs and it shows me that Jboss is continuously trying to connect to the host that just got rebooted or crashed. I thought when EJB is @clustered it will round robin the invocation and not try same host over and over again. But what I am seeing is that Jboss repeatedly tries to connecto failed host. Could someone tell me what's going on?
---
2008-12-31 12:20:14,287 DEBUG [transport.socket.MicroSocketClientInvoker:ajp-0.0.0.0-8009-99] - SocketClientInvoker[18b118, socket://10.10.8.77:3873] got Exception java.net.NoRouteToHostException: No route to host, creation attempt took 3001 ms
2008-12-31 12:20:14,287 DEBUG [transport.socket.MicroSocketClientInvoker:ajp-0.0.0.0-8009-86] - SocketClientInvoker[18b118, socket://10.10.8.77:3873] got Exception java.net.NoRouteToHostException: No route to host, creation attempt took 3001 ms
2008-12-31 12:20:17,291 DEBUG [transport.socket.MicroSocketClientInvoker:ajp-0.0.0.0-8009-86] - SocketClientInvoker[18b118, socket://10.10.8.77:3873] got Exception java.net.NoRouteToHostException: No route to host, creation attempt took 3001 ms
2008-12-31 12:20:17,292 DEBUG [transport.socket.MicroSocketClientInvoker:ajp-0.0.0.0-8009-99] - SocketClientInvoker[18b118, socket://10.10.8.77:3873] got Exception java.net.NoRouteToHostException: No route to host, creation attempt took 3002 ms
..........
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199083#4199083
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199083
15 years, 10 months
[Remoting] - Re: JBREM-877: New Socket Connection is being Created for Ev
by kiwi_clive
Hi chaps,
Apologies if this has all been asked before but I cannot seem to find the definitive answer I was looking for and this post seems as close as I can get.
I am using jboss-4.2.2.GA, out of the box and using EJB3.
I see the same issues that were originally posted by Kumarselvan (JBREM-877), namely I see several sockets being closed when a client is obtaining a proxy connection and want to keep the socket open for the next request.
Having read your posts, I have edited
/Applications/jboss-4.2.2.GA/server/default/deploy/ejb3.deployer/META-INF/jboss-server.xml so that the ejb3 connector now reads:
<mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
| <depends>jboss.aop:service=AspectDeployer</depends>
| <attribute name="InvokerLocator">socket://${jboss.bind.address}:3873/?invokerDestructionDelay=5000</attribute>
| <attribute name="Configuration">
| <handlers>
| <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
| </handlers>
| </attribute>
| </mbean>
On restarting jboss, I see no difference in behaviour.
I then downloaded jboss-remoting 2.4.0.GA and replaced the jboss-remoting.jar under server/default/lib, restarted the server but see no difference in behaviour.
Am I being really stupid ? I hope so.
How can I make the socket linger and be reused and cutdown on the socket creation/destruction overhead ?
Any assistance will be gratefully received :-)
Clive
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199071#4199071
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199071
15 years, 10 months
[EJB 3.0] - Can't inject PersistenceContext, NullPointerException when u
by TristanS
I have been working through a JBoss (5.0.0.CR2) example using the tutorial at http://www.netbeans.org/kb/55/ejb30-jboss.html#Exercise_5 (however using Netbeans 6.5).
I have an entity set up and upon deployment it is creating the table on the database. My problem is when I try to use a SLSB as a facade to retrieve entities back from the database. The generated code is as follows:
| @Stateless
| public class CustomerFacade implements CustomerFacadeLocal {
| @PersistenceContext
| private EntityManager em;
|
| public void create(Customer customer) {
| em.persist(customer);
| }
|
| public void edit(Customer customer) {
| em.merge(customer);
| }
|
| public void remove(Customer customer) {
| em.remove(em.merge(customer));
| }
|
| public Customer find(Object id) {
| return em.find(Customer.class, id);
| }
|
| public List<Customer> findAll() {
| return em.createQuery("select object(o) from Customer as o").getResultList();
| }
|
| }
Unfortunately when I run this code, I get a NullPointerException upon usage of em because the PersistenceContext isn't being injected (I presume). This I'm sure is a config error, however I have also tried @PersistenceUnit(unitName = "PrototypeCRMSystem-ejbPU")
| private EntityManagerFactory emf;
|
| private EntityManager em = emf.createEntityManager(); which gives the same problem when accessing emf.
My persitence.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
| <persistence version="1.0" 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">
| <persistence-unit name="PrototypeCRMSystem-ejbPU" transaction-type="JTA">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/OracleDS</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9iDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.show_sql" value="true" />
| </properties>
| </persistence-unit>
| </persistence>
|
Am I missing something configuration-wise or is there a problem?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199064#4199064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199064
15 years, 10 months