[JBoss JIRA] Created: (JGRP-344) Ignore bind address for (receive) sockets
by Bela Ban (JIRA)
Ignore bind address for (receive) sockets
-----------------------------------------
Key: JGRP-344
URL: http://jira.jboss.com/jira/browse/JGRP-344
Project: JGroups
Issue Type: Task
Affects Versions: 2.4
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.5
For multicast sockets, bind address defines the NIC which will be used to receive and send IP multicast packets. For unicast sockets (e.g. ServerSocket), this is an unnecessary restriction and bind address should be ignored. For example, if we define bind_addr=1.2.3.4, then we will be able to only receive packets on 1.2.3.4, but not 5.6.7.8 etc.
However, currently bind_addr is used to define the *identity* of a member, so we still need to use it (although not set it in a socket). This will be easier once we have logical addresses.
Email by Satya:
Hi,
I have found an issue which is to be fixed in 2.5. I
want to know if my issue is realted to this issue.
The description is as follows:
If -Dbind.address or bind_addr are not set, JGroups
picks the NIC to bind sockets to itself. However,
especially for ServerSockets, this may not be
desirable because we may want to have ServerSockets be
able to receive packets through all interfaces, e.g.
- NICs are 192.168.5.2, 192.168.0.2 and 127.0.0.1
(loopback)
- When the bind address is set to 192.168.5.2, a given
ServerSocket on port 7500 will *only accept packets
from this NIC*
- If someone connects to 192.168.0.2:7500 or
127.0.0.1:7500, the client will not be able to
establish a connection because nobody is listening on
those ports on the given NICs
- If bind address was not set, this would be possible
- Affected: FD_SOCK, FD_PING, TCP, TCP_NIO etc
- We need to think about semantics for
MulticastSockets where a wildcard address (not setting
the bind address) means that the operating system
picks the NIC, and *not* that the MulticastSocket will
listen on all interfaces for incoming packets
Regards,
Satya.
--- satya narayana <satya_461(a)yahoo.com> wrote:
> > Hi Bela,
> >
> > It worked for me as long as I was stopping the NIC's
> > which GMS address doesn't correspond.
> >
> > When I stopped the NIC which has the GMS Address
> > specified by the member, I see them not
> > communicating.
> >
> > If u have tried this and working for you , can you
> > tell me the properties and options which u have
> > specified to your demo ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 4 months
[JBoss JIRA] Created: (EJBTHREE-653) No pooling for stateless session beans
by Guido Bening (JIRA)
No pooling for stateless session beans
--------------------------------------
Key: EJBTHREE-653
URL: http://jira.jboss.com/jira/browse/EJBTHREE-653
Project: EJB 3.0
Issue Type: Bug
Components: EJB3 Extensions
Affects Versions: EJB 3.0 RC8 - FD
Environment: OS: Windows XP SP2
JDK 1.5.0_06_b05
JBoss AS 4.0.4 GA
Reporter: Guido Bening
Scenario:
Client VM calls a method on a EJB 2 Stateful Session Bean (SFSB) via the remote interface in a loop for 1000 times.Transaction starts on the application server. The SFSB method calls a method on a EJB3 Stateless Session Bean (SLSB) - via the remote interface (local interface makes no difference).
The print out in the PostConstruct callback method of the EJB3 SLSB shows us, that a new bean instance was created for each of the 1000 method calls. Because of ThreadLocal pooling approach, we print out the Thread id too to show, that we always have the same Thread for each method call.
CallBack method:
/**
* EJBCreate method.
*/
@PostConstruct
public void ejb3Create() {
System.out.println("New SessionBean " + this);
System.out.println("Thread " + Thread.currentThread().getId());
setupBean();
}
And the log for a few of the 1000 calls:
...
09:17:51,119 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@231ae2
09:17:51,129 INFO [STDOUT] Thread 97
09:17:51,139 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@1662174
09:17:51,139 INFO [STDOUT] Thread 97
09:17:51,219 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@189f155
09:17:51,219 INFO [STDOUT] Thread 97
09:17:51,239 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@1a82dfb
09:17:51,239 INFO [STDOUT] Thread 97
09:17:51,289 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@198813a
09:17:51,289 INFO [STDOUT] Thread 97
09:17:51,309 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@59eefd
09:17:51,309 INFO [STDOUT] Thread 97
09:17:51,359 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@2e3520
09:17:51,369 INFO [STDOUT] Thread 97
09:17:51,379 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@1ed457
09:17:51,379 INFO [STDOUT] Thread 97
09:17:51,439 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@1e1c7f3
09:17:51,439 INFO [STDOUT] Thread 97
09:17:51,449 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@15cb8ed
09:17:51,449 INFO [STDOUT] Thread 97
09:17:51,519 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@1a4a949
09:17:51,519 INFO [STDOUT] Thread 97
09:17:51,529 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@19ae0a
09:17:51,529 INFO [STDOUT] Thread 97
09:17:51,589 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@567fa0
09:17:51,599 INFO [STDOUT] Thread 97
09:17:51,609 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@19956fe
09:17:51,609 INFO [STDOUT] Thread 97
09:17:51,659 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@150e574
09:17:51,669 INFO [STDOUT] Thread 97
09:17:51,679 INFO [STDOUT] New SessionBean com.jcoffee.components.um3.UserManagementComponent3@aa46ad
09:17:51,679 INFO [STDOUT] Thread 97
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 4 months
[JBoss JIRA] Created: (EJBTHREE-659) SFSB throws exception with second passivation
by Ben Wang (JIRA)
SFSB throws exception with second passivation
---------------------------------------------
Key: EJBTHREE-659
URL: http://jira.jboss.com/jira/browse/EJBTHREE-659
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC8 - FD
Reporter: Ben Wang
Assigned To: Ben Wang
Fix For: EJB 3.0 RC9 - FD
I have created a test case to illustrate this for both SimpleStatefulCache and StatefulTreeCache, NestedBeanUnitTestCase (cache and clusteredsession). Basically, if we do this:
bean.getXXX
sleep(10000); // to passivate
bean.getXXX; // to acitvate
sleep(10000); // to passivate again
This will produce:
2006-07-24 04:46:59,358 ERROR [org.jboss.ejb3.cache.simple.SimpleStatefulCache] problem passivation thread^M
javax.ejb.EJBException: Could not passivate; failed to save state^M
at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:363)^M
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.passivate(SimpleStatefulCache.java:196)^M
at org.jboss.ejb3.cache.simple.SimpleStatefulCache$SessionTimeoutTask.run(SimpleStatefulCache.java:129)^M
Caused by: java.lang.NullPointerException^M
at org.jboss.serial.util.StringUtil.calculateUTFSize(StringUtil.java:319)^M
at org.jboss.serial.util.StringUtil.saveString(StringUtil.java:63)^M
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeUTF(DataContainer.java:265)^M
at org.jboss.ejb3.stateful.StatefulBeanContextReference.writeExternal(StatefulBeanContextReference.java:65)^M
at org.jboss.serial.persister.ExternalizePersister.writeData(ExternalizePersister.java:58)^M
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.describeObject(ObjectDescriptorFactory.java:275)^M
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectOutput.writeObject(DataContainer.java:197)^M
at org.jboss.serial.io.JBossObjectOutputStream.writeObjectOverride(JBossObjectOutputStream.java:181)^M
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)^M
at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:347)^M
... 2 more^M
This is caused by a bug from ProxiedStatefuleBeanContext serialization where we dont serialiaze parentRef if it is not null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 4 months