Vinay Raj

Ranch Hand
+ Follow
since Jun 19, 2006
Merit badge: grant badges
For More
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 Vinay Raj

To elaborate further. Relationship tables require the primary key information of the parent table of the relationship. Some times primary key generation is deferred to the database(e.g. trigger based PK generation). In such cases PKs are generated on completion of the ejbCreate method invocation. Hence an ejbPostCreate method is provided to retrieve the PK and assign it to the relationship tables.
Check the locking policy set for the entity bean. For details regarding the locking policies available in WAS refer url.
You need to check the database driver classes configured for your datasource. They should be XA Drivers. For example, for Oracle database one should use oracle.jdbc.xa.client.OracleXADataSource.
Templating languages help you define a skeleton structure of a file. The structure will have static and dynamic aspects. The dynamic aspect can be added at runtime. For example, velocity can be used to generate a Java source file which implements DAO pattern. Instead of hand coding the DAO for each persistent object. One would use a templating language to define the skeleton of the DAO and add the table specific part in it at runtime.
Replies to your questions:

I believe in your first question you are enquiring if developing object hierarchy in the TO will have a performance impact. To a certain extent it will. While passing over the wire more information regarding the object structure/hierarchy would be required. However if the object hierarchy is necessary, I would not be too worried about the impact unless you have deep object hierarchy.

Primitive data types consume less memory, hence would consume lesser number of bytes while sending them across the wire. I recommend you use them wherever possible.

Using TO is always a good idea and will definitely boost performance.
One reason why one would use a TO is if the application uses remote invocations. To reduce chattiness over the network, multiple method calls are wrapped around a single method and all information/data required is sent to the method via a single TO.

The second reason would be to define a crisp interface. Method invocations can be remote or local, however we want to clearly define the method to be invoked to achieve a given functionality. E.g. we can define a insurance Quoting Engine in two ways. One have setters for each of the parameter like age, face amount, gender etc on the Quoting engine or define a single TO encapsulating all the required attributes. Advantage is that addition of a new attribute/property does not affect the interface signature.
Java Transaction Processing should provide you with an indepth explanation of the JTA and its use in various areas under the Java EE arena.

It is not mandatory to know EJB to understand JTA. JTA can be used independently of EJB.
17 years ago
The url provides pointers regarding cascade delete for EJB relationships.

Refer the url. Refer the dropPerson method implementation. I hope your implementation is similiar.
What app. server are you using? Are you using EJBs for deletion? Check your settings on the EJB deployment descriptor for cascade-delete.
Check if you are using the same connection object across multiple user sessions.
The answer lies in runtime binding. For methods except private methods, JVM at runtime determines the actual type of a reference and invokes the appropriate method on the object. For instance variable, the binding is at compile time.

Hence the VM at compile time resolves reference a as a type A and thus displays 10.
17 years ago
P Igor,

If those settings are available in WAS, it should work. Note that you are still not taking care of a clustered environment.

Keshav N,

Yes, the application server is responsible for taking care of concurrency issues, but what Igor wants is more than that.
You will find the following thread useful.
17 years ago
Setting maxSize and maxMessage is JBoss specific. For WAS specific implementation use link1 and link2 options.