Monday, December 14, 2009

How Monitor Tv Ratings

I have Facebook, but ...

I do not have Facebook, but the Mozilla bookmarks to store profiles of famous people, just out of curiosity, how much I have friends on facebook. :-)
fascinating to me, however it comes, how many people know each other and I know them too and all I had no idea that they know each other. Classmate of průmky, living in Ostrava, knows the people from us, and through them, I clicked through to Valmez Rožnov to my friends. It's incredible ...
I vowed that he does not buy as ICQ, Skype, Facebook, or other similar Internet lákače, but just out of curiosity, I wonder how many people would like to combine this, if you added them all among his friends.
Several sources say that if the world, every pair of people assigned a number, giving the smallest number of people who know each other through, the result would be six to seven people! This result indicates several sources said, and it's really incredible! = D

Wednesday, December 2, 2009

American Buckle Company

to think about what the neighborhood? = D

intrigued me the title of one article, which concerns grow artificial tissue of the penis . I clicked on the link and got a fit of laughter:-D:-D:-D
The photo got me seriously:-D:-D:-D
I hope you laugh too: o)

Sunday, November 29, 2009

Round Fringed Ottomans

dormitory life - the events continue to 5:)

I can not forgive I do not give this photo:


I took her to her cell mate, who assert that it is his job:)

somehow I commend the overall student life. It's not just a great party, drinking, and the mob. This is the well-being and freedom in time. Researchers also often do not have fixed working hours. You know, personally I can not imagine the daily routine. Get up early morning at the same time, to go to work this out and then come back home, eventually. somewhere to go work out, as diversification. Maybe it's better than working in shifts, but even so I was pretty scared. But this is probably unavoidable. (On the brigades I worked in shifts and I talked with people who do this work even twenty years. I admire is SO. I'd probably be freaked out. I want to study it as long as you can! Platičům apologize to all taxes, but you Yet you can study too. I understand that when the communists it was not easy. I have a few people in the family, which is pretty complicated because of the communist uncle, who bolted with his family to the U.S. ... but finally did it and the engineers. I think if one has in mind something like that is ok, the show justice.

I think today may have a high school almost everyone. The conditions of the tests are much milder than it once was. And it also says many professors in our faculty. Just become pretty spoiled us and allows us to study. :)

I say "Learn while you can. Student Life is a wonderful and unforgettable." Some would argue: And who will hand this out? This question I heard often when I praise a student working life ahead of friends and acquaintances. I talked about it with a known adult college student, father of two adult children, and he answered it as follows: "Ukrainians." Cruel, but why not? I do not want look like a racist, but they need the money. Well, I do not discuss it here too.

Some people also argue that the study is expensive and the family does not have that pulled the student. The answer is: Yes, studies are expensive, but I have many friends who You earn brigádama studying, working or even longer, perhaps in part-time or even full time. In this case, but it is probably better known to study at a distance. Also that some of my friends at home do not light in terms of money, but they are here in Prague, the Moravians. They live modestly, but why not? Why is the study and knowledge. Furthermore, high schools provide students with accommodation scholarship for current students, around 700 CZK per month for students from families of social, then much higher. So at the cheapest price Accommodation in Prague (1500 CZK / month), is quite tolerable (just the man pulls the room with another face to people ... but if he wants to study inexpensive, why not study there for college, where students have a calm and can learn). Moreover, if a student is really handy, you may get a scholarship for outstanding academic results in some schools is 20 000 CZK (I think in Brno). If the student is older, has had some experience working on a project may try to apply for a grant, to which may include trips abroad, etc.

And now to feel depress me that I could defend the bohemian student life. : O)

Wednesday, November 25, 2009

Can I Uninstall Acer Arcade

dormitory life - the events continued to 4:)

now go on to the tracks events related to the porters. Last time I told the lady porters on campus Švehlova. Now I would like to describe the situation that I experienced on the Vltava River with one not-so-pleasant doorman.

The doorman is due to its unpleasant nature, known not only among students, but also between other gatekeepers. Whenever it is a student, must be mentally prepared for the fact that Mr. Porter can not forgive a comment.

College Advice is quite luxurious. If one of you will choose Prague College, South City definitely recommend it. Do not be discouraged by distance. If someone is used to commute to school by train, as I did in high school, this fact - and the distance of the journey to school - not an obstacle for him. :) Attraction will certainly be a great student pub Blanice In which the cook and at student prices. What you really appreciate, is cheap money. The other tracks will pay 10 CZK per hour at the South Town CZK 10 / 3 hours and each additional hour 10 CZK extra. Washing a normal washing cycle (ie cotton, 40 ° C, 700 rpm.) Lasts about two hours.

And so once I washed two washers, four hours. I arrive to the lodge and a loud voice: "Good evening, I bring the key to the machine and I would pay." The other side of Porter: "Well but I have time ...", "What? How long? "Gatekeeper," Well you do not so much fighting! "Me:" But there were only two washing machines, I can not consider that a washing machine washes two hours ...", I still somehow understand what he was terms. Porter: "But for me too I can not! Just four hours and you will be CZK 20 !!!", I say, "Well ...". Of course I'm still counting on to pay for dvacetikačku, but he apparently assumed that with him I want to argue, and those In addition, ten crowns give him just over the corpse, or what ... :)) Sometimes it is safe to assume the latter's bad now ...

Wohnout - porters :-))

Sunday, November 22, 2009

Penicillin Vk And Nursing

Second Dream of the first two

