This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
EJB and other Java EE Technologies
insert data usinstateless sessionbean
Joined: Mar 05, 2005
Mar 10, 2005 11:42:00
I am trying to insert data in a tabel using a stateless session bean .
What are the steps involved here please let me know.
Thanks,<br />Ranga.<br />Life is precious so enjoy the life each moment and utilise it at the same time.
Joined: Feb 20, 2001
Mar 10, 2005 12:37:00
What have you tried so far?
James Carman, President<br />Carman Consulting, Inc.
Joined: Feb 17, 2005
Mar 10, 2005 13:08:00
In a nutshell is like this:
inside your business method:
Get a reference to the DataSource using JNDI (this might be cached).
Get a connection from the pool (don�t even thing to cache it).
If you choose BMT, start your transaction; otherwise let the container handle it.
Update the database.
If BMT then commit the transaction; otherwise let the container handle it.
Close the connection, ideally inside of the finally block (this will return the connection back to the pool).
As you can see, every step in turn needs more explanations. Please let me know if I can be of any more help.
I think, therefore I exist -- Rene Descartes
I agree. Here's the link:
subject: insert data usinstateless sessionbean
Game on SQL
After insert statement, how do I get column value populated by DB trigger
How to convert FormFile into BLOB object?
Insert arabic data in database through jsp file
Can we insert data in view
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014