everson santos

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

Recent posts by everson santos

helllllo

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 ?


for(1000){
//call ejb method//some inserts and select with jpa/hibernate
//Thread.sleep(5000)
for(3 - 24){
//call ejb method //some inserts and select with jpa/hibernate
//Thread.sleep(5000)

}
}
7 years ago


i think the problem is here:
ctx.lookup("java:comp/env/ejb/mhbAdapterrel1_0/mhbAdapterApprel1_0/ProfileSLHome");



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
ctx.lookup("feijaoEAR/MeuFeijao/local")


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: br.sc.ejb.pessoa.MyMDB 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(DeploymentException.java:49)
at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:135)
at org.jboss.resource.deployers.RARDeployment.createActivationSpec(RARDeployment.java:313)
at org.jboss.resource.deployers.RARDeployment.internalInvoke(RARDeployment.java:276)
at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:58)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:320)
at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:205)
at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:224)
at org.jboss.ejb3.mdb.MessagingContainer.lockedStart(MessagingContainer.java:176)
at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:884)
at sun.reflect.GeneratedMethodAccessor386.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
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(PropertyEditors.java:354)
at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:285)
at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:129)

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"



Hi!

I'm using jboss, but it worked. I follow this steps below and jee5 tutorial
http://blog.emmanuelbernard.com/2008/08/remotely-send-and-consume-messages-with.html

Thanks

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 ?

thanks!


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....


7 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





Hello!

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

8 years ago