Tag Archives: Hibernate

Ways to use Java Hibernate to connect to MYSQL

Ways to use Java Hibernate to connect to MYSQL
This stuff is sort of easy and standard out of box with Hibernate so this should be enough
http://www.codesolid.com/2013/05/22/a-simple-hibernate-mysql-and-junit-tutorial/

Why I Stick with MYSQL over Postgres?


Join my FREE newsletter to learn more about why I will use this

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

FREE open source Algo Trader HFT high frequency quant trading platform contains Java, Esper, AndroMDA, Hibernate, Spring, SOA, MYSQL

FREE open source Algo Trader  HFT high frequency quant trading platform contains Java, Esper, AndroMDA, Hibernate, Spring, SOA, MYSQL

These are the components that are part of this appear to decent project.

See what I plan to do with this here. for HFT needs

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

This is how to connect to MSQSQL Microsoft SQL Server using Java and Hibernate application?

This is  how to connect to MSQSQL Microsoft SQL Server using Java and Hibernate application?

Using Java Hibernate to connect to Microsoft SQL Server? Here is the world famous unknown gotcha

For those that don’t know, and you’re pulling out your hair? Ensure you do and check for:

on sql server  configuration manager, ensure services and connections
under TCPIP properties are enabled, as well as both dynamic TCP and
TCP ports are included of 1433 (listening port). this is for IP1, IP2,
and IPall

http://cashforlifetv.com/blog/index.php/2010/11/18/using-java-hibernate-to-connect-to-microsoft-sql-server-here-is-the-world-famous-unknown-gotcha/

Ensure you use the JDTS JDBC connector, not the Microsoft one as it has many bugs. Get the right connector at:

http://sourceforge.net/projects/jtds/files/

Also, here is a sample of what your hibernate.cfg.xml you should look like as well:

<hibernate-configuration>

<session-factory>

<!–<session-factory name=”java:comp/hibernate/SessionFactory”>

<session-factory name=”java:hibernate/SessionFactory”>  –>

<!– Database connection settings –>

<property name=”connection.driver_class”>net.sourceforge.jtds.jdbc.Driver</property>

<property>jdbc:jtds:sqlserver://localhost:1433/YourDatabase</property>

<property>sa</property>

<property>password</property>

<!– JDBC connection pool (use the built-in) –>

<property name=”connection.pool_size”>1</property>

<!– SQL dialect –>

<property name=”dialect”>org.hibernate.dialect.SQLServerDialect</property>

<!– Enable Hibernate’s automatic session context management –>

<property name=”current_session_context_class”>thread</property>

<!– Disable the second-level cache  –>

<property name=”cache.provider_class”>org.hibernate.cache.NoCacheProvider</property>

<!– Echo all executed SQL to stdout –>

<property>true</property>

<!– Drop and re-create the database schema on startup –>

<!–<property name=”hbm2ddl.auto”>create</property> –>

<property name=”hbm2ddl.auto”>update</property>

Note you may need to use the host server’s IP address instead of localhost in case the server is remote. i.e.10.0.0.10

These tips should help you out to easily connect to SQL Server using Java’s Hibernate framework.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Using Java Hibernate to connect to Microsoft SQL Server? Here is the world famous unknown gotcha

Using Java Hibernate to connect to Microsoft SQL Server? Here is the world famous unknown gotcha

For those that don’t know, and you’re pulling out your hair? Ensure you do and check for:

on sql server  configuration manager, ensure services and connections
under TCPIP properties are enabled, as well as both dynamic TCP and
TCP ports are included of 1433 (listening port). this is for IP1, IP2,
and IPall

Good luck you will need it. Also, welcome to the big boys club as you have now probably stepped out of the baby world of MYSQL.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Resources to get you up and running with Google GWT 2.1 really fast! Java GWT-Platform, MVP, Hibernate, DTO

Resources to get you up and running with Google GWT 2.1 really fast! Java GWT-Platform, MVP, Hibernate, DTO
Here are the tutorials to get you started with GWT:
Make sure you get the latest SDK. I am using GWT 2.0.4 but GWT 2.1 is quite different.
Make sure you try out the GWT Designer/Builder within Eclipse to make you really productive.
So make sure you run the tutorial and samples to get you started with this. This will rapidly get you running using MVP:
MVP can be confusing but GWT-Platform simplifies things. Also, note GWT 2.1 might offer simpler MVP out of the box functionality but I use GWT-Platform as 2.1 did not exist yet.
Hope this helps but you should get up and running a lot faster as compared to something like Spring-MVC
When you are ready, I can also send over the database SQL which is MYSQL We probably will move to SQL Server once we are close to production. Do note I use GWT DTO which is pretty complicated when you look at it.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

FINALLY! GWT-Platform custom wizard writes to DTO Hibernate MYSQL database. Flash/Flex with Wowza is next!

FINALLY! GWT-Platform custom wizard writes to DTO Hibernate MYSQL database. Flash/Flex with Wowza is next!

Time for beer! This took a very long time to accomplish!! The code is pathetic but I got a first version working. I just now to need to integrate into Wowza media server with Flash/Flex.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Phew! Spring Roo uses Hibernate for Persistance

Phew! Spring Roo uses Hibernate for Persistance

It also uses Maven to download all the dependencies. Let’s see the results but still waiting and waiting and even more waiting!! I guess it would be not different if you were to download each Eclipse plugin individually. Uh. Maven reports some dependencies don’t exist. That is a big ouch!! Also, I find Spring Roo takes up too much resources. I have it running it on a VMWARE appliance with 1 gb of or RAM. Yipee! Spring Roo reports back a build error. Yah. That will save me loads of time.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Google and Microsoft sets standard in documentation for their web frameworks like Java GWT to integrate with Hibernate

Google and Microsoft sets standard in documentation for their web frameworks like Java GWT to integrate with Hibernate
So here I sit trying to merge a Google Web Toolkit application with Hibernate which is the well known Java persistence (database) framework. I used the very resourceful Google resource of:
http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html
As a side note, this documentation is what makes Google a new standard in getting quickly started with their tools and technology APIs. Why do you think Microsoft grew and stayed on top for so long?
Anyhow, this same resource is very leading I find. I am working with GWT 2.04 and it seems that it may be outdated. For example, the added third party library discussion actually does not work with the current version of GWT. I could be wrong but it was very tough to set up so I gave up. Bah! I am talking about this Dozer and Gilead where the documentation was pretty horrid to get me up and running.
To my surprise, these limitation of using Direct Transfer Objects (DTO) seemed to work fine as the Guestbook application read both and wrote to the database with no exceptions. According to the link, there would be some limitations as you will not reach the object on either the client or server side. Well, with GWT that limitation seems to be done away with. As a result, I went with the Direct Transfer Objects which was pretty straightforward and easy to use as a role model for my own application.
Too bad the other libraries of Gilead and Dozer are insufficient. It seems as I poked around on their Sourceforge pages, it seems I was not the only one with these difficulties. I wish these contributors would put together an end to end tutorial for brain dead users. Why don’t do they do that instead of that their Java followers are brain surgeons who can figure out all this stuff on their own? I really don’t have the time or patience. Thank God for companies like Microsoft and Google for putting together decent documentation to get me started with their libraries and frameworks.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!