-
calling stored procedure from bmp (10 messages)
- Posted by: ashutosh kumar
- Posted on: July 29 2003 00:50 EDT
Is there sample code availble for calling stored procedure from BMP. If we call stored procedure from stateless session bean can it support transaction?Threaded Messages (10)
- calling stored procedure from bmp by Preeti Ramesh on July 29 2003 12:30 EDT
- BMP and stored procedure by ashutosh kumar on July 30 2003 07:58 EDT
-
BMP and stored procedure by Preeti Ramesh on July 30 2003 08:38 EDT
-
BMP and stored procedure by ashutosh kumar on August 02 2003 02:34 EDT
-
Failure recovery by Preeti Ramesh on August 04 2003 04:38 EDT
-
error handling by ashutosh kumar on August 04 2003 11:46 EDT
-
error handling by Preeti Ramesh on August 04 2003 12:16 EDT
-
error handling by ashutosh kumar on August 05 2003 01:34 EDT
-
MDB for mails by ashutosh kumar on August 06 2003 01:01 EDT
- MDB for mails by Preeti Ramesh on August 06 2003 04:39 EDT
-
MDB for mails by ashutosh kumar on August 06 2003 01:01 EDT
-
error handling by ashutosh kumar on August 05 2003 01:34 EDT
-
error handling by Preeti Ramesh on August 04 2003 12:16 EDT
-
error handling by ashutosh kumar on August 04 2003 11:46 EDT
-
Failure recovery by Preeti Ramesh on August 04 2003 04:38 EDT
-
BMP and stored procedure by ashutosh kumar on August 02 2003 02:34 EDT
-
BMP and stored procedure by Preeti Ramesh on July 30 2003 08:38 EDT
- BMP and stored procedure by ashutosh kumar on July 30 2003 07:58 EDT
-
calling stored procedure from bmp[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: July 29 2003 12:30 EDT
- in response to ashutosh kumar
Hi,
The syntax for calling a stored procedure will not be any different just because the call is being made from a BMP.
It's the same
CallableStatement cstmt =
connection.prepareCall("{ call xyzProcedure(?,?,?,?,?,?)}");
and then define your IN/OUT params.
About the transaction support.
When you call a stored proc from an EJB, it is NOT a NESTED transaction just because the call has been made from a bean. When you start a transaction in the database using PL/SQL, it's like a new transaction and is out of the control of the EJB transacton.
THerefore, in the event that the PL/SQL transaction rolls back, the EJB transaction would get commited, or the vice-versa. Simply put, there is no way for the EJB to rollback the transaction of the PL/SQL procedure.
If you are really worried about maintaining the integrity of the transaction, move it all into one layer.
cheers! -
BMP and stored procedure[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: July 30 2003 07:58 EDT
- in response to Preeti Ramesh
I think I can use calling stored procedure in getter and setter methods and normal prepared statements for load,store ,find by primary key etc. Am I Correct.
Regds
Ashutosh -
BMP and stored procedure[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: July 30 2003 08:38 EDT
- in response to ashutosh kumar
hi ashutosh,
Yes you could do that...
why do you need to use a stored proc for getter methods?
Is there some real complex logic involved in retreiving the values?
cheers! -
BMP and stored procedure[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 02 2003 02:34 EDT
- in response to Preeti Ramesh
Yes Preeti
there is complex data base logic and XML parsing which I want to do in database itself.
can u tell me how to do crash recovery for weblogic and error handling in my program.
Regds
Ashutosh -
Failure recovery[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: August 04 2003 04:38 EDT
- in response to ashutosh kumar
Hi,
First the failure / crash recovery for Weblogic. Weblogicc itself provides features for failure recovery. Its quite exhaustive, so look it up on this link.
When you say failure recovery, do you mean just the server, or are you also referring to recovery of application logic (in case of the latter, I'd need more details, but you would need to use Transactions to maintain integrity).
Are you using a single server or a cluster?
About error handling, I am not too sure what you mean, so if you could elaborate, it would be helpful.
cheers!
Preeti -
error handling[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 04 2003 11:46 EDT
- in response to Preeti Ramesh
I have to make a error handling mechanism for my appn. Myexception class will extend exception class and will ahve my own methods in it. I will send mails about errors using internalization. acn u throw some light on a good design.
regards
Ashutosh -
error handling[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: August 04 2003 12:16 EDT
- in response to ashutosh kumar
What you can do is set up a separate notification framework. The responsibility of this module would be to recognize the error and send related error messages to the appropriate parties (assuming that different people recieve the error msgs depending on the type of error). If only the admin recieves all error msgs, this will make it simpler - it all depends on your application reqt.
I have used the java mail API in the past for a similar requirement and it worked very smoothly.
The interface to this notification framework should be a simple one - something like processError(error). When an error occurs, make a call such as notificationFacade.processError(error). You can even start this off in a separate thread; reason - any hold up in the mail queue should not effect your application. If this is going on inside a J2EE server, be careful about using threads.
The advantage of using this approach would be that if you need to add any further functionality to your error handling, it can be done at a single point i.e. in the errorHandling framework.
I have given a general overview here, let me know if you need any more info.
I hope I have understood your question correctly or that was a lot of typing for nuttin ;)
cheers!
Preeti
p.s. when u r posting any Q, give as much relevant info as possible - makes it easier for ppl to understand and u will get a lot of helpful responses. -
error handling[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 05 2003 01:34 EDT
- in response to Preeti Ramesh
u have understood my problem. can u elaborate it more. I also want to catch exception at top level. can u send me a explanation (lld) at kumar dot ashutosh at seepz dot tcs dot co.in -
MDB for mails[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 06 2003 01:01 EDT
- in response to ashutosh kumar
I need an architecture for sending mails. I have decided to use MDB and jms queue. Mail may me sent to a user or to role containg multiple user. I have to use internationlization also. can u suggest a architecture.where should I retrive information of user and role ?should I have multiple methods like sendmailToUser, sendmailToRole and I should retrive email ids of all persons in role from database and put it in a list?Can I use a method in MDB for accessing these info from database?
regds
ashutosh -
MDB for mails[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: August 06 2003 04:39 EDT
- in response to ashutosh kumar
ashutosh,
i have worked on a very similar reqt. using i18n of msg contents, send to user/role etc. No MDB - we used EJB1.1
I can't mail you the exact framework we developed (dont wanna get fired ;) but I will mail you how we went about it. How you want to incorporate that into MDB really depends on u..... jes curious - any particular reason for using MDB.
Will mail you in a few hrs - bit busy today :(