Another dream was not so clear and so long. I only know that I was with my grandmother and even some normal people in a block of flats, which usually can be seen for example in Ostrava, Bohumin, Prague ... The special was that the block of flats was in the middle of a field or pasture. On one side of the field fence, the other forest.
The grandmother said we had to walk around and look how it looks behind the fence. When we left the apartment block from the main entrance, we noticed only a few workers on a block of flats there something repaired. One was a small metal ladder that was leaning against the wall before the entrance to a block of flats. Probably it was the electrician, because they dug in the light. He was such that ordinary prefab entrance, which leads to the stairs. After entering the glass doors are often followed by a kind předchodba, where tenants' mailboxes. Then followed another glass door ... certainly, you know. But it's irrelevant. :) So we
then the grandmother came along the fence. When we have a block of flats from about fifty meters, I wanted to look over the fence, plain wire fence. I have no idea why I have not looked before. I looked there and my blinding light of the sun, which was kind of a fog. So I looked at the other side of the meadow, the forest that stretched across the fence.
Suddenly I saw a white, very furry character. It was a Yeti. Always looked at us and then behind us rozeběhnul. He ran four and looked like a bear, which runs for prey. We got to flee with her grandmother. I would never say that grandma could run so fast. :) We ran into předvchodu block and shouted at the workers, whether they escape inside the house. What stood on the ladder, "said his grandmother, both climbing as high. I said, it's silly and let quickly gets off and runs into the house with us.
Then the dream faded. I do not remember anything. It's really strange. Most dreams seem to me that somehow relates to what is normally I experience during the day. But the Yeti, I even thought about it lately.

Saturday, November 21, 2009

Single Seat Dune Buggys

dream of two

That night I dreamed two nightmares.
first starts at some school event to mix my classmates from the middle of the height and friends. The event takes place in the forest, where its edge extends slightly greenish lake. In it, run races, which lie in the hold under water without breathing apparatus. Competitors dived into a relatively deep lake separately. Each is equipped differently. Someone Diving in a swimming suit, someone in the neoprene. Eg. has kamrádka Jaruška who loves the water, sinking in the neoprene. Underwater lasted a very long time and her performance was duly rewarded with strong applause from the audience. Then came classmate in high school. She is also survived and dive underwater for far longer than anyone else. Somehow I knew that it was cheating and had him breathing apparatus.
Suddenly someone screamed. I looked toward where I heard screams and saw something in my life seen. It was a tall green monster with the thin legs, thin body, his back slightly bent. His head I could perhaps be likened to a human head, however, has bicycle helmet that is aerodynamic rear sharpened. But still it is not accurate. Her eyes looked almost like two red buttons with white. Maybe its surrounding border a little reminiscent of chicken eyes. Overall, the character resembled an alien creature from the film The Omen. The monster started to chase us.
Suddenly there was a break in a dream and I found myself at Bítov, the cottage, where every year we go on summer vacation. Still I knew in the dream that we chase the monster. There was an unknown to me girl. I told her to try to escape. She was quite nervous and panicking. I tried to calm her. I said expendable for our house and then run away through the fence. Immediately hit the yard and then ran through the garden gate. It was night and everything was difficult to see. Loud whisper, I called her, either run away, but let's be careful. Disobeyed. Around the corner we both saw the monster, and We started to run back into the house through the backyard. I have been inside and I cried for her, be it for me. She very zmatkovala and ran back and forth, but it was far from me. I did not dare to seize it and download inside. Then I vrátkách in the yard saw the monster. I shouted again at the girl, but she still just running around and screaming. I knew now that when I exit the door, get us both a monster. I closed, locked and then a little window I saw a monster authorized the girl, crushed it on the wall and held her by the throat. Figeľ her eyes, her long fingers and ripped your heart out ...
It was awful and everything happened in a few seconds. I locked all the possible doors and ran into the kitchen. There sat all the others, including my family. I was terrified and screaming frantically that her beast Figeľ eyes and ripped your heart out. I kept the scene reflected in the head. And then I woke up.
long time I could not sleep. Every time you try to close eyes I saw the monster holding the girl.
Finally, I walked and it seemed another dream.

Monday, November 16, 2009

Coleman/evcon Furnace

dormitory life - the events continue to 3:)

And now comes a series of gatekeepers, and gatekeepers. :) I met with two worse, which is worth writing. Others were more or less, and some nice and funny. We talked at all so they wonder if there still sits at Kukan ... and also when they chattiness in nature ... :)

So I'll start again on the track Švehlova. Overall, this is, in my opinion, a decent track, I liked it there, but due to other reasons I stayed there eventually. But odbíhám. In the little window there sits a porter. He has long gray hair pinned in a ponytail always, strong and round glasses. It can also be a little over fifty. Now, I'm not sure, but I think enough smoke (if I am not mistaken it with another doorman). This lady is downright poctivka and takes his work very seriously and responsibly. For it does not pass one without, to show kolejenku (Especially in the evenings). It monitors each carefully their eagle eyes, but not always to rely on it, I'll tell you how later.

time I still did not live with Kukula and sometimes an opportunity that I could sleep in, because a roommate had gone home to be. And since my Kukula slightly Indecent exposure, it can not be overlooked. Mrs Cook us immediately upon entry into college and I stopped after kolejenku. There is of course not, so pay 50 CZK per night. Then we have to beware. Later we found that students who live on campus UK has the opportunity to spend the night at another CU campus for free once a month, so that we use. :) Like I find it a bit unfair, since they actually pay and accommodation for the days when we are on track, which is often on weekends and holidays. So if you want any of us known to sleep at night, so it would not have a pointed, especially on when it comes to a man who lives in the dorm. Here's how it is not true at all tracks. At some colleges are more relaxed.

And now the aquiline eye Mrs Cook. My roommate had a friend who just did not miss: tall, slender blonde with strong glasses. Often he walked in a black coat. He lived with us for too Švehlovce. One of the roommates went to a theater and returned late at night. As they walked past the gatehouse, Raven porter poked his hand in the window and straightened the finger pointed at the young man: "You! Show me kolejenku! You do not live here!". When she showed a beautiful young man, however, valid kolejenku, said only: "Good." Mrs.

you probably think Švehlovka not quite as big college, so was not able to remember all its residents. But this probably is not always real thing. But the effort is appreciated. :)

Monday, November 9, 2009

Wrong Date On Usps Shipping Label.

dormitory life - stories of the following 2 :) Why I hate infidelity

In previous incidents college to continue, I mentioned to one lady who worked in the store for clothes for college Švehlova. Now I will mention another lady from the warehouse service, but this time on the Vltava River, which is the Southern city.

When I recently moved to college republic, I was already behind college experience from previous years. :) Whenever I go to exchange dirty linen for clean, I never needed to show kolejenku (resident identification card), because it was always an exchange of "piece by piece" in stock and linen bedding dorm ever seen. But this time it was different.

