[JBoss JIRA] Created: (JBJCA-240) Allow multi @Connector if it has deployment description
by Jeff Zhang (JIRA)
Allow multi @Connector if it has deployment description
--------------------------------------------------------
Key: JBJCA-240
URL: https://jira.jboss.org/jira/browse/JBJCA-240
Project: JBoss JCA
Issue Type: Bug
Components: Deployer
Reporter: Jeff Zhang
Assignee: Jeff Zhang
Fix For: 1.0.0.Alpha7
now it disallow multi @Connector define in rar.
method processConnector in Annotations.java
if (values.size() == 1)
{
...
}
else
throw new DeployException("More than one @Connector defined");
but in spec: (18.4)
If more than one JavaBean is annotated with the Connector annotation, the
application server must use the JavaBean class specified in the deployment
descriptor through the resourceadapter-class element. It is an error to provide
a resource adapter module with more than one JavaBean class annotated with the
Connector annotation and not providing a deployment descriptor.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JGRP-1115) TCPPING cookie read error on load
by Sanjay Prasad (JIRA)
TCPPING cookie read error on load
---------------------------------
Key: JGRP-1115
URL: https://jira.jboss.org/jira/browse/JGRP-1115
Project: JGroups
Issue Type: Bug
Affects Versions: 2.4.1 SP4
Environment: red hat linux 2.6.9-78.0.8.EL 64 bit, java 1.5, jboss 4.2.2
Reporter: Sanjay Prasad
Assignee: Bela Ban
BasicConnectionTable.java in JGroups-2.4.1-sp4.src/src/org/jgroups/blocks does not use readFully to read the cookie and so during high load, runs into cookie related error. Changing the line to readFully fixes the issue.
499
500 // read the cookie first
501 in.read(input_cookie, 0, input_cookie.length);
502 if(!matchCookie(input_cookie))
503 throw new SocketException("ConnectionTable.Connection .readPeerAddress(): cookie sent by " +
504 client_peer_addr + " does n ot match own cookie; terminating connection");
505 // then read the version
506 version=in.readShort();
507
doSend when it fails, removes the connection in the exception block and so the second try in _send always fails with the error "2nd attempt to send data failed too" as the connection is already closed.
void doSend(byte[] data, int offset, int length) throws Exception {
try {
// we're using 'double-writes', sending the buffer to the destination in 2 pieces. this would
// ensure that, if the peer closed the connection while we were idle, we would get an exception.
// this won't happen if we use a single write (see Stevens, ch. 5.13).
if(out != null) {
out.writeInt(length); // write the length of the data buffer first
Util.doubleWrite(data, offset, length, out);
out.flush(); // may not be very efficient (but safe)
}
}
catch(Exception ex) {
remove(peer_addr);
throw ex;
}
}
private void _send(byte[] data, int offset, int length) {
synchronized(send_mutex) {
try {
doSend(data, offset, length);
updateLastAccessed();
}
catch(IOException io_ex) {
if(log.isWarnEnabled())
log.warn("peer closed connection, trying to re-send msg");
try {
doSend(data, offset, length);
updateLastAccessed();
}
catch(IOException io_ex2) {
if(log.isErrorEnabled()) log.error("2nd attempt to send data failed too");
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JBAS-7559) Unable to add RMINotificationListener for "JMImplementation:type=MBeanServerDelegate" from different VM
by martin walla (JIRA)
Unable to add RMINotificationListener for "JMImplementation:type=MBeanServerDelegate" from different VM
-------------------------------------------------------------------------------------------------------
Key: JBAS-7559
URL: https://jira.jboss.org/jira/browse/JBAS-7559
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMX
Affects Versions: JBossAS-5.1.0.GA
Environment: Windows XP, JBoss 5.1.0.GA, JDK 1.6.0_16
Reporter: martin walla
Assignee: Dimitris Andreadis
I listen for the Notifications (JMX.mbean.registered, JMX.mbean.unregistered) of the MBeanServer "JMImplementation:type=MBeanServerDelegate".
I want to do that inside the JBoss VM and also from a different VM (e.g. a JUnit Test case).
I add a RMINotificationListener via the RMIAdaptor.
If i do it within the JBoss VM everything is fine and works OK.
If i do it from a different VM the RMINotificationListener class can't be found.
org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed
at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:513)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:233)
Caused by: java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.rmi.RMINotificationListener
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.jboss.invocation.MarshalledValueInputStream.resolveProxyClass(MarshalledValueInputStream.java:159)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:91)
at org.jboss.invocation.MarshalledInvocation.getArguments(MarshalledInvocation.java:509)
The reason is:
In case of calling addNotificationListener() from a different VM the invocation is a MarshalledInvocation.
In the invoke() method of the org.jboss.jmx.connector.invoker.InvokerAdaptorService there is a call to
Object[] args = invocation.getArguments();
In the getArguments() it comes to the unmarshalling of the arguments (one is the RMINotificationListener).
Therefore it is tried to load the argument classes via the Thread's contextClassLoader.
In the InvokerAdaptorService few statements before the getArguments() call there is a call to
getClassLoaderFor(ObjectName name) of the MBeanServerImpl
// Obtain the ClassLoader associated with the MBean deployment
newCL = server.getClassLoaderFor(objectName);
The InvokerAdaptorService then sets the Thread's contextClassLoader.
if (newCL != null && newCL != oldCL)
SecurityActions.setContextClassLoader(newCL);
In the method getClassLoaderFor() the SystemClassLoader is returned for the "JMImplementation:type=MBeanServerDelegate".
public ClassLoader getClassLoaderFor(ObjectName name)
throws InstanceNotFoundException
{
MBeanEntry entry = registry.get(name);
checkMBeanPermission(entry.getResourceClassName(), null, name,
"getClassLoaderFor");
ClassLoader cl = entry.getClassLoader();
if (cl == null)
cl = entry.getResourceInstance().getClass().getClassLoader();
if (cl == null)
cl = ClassLoader.getSystemClassLoader();
return cl;
}
The SystemClassLoader didn't the see RMINotificationListener.
Possible solution:
If null or the Thread's contextClassLoader would be returned instead of the SystemClassLoader then the InvokerAdaptorService
didn't modify the Thread's contextClassLoader and the RMINotificationListener is found (and it works OK).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months
[JBoss JIRA] Created: (JGRP-1117) BasicConnectionTable.Connection: buffer only increases, never shrinks
by Bela Ban (JIRA)
BasicConnectionTable.Connection: buffer only increases, never shrinks
---------------------------------------------------------------------
Key: JGRP-1117
URL: https://jira.jboss.org/jira/browse/JGRP-1117
Project: JGroups
Issue Type: Bug
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.4.8, 2.6.14, 2.8
The byte[] buffer in run() is increased with message size. However, when we accidentally read a wrong length field, e.g. as the result of someone connecting and sending crap, the buffer is way too big.
SOLUTION: create the buffer anew for every message.
[Email from Jimmy Wilson]
One of the issues appears to lead to a 1.5GB byte buffer inside ConnectionTable that is never reclaimed (it's the latest issue discussed on the case). We have heap dumps showing that this byte buffer grew to this size.
Dennis's comments from the ticket:
> The buffer appears to be the re-sizeable one from org.jgroups.blocks.BasicConnectionTable.Connection.run().
> The contents of the buffer is:
> JGroups version (2.4.5)
> IP Address (172.20.30.15:7900)
> list of: length (53)
> org.jgroups.Message (TCPPING for null-Data channel)
> The full data JGroups sends on a TCP connection is:
> Cookie ('b','e','l','a')
> JGroups version
> IP address
> list of: length, Message
> Connection.readPeerAddress is responsible for reading the cookie, JGroups version, and IP address. Connection.run then runs a loop that
> reads a length and Message and processes them.
> The buffer size is 1,650,814,049 => 0x62656c61 => "bela".
> So it looks like Connection.readPeerAddress is not pulling anything
> off the socket input stream before Connection.run is called, so run
> reads the cookie, thinks it's the buffer length to use, and starts
> reading until the buffer is full.
Dennis and I've spent some time looking at how this might happen, but it doesn't appear that the code is the problem.
The server side doesn't appear to be the problem because the 'bela' cookie/array is only received once (upon the reception of a connection), yet, for the code path to be what it appears, that array would have to be in the input stream twice.
The client side doesn't appear to be the problem as connections are created inside a synchronized block, and each connection is only initialized once (therefore the 'bela' cookie/array is only sent once).
Dennis currently suspects a JVM issue with threads, but we're just guessing at this point.
Do you have any thoughts on what might be happening here (there are other, more recent, private comments on the case)?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 10 months