Win a copy of Head First Android this week in the Android forum!

Adrian Bates

Greenhorn
+ Follow
since Jun 01, 2005
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 Adrian Bates

Someone has posted what looks like an answer to this question over on the server side forum here:

http://www.theserverside.com/discussions/thread.tss?thread_id=38100

I still have a question about the different types of the canonical form. I have added this to the same thread on the Server Side forum so please check out the above link.

All help still grateful received.

Adrian
15 years ago
One of the obvious approaches to this problem would be with an XSLT stylesheet and perform a transform on the XML. Anyone know where I might find a stylesheet for this? I can't help feeling that this is a standard transform and that there therefore should be a standard stylesheet for it.


Adrian
15 years ago
Thanks, thats a much better article.

Now I just need to know how to do it in Java. Anyone any ideas?

Adrian
15 years ago
Can anyone tell me (or point me to an article that tells me) how to produce a canonical form of an XML message. I need to do this before I produce a public / private key pair signature for the message.

If anyone knows of a good article on Canonical form I would be interested in that too. The only document that I have managed to find is the W3C white paper and that is completely illegable.

Thanks in advance,
Adrian
15 years ago
Can anyone tell me (or point me to an article that tells me) how to produce a canonical form of an XML message. I need to do this before I produce a public / private key pair signature for the message.

If anyone knows of a good article on Canonical form I would be interested in that too. The only document that I have managed to find is the W3C white paper and that is completely illegable.

Thanks in advance,
Adrian
15 years ago
I have an application that contains various session beans and entity beans. How do I configure the pool sizes for these when I deploy them to Websphere Application Server?

And is this same way used when testing them in the Universal Test Client in WASD?

Thanks in advance,
Adrian
16 years ago
Thanks for the replies guys.

So in my test case where I am forcing it to throw an application exception, DuplicateKeyException, I can catch this and throw an EJBException instead and this will cause a rollback? Is that right?

Adrian
All methods in the home interface will just be method stubs (i.e. abstract) as this is an interface. The actual class that implements this interface is automatically generated and you don't need to worry about it. This is not your problem.
I am trying to write my first EJB using container managed transactions. I have defined the EJB and added a container transaction type of Required to it.

The EJB method adds records to 2 different database tables and when I force an error to occur with the 2nd insert it doesn't rollback the 1st.

Is there something else that I need to do? I assumed that if the method on the EJB exited with an exception then it would automatically rollback. Is this not right?

Thanks in advance,
Adrian
Are you testing this method inside a small test harness? Is the method you are calling static by any chance?
A web app handles requests for static data such as HTML pages and JPG images. An App Server is a much more complicated beast that is required to produce dynamic pages. It does this by supporting programming laguages.

Adrian
I seem to have found a fudge that gets round this problem. By setting the key to some unique value the problem is avoided. This value is then overwritten by the trigger on the database.

Whats really strange is that it appear to have to be unique across all entity beans that I creat in a single transaction even if they are of different types.
Thanks for the clear and complete reply Roger. Now I understand better.

Adrian
I have two entity bean with a CMR between them. I am successfully creating the first one but when I try and create the child entity bean I get a NullPointerException.

Now I think this is because the gernerated code tries to get the primary key of the created entity bean and this is not set as it is set using a auto number in the database (An oracle sequence and trigger).

Is there anyway i can get round this problem?

This is the auto generated code:

public dmd.sync.ejbs.entity.AppliancePackInfoLocal create_Local(dmd.sync.dataobjects.dto.AppliancePackInfoDTO appliancePackInfoDTO, dmd.sync.ejbs.entity.AmppLocal amppLocal) throws javax.ejb.CreateException, java.rmi.RemoteException {

BeanO beanO = null;
dmd.sync.ejbs.entity.AppliancePackInfoLocal result = null;
boolean createFailed = false;
boolean preCreateFlag = false;

try {
beanO = super.createBeanO();
dmd.sync.ejbs.entity.AppliancePackInfoBean bean = (dmd.sync.ejbs.entity.AppliancePackInfoBean) beanO.getEnterpriseBean();
preCreateFlag = super.preEjbCreate(beanO);
bean.ejbCreate(appliancePackInfoDTO, amppLocal);
Object ejsKey = keyFromBean(bean);
result = (dmd.sync.ejbs.entity.AppliancePackInfoLocal) super.postCreate_Local(beanO, ejsKey, true);
bean.ejbPostCreate(appliancePackInfoDTO, amppLocal);
super.afterPostCreate(beanO, ejsKey);
}


It must be falling over on the last line as it calls the bean.ejbPostCreate fine.


Thanks in advance,
Adrian
Thanks for the reply.

This is all fine except that I am using entity beans as my database connection and therefore am not getting a connectionFactory etc.

[ July 15, 2005: Message edited by: Adrian Bates ]
[ July 15, 2005: Message edited by: Adrian Bates ]