[EJB 3.0] - Re: $Proxy200 error & Invalid (i.e. remote) invocation of lo
by Wolfgang Knauf
Hi,
to comment on one of your older questions:
anonymous wrote : You are right...it is all managed by the container especially when using entity managers but surely you have to be calling em.gettransaction.begin(), em.gettransaction.commit(),em.persist(object) from somewhere in code to make it happen !
By default a transaction is started automatically when you call a session bean method from the client, and it is committed afterwards. So you don't need to care about them.
More control over transaction (e.g. you want to start new one if one session bean calls another bean's method) can be achieved through annotations like @RequiresNew.
And only if all this is not sufficient, you can perform your own transaction handling. But in most use cases, the default behavior is good enough I think.
Hope this helps
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200328#4200328
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200328
17 years, 3 months
[Performance Tuning] - Identifying the thread that is eating up my CPU
by mattlf
Hi
I need a little bit of help to get started
I use jboss4.2.2 with Jboss Messaging 1.4.0 SP3
My application is eating up 100% CPU and I am trying to find out which thread is responsible for it
When I run htop and I sort by CPU usage I see that my application created many threads and especially 2 of them eating up the CPU
PID User PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
21997 root 16 0 2080M 1403M 129M S 100 18.3 5h35:28 /usr/lib/jvm/java-1.5.0-sun/bin/java -Dprogram.name=run.sh -server -Xms1024 -Xmx1024 -Dsun.rmi.dgc.client.gcInterval=3600000 ...........
21998 root 17 0 2080M 1403M 129M R 92.8 18.3 4h28:52 /usr/lib/jvm/java-1.5.0-sun/bin/java -Dprogram.name=run.sh -server -Xms1024 -Xmx1024 -Dsun.rmi.dgc.client.gcInterval=3600000 ...........
All other threads related to this application have CPU = 0%
When I run jps, I see
26596 Jps
21997 Main
When I run jstack 21997 > /tmp/jstack.21997 and view jstack.21997 then I don't see any information related to PID 21998
Why is that? I am trying to get an understanding of what the thread 21998 is doing but why can't I see anything about it in the jstack dump of the process 21997 ?
I would appreciate any help
Thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200327#4200327
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200327
17 years, 3 months
[JBoss jBPM] - Re: Transition loop
by insanely.freak
I have a workflow requirement where I need to keep asking users in a system for approval till it is approved by all of them.
I decided to loop over two jbpm nodes first being decision node and then a task node.
Here I get a StackOverFlow Exception when i load the taskinstance from db again and try to end it. I have searched across various forums, only solution ppl seems to suggest for this is to persist it.
Currently I am persisting the task instance created and then I end the task by fetching it from database. After this flow is suppose to go to decision node and decide whether to go to task node or to end. but as soon as it reached decision node I get StackOverflow exception.
Cud anyone explain where and how i need to persist.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200315#4200315
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200315
17 years, 3 months
[JBoss jBPM] - Re: Stack overflow on recursive patten.
by insanely.freak
I have a workflow requirement where I need to keep asking users in a system for approval till it is approved by all of them.
I decided to loop over two jbpm nodes first being decision node and then a task node.
Here I get a StackOverFlow Exception when i load the taskinstance from db again and try to end it. I have searched across various forums, only solution ppl seems to suggest for this is to persist it.
Currently I am persisting the task instance created and then I end the task by fetching it from database. After this flow is suppose to go to decision node and decide whether to go to task node or to end. but as soon as it reached decision node I get StackOverflow exception.
Cud anyone explain where and how i need to persist.
It will be very help full if somebody can share what approach/design did they have used to resolve this problem. Any input will be helpful and is appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200314#4200314
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200314
17 years, 3 months
[EJB 3.0] - Re: $Proxy200 error & Invalid (i.e. remote) invocation of lo
by ezanih
Ok, I've finally solved the problem. Since I'm using JBoss server, it seems that everything that I put directly on the classpath is overriden by what's in the JBoss client directory especially the hibernate files. So anybody using JBoss, do be careful especially when you are doing the Hibernate Compatibility Matrix portion.
Now all I need to know is, since my client is calling my session bean is calling my wrapper datasource which persists the entity to db, where do I place my em.gettransaction.begin(), em.persist(entity), em.gettransaction.commit() and em.gettransaction.rollback() commands?
Do I do it in the client as follows :-
| BiddingTestBeanRemote bidder= (BiddingTestBeanRemote) ctx.lookup("BiddingTestEAR/BiddingTestBean/remote");
| //BiddingTestBeanLocal bidder = (BiddingTestBeanLocal) PortableRemoteObject.narrow (obj, BiddingTestBean.class);
|
| em.getTransaction().begin();
| bidder.setBidder(); // call the bean's setter method
| em.persist(bidder);
| em.getTransaction().commit();
|
or in the bean as follows :-
| em.getTransaction().begin();
| Bidder bidder = new Bidder();
| bidder.setBidderName("Bidder No 1");
| bidder.setBidSessionId(1);
| em.persist(bidder);
| em.getTransaction().commit();
|
Please can somebody help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200312#4200312
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200312
17 years, 3 months
[JBoss Messaging] - How to configure Connection Factories for No Transactions an
by jammy
I am a new user to JBoss Messaging. Using JBoss Messaging 1.4.0 SP3.
I tried forming Connection Factories with it; but found that all the connection factories were by default created for XA_Transactions.
I need to create Connection Factories for Local Transactions and No Transactions.
I had modified connection-factories-service.xml with the following entries, and created a few MBean entries all of them turned out to be XA Transaction Connection Factory.
<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
name="jboss.messaging.connectionfactory:service=LTConnectionFactory"
xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
<depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket
jboss.messaging:service=PostOffice
/LTConnectionFactory
java:/LTConnectionFactory
Let me know what else I need to do. I read through the JBoss Messaging 1.4 Users Guide. But couldn't find any related information.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200310#4200310
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200310
17 years, 3 months