[IronJacamar] - Jackrabbit shows 'Destroying connection that could not successfully matched' warnings and runs out of connections
by Marcus Bauer
Marcus Bauer [https://community.jboss.org/people/mabako] created the discussion
"Jackrabbit shows 'Destroying connection that could not successfully matched' warnings and runs out of connections"
To view the discussion, visit: https://community.jboss.org/message/782996#782996
--------------------------------------------------------------
Hey,
I've recently written a small application which's storing things in the Content Repository provided by JackRabbit. Since I ran into the bug described in https://issues.apache.org/jira/browse/JCR-3425 JCR-3425, I'm using a recent 2.6-SNAPSHOT release built directly from source, deployed as *.rar. The whole thing runs on JBoss AS 7.1.1.
My code is the following, with exception handling stripped:
Repository repo = (Repository) new InitialContext().lookup("java:/project/jcr");
Session session = repo.login(new SimpleCredentials(user, "*".toCharArray()));
Node dir = session.getRootNode();
doSomethingWithTheInputStream(dir.getNode(...).getNode(Property.JCR_CONTENT).getProperty(Property.JCR_DATA).getBinary().getStream());
session.logout();
Upon calling session.logout, the following message appears in my log file whatsoever:
09:10:00,701 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (http--127.0.0.1-8000-14) IJ000612: Destroying connection that could not be successfully matched: org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@6710ee[state=NORMAL managed connection=org.apache.jackrabbit.jca.JCAManagedConnection@13ccdd8 connection handles=0 lastUse=1355299797231 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@1b24dbd pool internal context=SemaphoreArrayListManagedConnectionPool@6afb99[pool=jackrabbit-jca-pool] xaResource=XAResourceWrapperImpl@ee436b[xaResource=session-anonym-148 pad=false overrideRmValue=false productName=Jackrabbit productVersion=2.6-SNAPSHOT jndiName=java:/themis/jcr] txSync=null
And eventually, the following (may or may not have to do with how many connections I open) problem occurs.
09:11:37,141 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/project].[Faces Servlet]] (http--127.0.0.1-8000-14) Servlet.service() for servlet Faces Servlet threw exception: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (30000 [ms])
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:377)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.apache.jackrabbit.jca.JCARepositoryHandle.login(JCARepositoryHandle.java:75)
at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
*Is there any way to avoid aforementioned warnings/exception?*
The Jackrabbit resource adapter is configured as follows:
<subsystem xmlns="urn:jboss:domain:jca:1.1">
<archive-validation enabled="false" fail-on-error="true" fail-on-warn="false"/>
<bean-validation enabled="true"/>
<default-workmanager>
<short-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="50"/>
<queue-length count="50"/>
<max-threads count="50"/>
<keepalive-time time="10" unit="seconds"/>
</long-running-threads>
</default-workmanager>
<cached-connection-manager debug="false" error="false"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
<resource-adapters>
<resource-adapter>
<archive>
jackrabbit-jca-2.6-SNAPSHOT.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="java:/project/jcr" enabled="true" use-java-context="true" pool-name="jackrabbit-jca-pool" use-ccm="true">
<config-property name="ConfigFile">
${jboss.server.config.dir}${/}jackrabbit.xml
</config-property>
<config-property name="BindSessionToTransaction">
false
</config-property>
<config-property name="HomeDir">
${jboss.server.data.dir}${/}jackrabbit${/}
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
</subsystem>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/782996#782996]
Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[EJB3] - Event Handling between two EJB-JARs (Observer Pattern?)
by Patrick M.
Patrick M. [https://community.jboss.org/people/patsinnervoice] created the discussion
"Event Handling between two EJB-JARs (Observer Pattern?)"
To view the discussion, visit: https://community.jboss.org/message/783044#783044
--------------------------------------------------------------
Hi,
I'm new to EJB development and currently search for the best/correct way to handle events between two EJB-JARs which are in one EAR.
I tried to use the Observer Pattern. The event gets fired in BeanA but does not reach BeanB (as stated, two different EJB-JARs = two different Eclipse Projects in one Workspace / EAR).
My Code currently looks kind of like this:
@DependsOn("BeanB")
@Startup
@Singleton
@WebService
public class BeanA implements BeanARemote, BeanBLocal{
@PersistenceContext
private EntityManager em;
@EJB
private BeanA beanA;
public void listenToReceivedEvent(@Observes ReceivedEvent events){
Query query = em.Query("some query");
//implementation
}
}
@Singleton
public class BeanB implements BeanBLocal {
@Inject
Event<ReceivedEvent> events;
public void fireEvent() {
//implementation
ReceivedEvent e = new ReceivedEvent(stringList);
event.fire(e);
}
}
public class ReceivedEvent {
private List<String> stringList;
public ReceivedEvent(final List<String> stringList) {
this.stringList= stringList;
}
public List<String> getStrings() {
return stringList;
}
}
Currently, when on BeanB the event is fired at BeanA nothing happens. My question now is: is the Observer Pattern the correct pattern in this case? Did I forgot something in this sample why the BeanA does not gets the event? Is the Observer Pattern made for event communication between two differen EJB-JARs?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783044#783044]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months
[Beginner's Corner] - Deploying JDBC drivers and Datasources via jboss-cli.sh
by Willem Noorduin
Willem Noorduin [https://community.jboss.org/people/willemnoorduin] created the discussion
"Deploying JDBC drivers and Datasources via jboss-cli.sh"
To view the discussion, visit: https://community.jboss.org/message/779071#779071
--------------------------------------------------------------
In JBoss 7 / JBoss-EAP-6 I have made a domain-master (running on server1) and a slave (running on server2, and has server1 as its master. I have made a server-group and a server-config like this:
[domain@server1:9999 server-group] /server-group=one-server-group/:add(profile=full-ha,socket-binding-group=full-ha-sockets,jvm=default)
[domain@server1:9999 /] /host=server2/server-config=slave:add(auto-start=true, group=one-server-group, socket-binding-group=full-ha-sockets, socket-binding-port-offset=0)
[domain@server1:9999 /] /host=server2/server-config=slave:start
I would like deploy / add JDBC drivers and datasources via the cli, but:
[domain@server1:9999 subsystem=datasources] /host=server2/server=slave/subsystem=datasources/jdbc-driver=mysql:add(driver-name="mysql",driver-module-name="com.mysql.jdbc",driver-xa-datasource-class-name="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource")
Failed to get the list of the operation properties: "JBAS014753: There is no operation add registered at address [
("subsystem" => "datasources"),
("jdbc-driver" => "mysql")
]"
What do I do wrong. I can't reach the datasource subsystem of the master too, so I can't add it there either (of course, I can edit it manually to the domain.xml of the slave,, but then it still don't show up in my installed-drivers-list command.
Or do you have to define all drivers and datasources on the master ?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779071#779071]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 4 months