Asher Schweigart | Depends on how you will be using databases I would say. JNDI is the one you will have to use if you want to use the built in db element in call studio. The problem with that element is if it fails to connect for any reason, it throws an error, which you then have to handle in the call studio script if you don’t want the script to just error out. If you have multiple DB calls and you want to know which one failed and why. You could use java to do the lookup, but managing the connections in tomcat with a JNDI connection is much easier in my opinion.
What I have done for database lookups is used an extended version of the db element that Call studio provides. I got this element from Janine in her class, and modified it for my use, so that it returns the error message in addition to the success or failure status. That way I can include the error message in an email I send whenever the db element fails. In my opinion, this is the best solution.
I’ve already posted elements from Janine that I have modified, but I’m not sure how many of them she wants to share, since they are kind of a bonus from the class. With her permission, I will post the custom element code here. |
| Please sign in to flag this as inappropriate. |