morning I woke up and said to myself, it's Friday, so I could wash your clothes, it probably will not at this time, many people fight. So I went to the reception the keys to the laundry and as a backup I left kolejenku, which leaves so there whenever someone wants to borrow something, etc. Then I went to wash clothes. After a few minutes I realized that I could even change clothes. So I went to look at the wall, when possible. I find that clothes can be changed to 11:00 and then 1:30 p.m. to 2:30 p.m., but I wanted to be gone. On the board, I also learned new information for me and that I need to provide service in exchange kolejenku. I really never had before. It was around 10:45. So I went immediately undressed me and duvets Kukula, and I ran to the linen store. There, I knocked on the door and entered. Some, again, about fifty lady to me after my "Hello" also said "hello". There was still with her a gentleman with whom he talked about. Then she said something like: "Oh, please ...". I did not understand and I reacted, I said that I brought a quilt to replace two single beds. She reiterated her "Oh please", pointing to the table. I understand that I give the desk about the quilt, which was correct. :) And then I began: "Please, I'd be very sorry, but I do not kolejenku, because the pen, so kolejenka is the reception ..." Lady's obviously not ušislyšně not like: "Well, perhaps kidding, right? Go here for two and clothes you do not have one kolejenku? And how can I believe that you live here?" "I have to jump on kolejenku reception, perhaps lend it to me so I could show it to you ... my roommate is in a language school." "It is really terrible! Why did you not go for the first washing and then we wash? Logic, you students will never I confess! It's really terrible! So please, take it! "And as I was glad that I can take my underwear, I did not want to argue with her and explain to her that I never ever kolejenku when changing clothes did not show, so I never thought I'd have to show at this track. And it was a coincidence that I just realized that I could change clothes when I went to college and I went to the wall and I just noticed that it is open, but this afternoon I could no longer ... No, no, all these excuses of chance would be for nothing because in the logic of our students may never nedočká . :-D

Since I have other friends and other events. So, for example. Publishers are two types of bedding, a reddish color with a white sheet and a blue with a yellow sheet. S Kukula like to take the blue with yellow, because we match the room, but it odbočuju. :) And so once he came to the store known that they would like changed clothes. Everything was fine until the moment before he took the clean linen. Made the mistake of your life! = D Took a reddish yellow sheets and sheets! How could he? Did not know that blue is the yellow and reddish to white? The lady is said to go crazy, both because it had brought them. So never again! Red and yellow are probably not suited to each other ... :)

So the question remains why some of these lady and behave? I to think:) Yes, I understand that it is quite humiliating work, especially when you move around all these were men college students, however, if you do work, I have to do it properly and how it is! I would do it too so she did. Furthermore, it may take some contrast too severely, for it is so important ... :) They do not light about it lady. I assume that their job is to sort laundry and take care to be imported into a central laundry room, where it will be washed and huge almond vymandlováno. Then to imported on the right track, and then sitting in the store twice a week, generally about eight hours. I believe that it does not work exactly gripping, but ... BUT.

Saturday, November 7, 2009

How Can I Clear My Babies Phlem



Infidelity is proof that no one loves the other person, even though it may not admit anyone. Love is a matter of fact body chemistry and it is this chemistry provides that a person not looking for other potential partners. Yes, love is pure chemistry, although it too may not admit anyone.

So if one party in any way betray the chemistry it does not work anymore (if ever worked), so love podvedenému partner is lost.

why I think it is better if you already have one in chemistry itself, and he needs to feel the urge to look after the other, he would rather end the relationship before it's too late. I think that ending the relationship, knowing that love does not work anymore, is a lesser evil than terminate the relationship with the fact that I seriously hurt someone that I deceive him. This reflection

I write as a result of my outrage over the comment may, in some article. Link to article
here.
That's also the chemistry of love is not just out of my head. They came of course scientists. True, deep love that lasts forever, starting with chemistry. If the relationship begins to flirt and more physical attraction, the relationship apparently does not have much chance of keeping the death.

Friday, October 16, 2009

How To Builda Wooden Two Seater Go Kart

Berker Q1

There are many different switches. But Berker Q.1 is unique.
If you could touch this switch'd feel the difference. His velvet surface is obtained using a special production process and a new type of extremely durable blend of materials. And that's why Berker Q.1 leaves a lasting impression every time it touches.
With solid technology and a scratch-resistant surface, złatwością resist the passage of time. Small and large traces of everyday life can be easily removed. Its timeless design that will a modern, regardless of changes in trends and fashion. And that means that it remains a visual and functional highlight for years to come.

Friday, October 2, 2009

White Tuxedo And Coral Dress

Electricity Meters

Electricity Meters
LE-01D / LE-01

-phase. Current 45A.

designed
LE-01 are static (electronic) wzorcowanymi licznikiami electricity are used as podliczniki Electricity metering single-phase alternating current in the system directly.

Special Action
electronics under the influence of the flowing current and the applied voltage pulses in the amount of proportional to the consumed electricity. Energy consumption is indicated by blinking LED. Lliczba pulse is converted into energy collected and its value is indicated by a segment LCD LE-01D or by a mechanical counter in the drum LE-01.

Attention!
meter has pulse output SO + - SO-. This allows you to connect another device pulse sczytującego (SO) pulses generated by the meter. For the correct operation of the counter is not required to connect additional devices.

Counter has the possibility of sealing covers input and output terminals to prevent making bypass meter.

Monday, September 21, 2009

Can You Use A Bike Computer On A Dirt Bike?

Batteries Philips MultiLife OSRAM Automotive Lamp

Nickel-Metal Hydride technology allows for multiple loading. With this replacement battery is almost unnecessary.

lot of energy keeps your digital camera operation and other energy consuming devices.

Nickel-Metal Hydride batteries can be recharged up to 1000 times without the need for early discharge. This allows for easier and more efficient use of batteries.

saving money, can withstand 1,000 times longer than regular batteries. They do not contain cadmium and mercury, and not land the garbage as often as regular batteries.

should also remember that the batteries and battery not be disposed of in standard trash, they should be handed over to the companies which collect such wastes.

Friday, September 18, 2009

Dried Cranberries, Hong Kong Supermarket

Kaskadowość in hibernate

I will try to analyze rather unintuitive (to me) the issue of cascading save relationship in Hibernate. I will use an example already used two tables: Product and Category.

