Damien Fergusson

Greenhorn
+ Follow
since Oct 17, 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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Damien Fergusson

Randall Twede wrote:dont trust me, but string literals are stored in a different place. otherwise it is all the same



thats what I thought was well - apparently its not the case - I'm just hoping for someone to tell me why this is so!!
9 years ago
Had a simple question around Stringz instance pooling

If I have a situation like this:
Scenario 1:


and then flipped
Scenario 2:


In each case- how many objects are being created in the String Pool and Heap ?
I assumed both would create an equal number of objects (2 Objects - one single "aaa" for both lines in each scenario in the String pool and one for the new Operator).
I was told in an iview that this wasn't correct - I'm curious as to what is wrong with my understanding?
9 years ago
I managed to figure out what was wrong - pretty silly really!!
Anyways - posting here so anyone googling this issue might find this of help.

I was deleting the Object 2 thus:


However, I wasn't disassociating the Object 2 from Object 1 as well.
Before commit at anytime, in addition to deleting the target Object from the Entity Manager above, disassociate the Objects you are deleting from the parent object in the memory as well and this problem goes away.


This should fix the issue.
We have a business usecase where we need to delete a set of rows in a transaction!
The Object graph is very simple. Object 1 has CASCADE ALL as its attribute FYI:

Object 1 > One-to-Many > Object 2
We need to delete Object 2 entries.

On a local integration testing environment - we use org.springframework.transaction.jta.JtaTransactionManager for deleting the Hibernate entities - which works.
However, when deployed on the server, we use org.springframework.transaction.jta.WebSphereUowTransactionManager which throws this error:


0000002a RegisteredSyn E WTRN0074E:
Exception caught from before_completion synchronization operation: javax.persistence.EntityNotFoundException: deleted entity passed to persist:

[com.cmb.businessengine.apps.fileimport.core.domain.FileImportStatistics#<null>]
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:525)
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter$1.invoke
(WebSphereExtendedJTATransactionLookup.java:142)
at $Proxy98.beforeCompletion(Unknown Source)
at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.beforeCompletion(SynchronizationCallbackWrapper.java:65)
at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2449)
at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1675)
at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1646)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1581)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:247)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:168)
at com.ibm.ws.uow.UOWManagerImpl.uowCommit(UOWManagerImpl.java:1056)
at com.ibm.ws.uow.UOWManagerImpl.uowEnd(UOWManagerImpl.java:1026)
at com.ibm.ws.uow.UOWManagerImpl.runUnderNewUOW(UOWManagerImpl.java:976)
at com.ibm.ws.uow.UOWManagerImpl.runUnderUOW(UOWManagerImpl.java:510)
at org.springframework.transaction.jta.WebSphereUowTransactionManager.execute(WebSphereUowTransactionManager.java:252)


Can anyone suggest why it would pass when using org.springframework.transaction.jta.JtaTransactionManager but fails when using org.springframework.transaction.jta.WebSphereUowTransactionManager?

Six Sigma wrote:I had earlier created and ear and ejb-jar project in RAD and had successfully deployed it. My RAD crashed later and I had backed up these projects.
I successfully RE-IMPORTED the ear and jar successfully into my workspace after re-creating my RAD workspace.
But when I click "Prepare for Deployment" - nothing happens. When I start the Websphere Applcation Server from the Server View - my ear is not picked up!! (It USED to be picked up when I had manually created the ejb-jar and ear.) How do I get Websphere to publish my ear when I say "publish"?

Thanks




Never Mind I figured it out.
Right click on server target runtime and click "Add or Remove Projects" and select the project you want to auto deploy.
I had earlier created and ear and ejb-jar project in RAD and had successfully deployed it. My RAD crashed later and I had backed up these projects.
I successfully RE-IMPORTED the ear and jar successfully into my workspace after re-creating my RAD workspace.
But when I click "Prepare for Deployment" - nothing happens. When I start the Websphere Applcation Server from the Server View - my ear is not picked up!! (It USED to be picked up when I had manually created the ejb-jar and ear.) How do I get Websphere to publish my ear when I say "publish"?

Thanks
Never mind I figured it out!!! I hadn't attached an ADMIN SERVER to the JMSServer!!!

12 years ago
This is how I added the topic to Weblogic BTW
12 years ago
I did all these following steps :

Under a pre-existing JMSModule (SEE ATTACHMENT):
1. I added a new topic
2. Which asked for a submodule (i tried adding none as well as precreated one and added the topic to it)
3. Finished.

On activation - I try to look up the topic via JNDI and I get

Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'PriceFeedTopic'. Resolved ''

If you see the attachment - I dont see a target against my topic name. Could that be the reason why I can't lookup the topic?

Please help!!
12 years ago