Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!

everson santos

Ranch Hand
+ Follow
since Jul 11, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by everson santos


i have a looping between 1000 and 1500 interations, inside each loop I have other one with between 3 and 24, in the most cases 12. I put a thread to hold the loop to avoid the database connection stackoverflow, but sometimes i got exceptions. Too, sometimes the database get locked, and is necessary kill de process.(could it happen because the thread ?).

So, whats the best way to me fix it ?

//call ejb method//some inserts and select with jpa/hibernate
for(3 - 24){
//call ejb method //some inserts and select with jpa/hibernate

9 years ago

i think the problem is here:

try to look when jboss is starting the right jndi name for your ejb.. you can looking for "ProfileSLHome"

I have as below with ejb3:
22:48:25,730 INFO [JBossASKernel] and supplies:
22:48:25,730 INFO [JBossASKernel] jndi:feijaoEAR/MeuFeijao/remote
22:48:25,730 INFO [JBossASKernel] jndi:feijaoEAR/MeuFeijao/local-br.feijao.ejb.MeuFeijaoLocal
22:48:25,730 INFO [JBossASKernel] jndi:feijaoEAR/MeuFeijao/local
22:48:25,730 INFO [JBossASKernel] Class:br.feijao.ejb.MeuFeijaoLocal

I would like after do something consume/delete/take out the message from queue, but I can't ....

Eg. I have 4 messages on queue and I want consume just one

* I tried code below, but i got error

I fix my problem change userName to user

I created a queue in destinations-service.xml from jboss like:

To send a messsage I don't have problems, but the MDB get an error

the error

08:23:55,976 INFO [EJBContainer] STARTED EJB: ejbName: MyMDB
08:23:55,982 ERROR [AbstractKernelController] Error installing to Start: name=jboss.j2ee:jar=myesb.esb,name=MyMDB,service=EJB3 state=Create
org.jboss.deployers.spi.DeploymentException: Error for ActivationSpec class org.jboss.resource.adapter.jms.inflow.JmsActivationSpec as JavaBean
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(
at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(
at org.jboss.resource.deployers.RARDeployment.createActivationSpec(
at org.jboss.resource.deployers.RARDeployment.internalInvoke(
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(
at org.jboss.ejb3.mdb.MessagingContainer.lockedStart(
at org.jboss.ejb3.EJBContainer.start(
at sun.reflect.GeneratedMethodAccessor386.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(
at org.jboss.dependency.plugins.AbstractControllerContext.install(
at org.jboss.dependency.plugins.AbstractController.install(
at org.jboss.dependency.plugins.AbstractController.incrementState(
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
at org.jboss.dependency.plugins.AbstractController.install(
at org.jboss.dependency.plugins.AbstractController.install(
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(
at org.jboss.dependency.plugins.AbstractControllerContext.install(
at org.jboss.dependency.plugins.AbstractController.install(
at org.jboss.dependency.plugins.AbstractController.incrementState(
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
at org.jboss.dependency.plugins.AbstractController.resolveContexts(
at org.jboss.dependency.plugins.AbstractController.change(
at org.jboss.dependency.plugins.AbstractController.change(
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(
at java.util.concurrent.Executors$
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(
at java.util.concurrent.FutureTask.runAndReset(
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(
at java.util.concurrent.ScheduledThreadPoolExecutor$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.beans.IntrospectionException: No property found for: userName on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@17c942a(ra=null destination=queue/MyQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null pass=<not shown> maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(
at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(
at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(

ntumba lobo wrote:if you have your mdb running on serverA and the queue on server you can create on serverA a connectionfactory (remoteCF) that points to server B.
your mdb on serverA will get its connections from this remoteCF.

To do this in glassfish you can configure your connection factory with a property called "AddressList" that allows to point remotely.
This property may be server specific so you need to check the doc of your server for the equivalent property.

what you are trying to do is described in the jee5 tutorial from p981 "An Application ExampleThat Consumes Messages froma
Remote Server"


I'm using jboss, but it worked. I follow this steps below and jee5 tutorial


you can use eclipse plugin like jboss tools and jboss server it's enough.
eclipse menu help - instal new software or eclipse marketplace

ntumba lobo wrote:Yes it is possible, you need to do a remote JNDI look up.
From server A if you want to access a JMS resource on server B you need to create an InitialContext object with extra parameters
like url provider that is pointing to server B.

Hi, thanks to answer ..

I understand what you said, but how can I do that using message drive bean deployed on server A listening messages from server B ?

I would like to know if is possible to access a jms queue of a jboss running on server A from an application running on server B. The server A and B are different machines.

If is possible, how can I do that ?


I'm trying to create a webservice client using wsconsume but i'm getting the error: [ERROR] rpc/encoded wsdls are not supported in JAXWS 2.0.

I tried to use axis2 for netbeans, but a lot of classes was created and i don't know what i have to do with that....

9 years ago
No, are different tables. One table I try delete using jpa and other table i try with jdbc( i just call a method delete to do it, all thing about connection, statement ... is encapsulated.)

at moment i can't use xa datasource. But if it is only solution i'll try do that

persistence.xml i have: <jta-data-source>java:senai</jta-data-source>
datasource.xml is <local-tx-datasource>
I'm trying to do 2 deletes, one managed by jpa and other by jdbc. The jdbc delete is made by jbossesb api, I don't have any control.
I can delete when I do 2 methods for each delete using @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) . But I need the both delete in same transaction, because or delete both or any.

Follow my situation: jboss do an insert on table(jdbc) A and the id generated is used to insert on table(jpa) B. These tables don't have relationship, the id from table A is just a field on table B, no pk or fk.
Table A is created by jboss and has own datasource, table B is created by me and have other datasource, table B is a java @Entity.
The transactions are control by container

How could I do the both delete in same transaction ???

the excetpion

the code from jbossesb api

my ejb is called by method below

my ejb

My mappings


I have the web service below:

This service is called by a php client, this code below is just a mock to test

The soap I get has the format below

I'd like to know how I could get a xml soap like format below or near that.

Maybe the xml's can be differents, because a cut some randon pieces to get short

9 years ago