For starters: no cascading, one-sided mapping.
mappings and POJO class:

 
\u0026lt;? Xml version = "1.0"?>

\u0026lt;! DOCTYPE hibernate-mapping PUBLIC
"- / / Hibernate / Hibernate Mapping DTD 3.0 / / EN"
"http : / / hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">

\u0026lt;hibernate-mapping package="main">
\u0026lt;class name="Produkt" table="produkt">
\u0026lt;id name = "id" unsaved-value="null" column="produkt_id">
<generator class="sequence">
<param name="sequence">prod_seq</param>
</generator>
</id>
<property name="name" />
<property name="value" />
</class>
</hibernate-mapping>

<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="main">
<class name="Kategoria" table="kategoria">
<id name="id" unsaved-value="null" column="kategory_id">
<generator class="sequence">
<param name="sequence">kat_seq</param>
</generator>
</id>
<property name="name" />
<property name="type" />
<property name="description" />
<set name="products" lazy="true" inverse="false" cascade="none">
<key column="kategory_id" />
<one-to-many class="Produkt" />
</set>
</class>
</hibernate-mapping>

  
package main;

public class Produkt {
Integer id;
String name;
Integer value;


public Integer getId() {
return id;
}

public void setId (Integer id) {this.id = id
;


} public String getName () {
return name;}


public void setName (String name) {this.name = name
;
}

public Integer getValue () {
return value;}


public void setValue (Integer value) {
this.value = value;}



} package main;

import java.util.HashSet;
import java . util.Set;

Kategoria {public class
Integer id;
String name;
String type;
String description;
\u0026lt;Produkt> Set products = new HashSet \u0026lt;Produkt> ();

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
} Set public

\u0026lt;product> getProducts () {return
products;
} public void

setProducts (Set \u0026lt;product> products) {
this.products = products;}

}


Saving to a database category and the product is as follows:

 
package main;

