Zachary Pry

Greenhorn
+ Follow
since Aug 09, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Zachary Pry

Hello Krzysiek,

I would like to clarify few points:
1. Can you share full file - I would like to see class name.
2. Why you don't close ResultSet ?

Regarding creation of the function itself - you might want to use:
Using upper case improves readability plus 'internal' might be reserved word (I don't think this is the case for Oracle though) and it doesn't quite explain what function does.



And i have second question. How can i add a java library to Oracle like ApachPOI.


I believe it can be done via:
loadjava –u <username> some_library.jar
Hello Lukas,

As mentioned in one of my messages - I was preparing presentation for Midao JDBC. I finished with it and did a little bit more.

Direct link to it you will find here: MJDBC Presentation (PDF)
Also getting started guide you can find here: MJDBC Getting started

Comparison between Midao JDBC and other libraries you will find here: Midao JDBC - Why?
Above points would be elaborated in Migration guide which I am planning to release in August-September.

Thank you again for all the tips you shared...

Let me know about this. I am actually planning on writing up a blog post on my blog (blog.jooq.org) covering various tools similar to Midao - i.e. string-based SQL tools that leverage the JDBC pain. I'll link to your presentation and web site. My blog is syndicated as a DZone MVB, so I'm sure you'll get some traffic.



Great, and again - thank you . Presentation is ready and I am planning to release it next week. Once it is done - I will post link in here.

tools similar to Midao


Small clarification - Midao is umbrella name for data oriented libraries. It has 3 libraries in it. First one released - is Midao JDBC, two other doesn't work with JDBC at all (and are not yet released).
This information is written in more details in Presentation as well.

Thank you.
Hello Lukas,

Thank you very much for sharing your experience. It is very important information.

Know your competition
Very interesting topic.
I 100% agree. Initially I created a lot of documentation around it but, after some time, found that not everybody knows the competition. Basically, for some people, it is describing one unknown with another.
I also found that some people have just list of needed/expected features and select product based on it.

I believe that I tried too much to make it accessible for everybody, that I haven't created proper comparison for those who have knowledge of the competition.
Since last week I am preparing presentation which have such comparison. It will be released next week.
Also I will prepare similar comparison and put it on Web Site as well.

Answer relevant Stack Overflow questions
I am scanning it from the first day. Even requested to create a Tag specifically for this library.

Write articles on DZone or other platforms
Thank you, will try that.

Track efforts with Google Analytics
Thank you again.
I have Analytic system available. I am looking and analyzing statistics, especially Google search requests to find which raises the most amount of questions/issues.

P.S. There is ReadMe on GitHub which have some amount of comparison between other products.
If I understood your post correctly - you want to use JDBC and Pooled DataSource.

Please look at my answer given in your other topic: https://coderanch.com/forums/posts/list/615300#2810082
In there I shared links to Pooled DataSource description and basics of JDBC.

Hope it helps.

---
update:

I see that you already looked at it, never mind then...
Hello Robert,

Official JDBC Basics tutorial.

Section related to Pooled Connections

Pooled DataSource can be configured and received from Server, or your can use Pooled DataSource provided by some of the JDBC drivers.

If JDBC Driver doesn't provide Pooled DataSource - I am recommending to look at Apache Commons DBCP or C3P0.

Hope it helps.
Hello Robert,

I would like to add something to Paul's answer.

JDBC supports SQL Databases and allows executing SQL queries in Java.
Plus of it is that is it fast, but require manual handling of classes/types and require proper resource managing.

Hibernate is ORM Framework which allows user(developer) to work with Java Classes instead of SQL queries. Hibernate translates Java Classes into SQL and executes them using JDBC.
Plus of it is that is simple and manages a lot of SQL/JDBC related issues for user(developer) but is not as fast as JDBC.

For beginner - I am advising to use Hibernate as it is simpler and allows to focus on Java and Java Classes instead of learning SQL and SQL Databases/JDBC nuances.

Hope it helps.
I agree with Martin - it would be a challenge.

I would offer to use remote Database instead of local. This way saved memory can be spend on comfortable development environment.

I know that Amazon RDS supports both MySQL and Oracle, but as far as I remember they don't have free/dev plans available.
Heroku has some free options available. Also they have free plans for both PostgreSQL and MySQL, but no Oracle unfortunately.

Hope it helps.
Hello Anchit,

MySQL supports triggers as well MySQL Create Trigger.

Also here is good Tutorial.

Hope it helps.
Hello Anchit,

If I understood your question correctly - SQL Triggers should satisfy your need.

If you are using Oracle Database - you can read Oracle Documentation Oracle PL/SQL Triggers

Not every Database out there supports triggers the same way. It would be easier to give you any further advice regarding it once you've share Database vendor you are using.
Hello,

I recently released JDBC open-source library.


Midao JDBC is created to simplify development with Java JDBC.

It is flexible, customizable, simple/intuitive to use and provides a lot of functionality: transactions, work with metadata, type handling, profiling, input/output processing/converting, pooled datasource libraries support, cached/lazy query execution, named parameters, multiple vendor support out of the box, custom exception handling and overrides.

With single jar it supports both JDBC 3.0(Java 5) and JDBC 4.0(Java 6).

Midao JDBC is well tested, not only it has around 700 unit and functional tests, but also it is tested with latest drivers of: Derby, MySQL (MariaDB), PostgreSQL, Microsoft SQL and Oracle.



www.midao.org

Do you know where projects like this should be registered (open-source list/directory of some sort) ?

Thank you in advance.
Hi Brendan. Thank you for your reply.

I've fixed it by completely rewriting that piece . Right now this part of the page is generated dynamically in a request scoped Managed Beans.

I'll definitively read that article. It is very interesting.
13 years ago
JSF
Hi sridhar.
I am guessing that your Managed Bean is session scoped ?
I am fairly new to JSF2.0, but I had the same problem. I fixed it by moving all dynamic creation code to request scoped managed bean. So I used session bean for storing session data and request bean for creating faces components.
That is solution for the duplicated id's problem. What about "setTransient(true)" - unfortunately I don't know what it does, nor am I familiar with the consequences of its use...
13 years ago
JSF
Hi Andrew.

Problem is that your Managed Bean is @RequestScoped which mean it will last only for: "Request scope persists during a single HTTP request in a web
application
". In your case you should use:
View (@ViewScoped): View scope persists during a user's interaction with a single page
(view) of a web application.

OR
Session (@SessionScoped): Session scope persists across multiple HTTP requests in a web
application.


View scoped managed bean will last only while you interact with current page(say index.xhtml). When you redirect to another page (say about.xhtml) - new Managed Bean will be created and old one will be garbage collected.
Session scoped managed bean will last about 30 minutes (it is default value, if I remember correctly).
13 years ago
JSF
Thank you for your reply.
I've already wrote simple code (in pure JSF) to demonstrate the problem I am having:

index.xhtml


MainManager.java


Even when I fire ajax event (via commandButton) to execute and render @form only - getNames() still executes.
But it looks like that Gabriel Vince already answered my question - if JSF builds whole UI Tree before render then it must execute all ui:repeat and c:forEach tags... So I guess that the only solution for this case is PartialViewContext...
Thanks to all for your attention to this topic... and answers of course

UPDATE: Solution for those who might need it:
use FacesContext.getCurrentInstance().getPartialViewContext().isAjaxRequest() in conjunction with FacesContext.getCurrentInstance().getPartialViewContext().getRenderIds().
Unfortunately I knew about this solution, but in my case - it creates some amount of complications which I need to overcome. And I thought that there is a better way to solve this...
13 years ago
JSF