Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Helps needed regarding SQLJ  RSS feed

 
Arockia Raj
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are having a applications where the DAO layer is implemented using SQLJ.
Now we need to incorporate one common functionality across all the sql statements.We need to incorporate this by without disturbing the existing queries.How to implement this can anyone help regarding this.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ask your local architect. Meaning if you have an architect, he/she should be able to explain their design such that it allows for changes to be easily implemented so that maintenance is cheaper. Or, if they can't explain it, run to the hills because the architecture is going to collapse.

OK, jokes aside. How your app is designed will have a major impact on how you have to implement your functionality. If you can get access, intercept your code and get the Query object before it gets executed, then you can inject your functionality, using AOP Aspect Oriented Programming.

Does SQLJ have its own interceptors? Are queries objects you can get access to to change, .....


Well, nevermind, I did a search and read up on SQLJ, and it is very unflexible. Unfortunately, you will have to go to all your #sql statements and change them in each and every place.

Good Luck.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!