org.hibernate.Session import, import
org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class Main {public static void
main (String [] args) {Session session
= null;
SessionFactory SessionFactory = new Configuration (). configure (). buildSessionFactory ();
session = sessionFactory.openSession ();

Kategoria Kategoria cat = new ();
PROD1 Product = new Product ();
prod2 Product = new Product ();
kat.setName ("cat");
PROD1. setName ("PROD1");
prod2.setName ("prod2");
kat.getProducts (). add (PROD1);
kat.getProducts (). add (prod2);
session.beginTransaction ();
Session . saws (PROD1);
session.save (prod2);
session.save (cat);
session.flush ();
session.getTransaction (). commit ();
session.close ();
System. out.println ("zapisane!");
session = sessionFactory.openSession ();
session.beginTransaction ();
System.out.println ("Category:" + session.createQuery ("pious Kategoria"). Listinfo (). Size ());
System.out.println ("Produkty:" + session.createQuery ("from Product"). listinfo (). size ());
session.clear ();
session.delete (PROD1);
session.flush ();
session.getTransaction (). Commit ( );
session.close ();
System.out.println ("product usuniety");
session = sessionFactory.openSession ();
session.beginTransaction ();
System.out.println ("Category:" + session.createQuery ("pious Kategoria"). listinfo (). size ());
System.out.println ("Produkty: "+ Session.createQuery (" from Product "). List (). Size ());
session.clear ();
session.delete (cat);
session.flush ();
session.getTransaction (). commit ();
session.close ();
System.out.println ("category removed);
sessionFactory.openSession session = ();
session.beginTransaction ();
System.out.println (" Categories: "+ session.createQuery (" from Category "). list (). size ());
System.out.println (" Products: "+ session.createQuery (" from Product "). list (). size () );
System.out.println ("end");}

}


very important is to save both the product and category. If we do not, you get an error: Exception in thread "main" org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: main.Produkt. The order of writing is not important.
In the code I had to clear the session (session.clear ()), to avoid the error: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already-associated with the session. The result of
programiku is:
saved!
Categories: 1
Products: 2
removed
product categories: 1
Products: 1
category removed
Categories: 0
Products: 1
end


kind of ok, but why there is no product category? If you look in the database, it will actually see that in the Products table entry exists "prod2" with an empty foreign key value kategory_id. A little counterintuitive. Maybe you can do so that the dependent objects (products) are stored and disposed of together with the parent object (category)? Of course it can. You have to be just a little torment:

Mappings:
 
\u0026lt;? Xml version = "1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="main">
<class name="Kategoria" table="kategoria">
<id name="id" unsaved-value="null" column="kategory_id">
<generator class="sequence">
<param name="sequence">kat_seq</param>
</generator>
</id>
<property name="name" />
<property name="type" />
<property name="description" />
<set name="products" lazy="true" inverse="true" cascade="all">
<key column="kategory_id" />
<one-to-many class="Produkt"/>
</set>
</class>
</hibernate-mapping>

<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="main">
<class name="Produkt" table="produkt">
<id name="id" unsaved-value="null" column="produkt_id">
<generator class="sequence">
<param name="sequence">prod_seq</param>
</generator>
</id>
<property name="name" />
<property name="value" />
\u0026lt;many-to-one name="kategoria" class="Kategoria" not-null="true" column="kategory_id"/>
\u0026lt;/ style>
\u0026lt;/ hibernate-mapping>


Klasy POJO:

 
main package;

import java.util.HashSet;
import java.util.Set;

Kategoria {public class
Integer id;
String name, String type
;
String description;
\u0026lt;Produkt> Set products = new HashSet \u0026lt;Produkt> ();

public Integer getId () {
return id;}


public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public Set<Produkt> getProducts() {
return products;}


public void setProducts (Set \u0026lt;Produkt> products) {
this.products = products;}


public void addProduct (Product product) {
if (product.getKategoria () == null)
product.setKategoria (this);
products.add (ProductName);}


} package main;

public class Product {
Integer id;
String name;
Integer value;
Category:

Public Category getKategoria () {
return category;}


public void setKategoria (Category) {
this.kategoria = category;
this.kategoria.getProducts (). Add (this);}


public Integer getId () {return id
;


} public void setId (Integer id) {this.id = id
;}

public String getName
() {return name
;


} public void setName (String name) {this.name = name
;


} public Integer getValue () {return value
;
} public void

setValue (Integer value) {this.value = value
;

}}


The key mappings and POJO options are "cascade", "inverse" and settery (setKatgoria, setProdukt, addProdukt) - without them javovych simple operations on the premises would not directly translate to the situation in the database.

And main:

 
package main;

org.hibernate.Session import, import
org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;


public class Main {public

static void main (String [] args) {Session

session = null;
SessionFactory SessionFactory = new Configuration (). configure (). buildSessionFactory ();
sessionFactory.openSession session = ();

session.beginTransaction () ;

Kategoria Kategoria cat = new ();
PROD1 Product = new Product ();
prod2 Product = new Product ();
prod1.setName ("PROD1");
prod2.setName ("prod2");
cat. addProduct (PROD1);
prod2.setKategoria (cat);

session.save (cat);
session.flush ();
session.getTransaction (). commit ();
session.close ();
System. out.println ("zapisane!");


session = sessionFactory.openSession ();
session.beginTransaction ();
System.out.println ("Category:" + session.createQuery ("pious Kategoria"). list (). size ());
System.out.println ("Products" + session.createQuery ("from Product"). List (). Size ());
session.clear ();
session.delete (prod1);
kat.getProducts ( ). remove (prod1);
session.flush ();
session.getTransaction (). commit ();
session.close ();
System.out.println ("product usuniety");


session = sessionFactory.openSession ();
session.beginTransaction ();
System.out.println ("Category:" + session.createQuery ("from Category"). list (). size ());
System.out.println ("Products" + session.createQuery ("from Product"). list (). size ());
session.clear ();
System.out.println ("products" + kat.getProducts (). size ());
session.delete (cat);
session.flush ();
session.getTransaction () . commit ();
session.close ();
System.out.println ("category removed);
sessionFactory.openSession session = ();
session.beginTransaction ();
System.out.println (" Categories : "+ session.createQuery (" from Category "). list (). size ());
System.out.println (" Products: "+ session.createQuery (" from Product "). list (). size ( ));
System.out.println ("end");}

}


Result the program:

saved!
Categories: 1
Products: 2
removed
product categories: 1
Products: 1
products: 1
category removed
Categories: 0
Products: 0
end

Thursday, September 17, 2009

Is A Broad Nose Attractive On A Man

Nightbreaker

NIGHT BREAKER

MAXIMUM SPECIFICATIONS - More light for your safety


bulb perfect car for drivers who want to travel safer and better lit the path. With the highly effective production technology strands and blue rings NIGHT BREAKER family of lamps for automobile headlamps, produces:
  • 90% more light on the road *
  • to 10% whiter light
    * compared to standard lamps on the market longer range
headlights will greatly advance light barriers, so you can quickly see emerging in the way risk - additional time to respond, could save your life!

White light bulbs NIGHT BREAKER improves driving comfort by reduce eyestrain.

patented blue ring also reduces the possibility of blinding oncoming drivers: clearly focused light beam concentrates the light exactly where you need it. Uniquely designed

NIGHT BREAKER improve the appearance of the headlights. The typical silver cap (H4, H7, H11) and the blue ring light bulbs make a big impression.

course Automotive halogen bulbs can easily replace the bulb with the type of family NIGHT BREAKER, because all types are 100% approved for use across Europe.

Tuesday, August 4, 2009

Letter Leave Apartment

System.setProperty () using Spring

problem of how to call System.setProperty Spring occurred when the zdeployowaniu two applications on one server, the logs of one of them appeared the following entry:

"A C3P0Registry MBean is already registered. This Means That probably an application using c3p0 was undeployed, but not all were closed Priority PooledDataSources This undeployment. This May lead to resource leaks over time. Please take care to close all PooledDataSources. "

the hibernate forums, I found the information that you need to set a variable in the system:
com.mchange.v2.c3p0.management.ManagementCoordinator = com.mchange.v2.c3p0.management.NullManagementCoordinator
Unfortunately
this solution is not out of the question (all customers would have to modify your script that runs Tomcat). The only sensible solution that came to my mind, is forcing the Spring Trip.
naszukałem A little, until I finally found a (bad) solution to my problem. After the changes and simplifications obtained acting bean'a :)

Oto on:

  
<bean id="sysprops" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass">
<value>java.lang.System</value>
</property>
<property name="targetMethod">
<value>setProperty</value>
</property>
<property name="arguments">
<list>
\u0026lt;value> com.mchange.v2.c3p0.management.ManagementCoordinator \u0026lt;/ value>
\u0026lt;value> com.mchange.v2.c3p0.management.NullManagementCoordinator \u0026lt;/ value>
\u0026lt;/ list>
\u0026lt;/ property> ;
\u0026lt;/ bean>


If someone was interested, so why not have another variable to be set, then I invite you to the forum hibernate.

Thursday, March 26, 2009

How Long Does It Take For Bichon Hair To Grow

Hibernate - Hibernate

first problem with the mismatch of the world of object-oriented and relational occurs when modeling (mapping) a hierarchy of classes. Inheritance is one of the paradigms of object-oriented programming and the abandonment of him, because of the relational data layer, it would be regression. Using Hibernate inheritance can be mapped in three ways: first
table for each class (table per concrete class)
second table for each class hierarchy (table per class hierarchy)
third table for each subclass (table per subclass)

In all cases, I will perform the method:

 
public class Main {public static
void main (String [] args) {Session session
= null;
SessionFactory = new SessionFactory Configuration (.) configure (). buildSessionFactory ();
session = sessionFactory.openSession();
Subcategory1 cat = new Subcategory1();
cat.setName("sub1");
cat.setSize(1);
Subcategory2 cat2 = new Subcategory2();
cat2.setName("sub2");
cat2.setVolume(2);
session.beginTransaction();
session.save(cat);
session.save(cat2);
session.flush();
session.getTransaction().commit();
session.close();
session = sessionFactory.openSession();
session.beginTransaction();
List<Category> cats = session.createQuery("from Subcategory1").list();
System.out.println(cats.size());
cats = session.createQuery("from Subcategory2").list();
System.out.println(cats.size());
}
}


public class Category {
Integer id;
String name;
public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}
}

public class Subcategory1 extends Category {
Integer id;
Integer size;
public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public Integer getSize() {
return size;
}

public void setSize(Integer size) {
this.size = size;
}
}

public class Subcategory2 extends Category {
Integer id;
Integer volume;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
} Public Integer

getVolume () {return
volume;
} public void

setVolume (Integer volume) {
this.volume = volume;

}}


Ad 1
simplest approach - the database in general are not aware of the inheritance.

consists of two files mapping Subcategory1.hbm.xml, Subcategory2.hbm.xml:

 
\u0026lt;? Xml version = "1.0"?>

\u0026lt;! DOCTYPE hibernate-mapping PUBLIC
"- / / Hibernate / Hibernate Mapping DTD 3.0 / / EN "
" http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">

<hibernate-mapping package="main">
<class name="Subcategory1">
<id name="id" unsaved-value="null" column="category_id">
<generator class="sequence">
<param name="sequence">sub1_category_seq</param>
</generator>
</id>
<property name="name"/>
<property name="size"/>
</class>
</hibernate-mapping>


<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="main">
<class name="Subcategory2">
<id name="id" unsaved-value="null" column="category_id">
<generator class="sequence">
<param name="sequence">sub2_category_seq</param>
</generator>
</id>
<property name="name"/>
<property name="volume"/>
</class>
</hibernate-mapping>


Stworzone zostaly dwie tabele:

  
CREATE TABLE subcategory1
(
category_id integer NOT NULL,
name character varying(255),
size integer,
CONSTRAINT subcategory1_pkey PRIMARY KEY (category_id)
)

CREATE TABLE subcategory2
(
category_id integer NOT NULL,
name character varying(255),
volume integer,
Subcategory2_pkey CONSTRAINT PRIMARY KEY (category_id)
)


Ad2.
second approach - mapping of the entire hierarchy of classes in a single table.
form a single file mapping Category.hbm.xml

 
\u0026lt;? Xml version = "1.0"?>

\u0026lt;! DOCTYPE hibernate-mapping PUBLIC
"- / / Hibernate / Hibernate Mapping DTD 3.0 / / EN "
" http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">

\u0026lt;hibernate-mapping package="main">
\u0026lt;class name="Category">
\u0026lt;id name = "id" unsaved-value = "null" column="category_id">
<generator class="sequence">
<param name="sequence">category_seq</param>
</generator>
</id>
<discriminator column="type" type="string" />
<property name="name" />
<subclass name="Subcategory1" discriminator-value="1">
<property name="size" />
</subclass>
<subclass name="Subcategory2" discriminator-value="2">
\u0026lt;property name="volume" />
\u0026lt;/ subclass>
\u0026lt;/ class>
\u0026lt;/ hibernate-mapping>


was created a table:

 

CREATE TABLE category (
category_id integer NOT NULL,
"type" character varying (255) NOT NULL, name character varying
(255),
size integer, integer
volume,
category_pkey CONSTRAINT PRIMARY KEY (category_id)
)

Important! When creating the mapping file, be sure to element \u0026lt;discriminator> was in before all the elements \u0026lt;PROPERTY>.

Ad 3
third approach involves the representation of inheritance relationships with foreign keys of relational links. Each subclass uses its own table. I create three files
mapping Category.hbm.xml, Subcategory1.hbm.xml, Subcategory2.hbm.xml

 
\u0026lt;? Xml version = "1.0"?>

\u0026lt;! DOCTYPE hibernate-mapping PUBLIC
"- / / Hibernate / Hibernate Mapping DTD 3.0 / / EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

\u0026lt;hibernate-mapping package="main">
<class name="Category">
<id name="id" unsaved-value="null" column="category_id">
<generator class="sequence">
<param name="sequence">category_seq</param>
</generator>
</id>
<property name="name" />

</class>
</hibernate-mapping>


<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="main">
<joined-subclass name="Subcategory1" extends="Category">
<key column="category_id"/>
<property name="size"/>
</joined-subclass>
</hibernate-mapping>


<?xml version="1.0"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0 / / EN "
" http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">

\u0026lt;hibernate-mapping package="main">
\u0026lt;joined-subclass name = "Subcategory2" extends = "Category">
\u0026lt;key column="category_id"/>
\u0026lt;property name="volume"/>
\u0026lt;/ joined-subclass>
\u0026lt;/ hibernate-mapping>


in the database have been created three tables:

 

CREATE TABLE category (category_id
integer NOT NULL, name character varying
(255),
CONSTRAINT category_pkey PRIMARY KEY (category_id)
)

CREATE TABLE subcategory1
(
category_id integer NOT NULL,
size integer,
CONSTRAINT subcategory1_pkey PRIMARY KEY (category_id),
CONSTRAINT fk6c9080d3884719af FOREIGN KEY (category_id)
REFERENCES category (category_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)

CREATE TABLE subcategory2
(
category_id integer NOT NULL,
volume integer,
CONSTRAINT subcategory2_pkey PRIMARY KEY (category_id),
CONSTRAINT fk6c9080d4884719af FOREIGN KEY (category_id)
REFERENCES category (category_id) MATCH
SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION
)


This type of mapping can be issued intuitive polymorphic queries:

 
session.createQuery cats = ("from Category"). List ();
System.out. println (cats.size ()); / / "2"


Each entry in the table and subcategory2 subcategory1 will correspond to an entry in the category table.

Monday, March 9, 2009

Bannedstory Boat Maplestory

representation of inheritance - the first application

I know that this should be the first post, but somehow I did not have the time or desire sklecać everything (all configurations) from the beginning. Well I finally did it and I did the first, a simple application that writes to the database one tuple.

My POJO is very simple:

 
public class Category {
Integer id;
String name;

public Integer getId () {return id
;


} public void setId (Integer id) {
this . id = id;}


public String getName () {return name
;


} public void setName (String name) {this.name = name
;

}}



to this as easy mapping:

 \u0026lt;hibernate-mapping package="main"> 
\u0026lt;class name="Category">
ID> name="id" value="null" column="category_id">
\u0026lt;generator class="sequence">
\u0026lt;/ generator> \u0026lt; , / id> \u0026lt;/ class> \u0026lt;/ hibernate-mapping> \u0026lt;paramname="sequence"> category_seq

\u0026lt;property name="name">
\u0026lt;/ property>


configuration file looks like follows:

 \u0026lt;? xml version = "1.0" encoding = "UTF-8"?> 
\u0026lt;DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/testy
</property>
<property name="hibernate.connection.driver_class">org.postgresql.Driver
</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">test</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect
</property>
<property name="hibernate.show_sql">false</property>
<property name="hbm2ddl.auto">create</property>
<mapping resource="main\Category.hbm.xml" />
</session-factory>
</hibernate-configuration>


is contained in the configuration entry on the automatic creation of database schema-defined mapping files:
 \u0026lt;property name="hbm2ddl.auto"> create \u0026lt;/ property> 


main class of the project is as follows:

 public class 
Main {public static void main (String [] args) {Session session
= null;
SessionFactory SessionFactory = new Configuration (). configure (). buildSessionFactory ();
sessionFactory.openSession session = ();
Category cat = new Category ();
cat.setName ("name");
session.beginTransaction ();
session.save (cat);
session.flush ();
session.getTransaction (). Commit ();
session.close ();
System.out.println ("end");
}}


greatest difficulty can make selecting the correct dependencies. A working configuration is as follows:

- antlr-2.7.6.jar
- backport-util-concurrent-3.1.jar
- postgresql-8.1-407.jdbc3.jar
- ehcache-1.5.0.jar
- log4j-
1.2.14.jar - commons-collections-3.2.jar
- dom4j-1.6.1.jar
- commons-logging-1.1.1.jar
- hibernate-3.2.5.ga.jar
- jta-1.0 .1 B.jar
- xml-apis-1.3.03.jar
- cglib-nodep-2.1_3.jar

Wednesday, March 4, 2009

Windows Aero Template Blog

JUNG. The problem with the generation of various graph output for the same input data.

JUNG stands for Java Universal Network / Graph Framework. Library (or framework, as will the authors) is used in general to build graphs and calculate the coordinates of their vertices. JUNG provides a number of predefined types of graphs: directed, nieskierowane acyclic, with parallel edges, trees, etc.
framework itself is very well udokumentowny and uses it in a very intuitive, so I will confine myself to a brief example:


 private void buildGraph () {
/ / I create a graph
SparseGraph SparseGraph s = new ();

/ / Create the vertices of a graph
UndirectedSparseVertex UndirectedSparseVertex node1 = new ();
UndirectedSparseVertex UndirectedSparseVertex node2 = new ();

/ / add vertices to the graph
g.addVertex (node1);
g.addVertex (node1);


/ / I create the edge between two vertices
UndirectedSparseEdge link = new UndirectedSparseEdge (node1, node2);
/ / add edge to graph
g.addEdge (link);

/ / distribution elements of the graph at the district level, measuring 100 x 100
CircleLayout layout = new MyCircleLayout (g);
layout.initialize (new Dimension (100, 100));

/ / informational Displaying coordinates calculated by Jung
System.out.println ("--------------");
System . out.println ("node1.getX ():" + layout.getLocation (node1). getX ());
System.out.println ("node1.getY ():" + layout.getLocation (node1). getY ());
System.out.println ("node2.getX ():" + layout.getLocation (node2). getX ());
System.out.println ("node2.getY ():" + layout. getLocation (node2). getY ());}

Works!

But not quite as I wanted ... pretty soon it became clear that Jung did not always face the same coordinates for the same graph. If the above method was called twice, the result would look like this: --------------

 
node1 (). GetX (): 10.00
node1 (). GetY (): 20.00
node2 (). getX (): 30.00
node2 (). getY (): 40.00

--------------
node1 (). getX (): 30.00
node1 () . getY (): 40.00
node2 (). getX (): 10.00
node2 (). getY (): 20.00


The problem turned out to be the representation of nodes and edges in the object SparseGraph. These items were kept in the collections of HashSet, Thus the order of their collection of the harvest does not always have (and as it turned out it was not), set! Fast, simple and effective solution to the problem turned out to be writing a class extending SparseGraph and overloaded initialize () method. Finally, the working example, as follows:

 private static class extends MyGraph SparseGraph 
protected void {initialize () {

super.initialize ();
/ / LinkedHashSet ensure that items are placed in the file and downloaded it in the same order
LinkedHashSet mVertices = new ();
LinkedHashSet mEdges = new ();

}} private void

buildGraph () {
/ / I create a graph
MyGraph MyGraph s = new ();

//...
/ / continue the same way as in the previous example
}

Wednesday, February 4, 2009

Pokemon Soul Silver Cydia Source

session and transaction management in HibernateDaoSupport

first blog entry and immediately brings heavy guns - the management of transactions in the environment bazodanowymi Spring + Hibernate. Theoretically, the matter is very simple - Spring, by HibernateDaoSupport, provides a whole set of methods for painless use of the data (add, delete) without bothering sessions, transactions, flushowaniem, commitowaniem, etc. Such an improvement may seem very attractive, but in certain situations (read: usually) creates a lot of problems.
Below I will try to describe how to tame and control the sessions of the transactions while working with springowym HibernateDaoSupport.

Pozwoję omit the details of an implementation, focusing only on the merits.
classic example: we have a product class and the class B category. One product can be only one category, the category has a set of products, and therefore the relationship between "one to many".

Klasy POJO i mapowania:

 <class name="Kategoria" table="kategoria"> 
<id name="id" unsaved-value="null" column="kategory_id">
<generator class="sequence">
<param name="sequence">kat_seq</param>
</generator>
</id>
<property name="name"/>
<property name="type"/>
<property name="description"/>
\u0026lt;set name="products" lazy="true">
\u0026lt;key column="kategory_id"/>
\u0026lt;one-to-many class="Produkt"/>
\u0026lt;/ set>
\u0026lt;/ class>

\u0026lt;class name="Produkt" table="produkt">
\u0026lt;id name="id" unsaved-value="null" column="produkt_id">
\u0026lt;generator class = "sequence">
\u0026lt;param name="sequence"> prod_seq \u0026lt;/ param>
\u0026lt;/ generator>
\u0026lt;/ id> \u0026lt;property
name="name"/>
\u0026lt;property name="value"/>
\u0026lt;many-to-one name="kategoria" class="Kategoria"/> ;
\u0026lt;/ class>


General for all the DAO objects:

 GenericDao public class extends HibernateDaoSupport 

{public void store (Object object) {
getHibernateTemplate (). saveOrUpdate (object) ;
};

public void delete (Object object) {
getHibernateTemplate (.) delete (object);
};

\u0026lt;OBJECT> public List find (String query) {return
getHibernateTemplate (). Find (query);}


findUnique public Object (String query) {List \u0026lt;OBJECT>
getHibernateTemplate list = () . find (query);
if (list.size ()> 0) return
list.get (0);

else return null;}

}


assume that all the DAO will support the editing inherit from this class :

 public class KategoriaDao  extends GenericDao { 
public Kategoria findKategoriaByName(String name) {
return (Kategoria)findUnique("... where name = "+name);
}
}

public class ProduktDao extends GenericDao {
public Produkt findProduktByName(String name) {
return (Produkt)findUnique("... where name = "+name);
}
}


Teraz praktyczne działanie:
 public void testInsert() { 
Kategoria kat = new Kategoria();
kat.setName("kat");
kat.setDescription("desc");
kategoriaDao.store(kat);
}


Po wywolaniu metody store() obiekt kat zostal zapisany in the database. Without creating a session, approve the transaction, bring coherence to the database with objects ...
Simply - calling one method and category in the database. Simple, right?

Assume that the database is a category called "cat". The database, there are four products in this category.

 testSelect public void () {Category cat = 
kategoriaDao.findKategoriaByName ("cat");
System.out.println (kat.getName ()) / / kat
System.out.println (kat.getDescription ( )) / / desc
}


Hmm ... even simpler matter. Write to the database by one method (store) I read it one (find. ..), nowhere in the code does not appear
magic word "session", HibernateDaoSupport is sensational!

Ok, but before we determine that a company with Spring Hibernate will do everything for us, let's look at kojeny example

 testSelectCollections public void () {Category cat = 
kategoriaDao.findKategoriaByName ("cat");
for (Product p: kat.getProducts ()) {System.out.println
(p.getName ());}

}


In operation method will thrown an exception LazyInitializationException: no session or session was closed.
Hmm ... first once there is so little word "session". What happened?
category has a set of products, which is initialized as "lazy" (), which means that when you download
category in the database will NOT be downloaded products in the category. Products will be pulled from the database only when needed
(will appeal to them). Such an appeal shall be in the loop in the method testSelectCollections (). So why
products will not be taken at this time? As the session ended with the database and the connection is inactive. But how know where it begins and where it ends and how
session control it? Well, self-managed sessions Spring opening them only for the duration of the HibernateDaoSupport method call. To be precise:

 testSelectCollections public void () {
/ / there is no session
Category cat = kategoriaDao.findKategoriaByName ("cat") / / session is
/ / there is no session
for (Product p: kat.getProducts ()) {System.out.println
(p.getName ());}

}


Fortunately, Spring allows you to control the session. With the help comes Aspect Oriented Programming (AOP) that (using such phrases) indicates Springowi
where it begins and where it ends the transaction, and hence and the session. Using @ Transactional annotation to mark a method that is to be done in one transaction:

 @ Transactional public void 
testSelectCollections () {Category cat =
kategoriaDao.findKategoriaByName ("cat");
for (Product p: kat.getProducts ()) {System.out.println
(p.getName ());}

}

session lasts throughout the time of the method. There is only one condition - @ Transactional annotations only work in classrooms that are beanami springowymi!
Problem solved!

To everything worked, you need to tell Spring to make arrangements with annotations and AOP. Here's an example configuration file:


 \u0026lt;? Xml version = "1.0" encoding = "UTF-8"?> 
\u0026lt;beans xmlns = "http://www.springframework.org/schema/beans"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xmlns: context = "http://www.springframework.org/schema/context"
xmlns: tx = "http:/ / www.springframework.org / schema / tx "
xmlns: aop =" http://www.springframework.org/schema/aop "
xsi: schemaLocation ="
http://www.springframework.org/schema/beans
classpath:org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
classpath:org/springframework/transaction/config/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop
classpath:org/springframework/aop/config/spring-aop-2.0.xsd">

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
...
</bean>

<bean id="localSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
...
</list>
</property>
<property name="hibernateProperties">
<ref bean="hibernateProperties" />
</property>
</bean>

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
\u0026lt;property name="sessionFactory" ref="localSessionFactory" />
\u0026lt;/ bean>
\u0026lt;tx:annotation-driven/>
\u0026lt;/ beans>



file with all the most important are:
- \u0026lt;tx:annotation-driven> - literally "controlled transactions annotations"
- correct schemaLocation

It should also be noted that the spring attached to the project wanted to work together. Once upon a time I could not come to grips with AOP
needed because each jar was from another parish. " Thorough cleanup pom'ie were necessary. The following excerpt

according to pom'a that define the correct configuration jar'ów (\u0026lt;springframework.version> 2.0.6 \u0026lt;/ springframework.version>):

 \u0026lt;dependencies> 
\u0026lt;dependency>
\u0026lt; groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring \u0026lt;/ artifactId>
\u0026lt;version> springframework.version $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-aspects \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version> ;
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-aop \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-beans \u0026lt;/ artifactId> ;
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-context \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId> ;
\u0026lt;artifactId> spring-core \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-dao \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency> ;
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId>-hibernate3 spring \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-JMS \u0026lt;/ artifactId> ;
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId> spring-jmx \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId> ;
\u0026lt;artifactId> spring-remoting \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;dependency>
\u0026lt;groupId> org.springframework \u0026lt;/ groupId>
\u0026lt;artifactId>-webmvc spring \u0026lt;/ artifactId>
springframework.version \u0026lt;version> $ {} \u0026lt;/ version>
\u0026lt;/ dependency> ;
\u0026lt;dependency>
\u0026lt;groupId> net.sf.ehcache \u0026lt;/ groupId>
\u0026lt;artifactId> ehcache \u0026lt;/ artifactId>
\u0026lt;version> 1.5.0 \u0026lt;/ version>
\u0026lt;/ dependency>
\u0026lt;/ dependencies>