Friday, December 28, 2007

[completeJava] Double Synchronied Single ton class

 
A Single class can be left with multiple instances of it in a multi threaded enviornment.
Here is an article which describes you abt the double synchornized single ton class to avoid that situation.
 
 
 


Santhosh.G


Never miss a thing. Make Yahoo your homepage.

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Parenting Zone

on Yahoo! Groups

Your one stop for

parenting groups.

Yahoo! Groups

Endurance Zone

Communities for

increased fitness.

.

__,_._,___

Thursday, December 27, 2007

Wednesday, December 26, 2007

[completeJava] Re: Doubt on WSDL2Java

Hi,

This Exception (fault) is because of missing authentication details.
You can set authentication details by setting username and password before invoking the webservice.
That can be done by,

MyWebService webservice = new MyWebService ServiceLocator().getMyWebService();
org.apache.axis.client.Stub stub = (org.apache.axis.client.Stub)webservice;
stub.setUsername("username");
stub.setPassword("password");
webservice .callAService();


I think this could help you.

Thanks,
Thirupathi B.


--- In completeJava@yahoogroups.com, "cinthia.menon" <cinthia.menon@...> wrote:
>
> Hi all,
>
> I need some help w.r.t web services in java. I have a wsdl file and i
> need to send and receive calls to this wsdl url or file through java
> program. This url needs authentication (user name and pwd). So for
> this, i have used the wsdl2java tool(by downloading xerces,axis and
> installing tomcat) to convert the wsdl into java classes and i wrote a
> small client program to call this java classes. I am having a problem
> now. The client program compiles succesfully but the when i run it, it
> gives a "missing authentication header" exception. Actually from the
> wsdl file i have, there is a class called AuthenticationHeader.java
> also generated. I called setUsername and setPassword methods available
> on this class to set the username and password for the wsdl url but
> this does not help. I don't understand if this is the right way to do
> it. The complete exception details are:
>
>
>
> Exception in thread "main" AxisFault
> faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
> faultSubcode:
> faultString: Missing authentication header.
> faultActor:
> faultNode:
> faultDetail:
> {http://xml.apache.org/axis/}stackTrace:Missing authentication
> header.
> at
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
> .java:222)
> at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
> java:129)
> at
> org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
> ationContext.java:1087)
> at
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
> )
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
> n Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(Unknown Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
> known Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
> ce)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> at
> org.apache.axis.encoding.DeserializationContext.parse(Deserialization
> Context.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
> tandChecker.java:62)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> at org.apache.axis.client.Call.invoke(Call.java:2767)
> at org.apache.axis.client.Call.invoke(Call.java:2443)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at
> new5.wsdl.VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x0020_interface
> Soap_BindingStub.getTemplateByName(VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x
> 0020_interfaceSoap_BindingStub.java:2132)
> at Client.main(Client.java:57)
>
> {http://xml.apache.org/axis/}hostname:supraja-win
>
> Missing authentication header.
> at
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
> .java:222)
> at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
> java:129)
> at
> org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
> ationContext.java:1087)
> at
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
> )
> at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
> n Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> Dispatcher.dispatch(Unknown Source)
> at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
> known Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
> ce)
> at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> at
> org.apache.axis.encoding.DeserializationContext.parse(Deserialization
> Context.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
> tandChecker.java:62)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> at org.apache.axis.client.Call.invoke(Call.java:2767)
> at org.apache.axis.client.Call.invoke(Call.java:2443)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at
> new5.wsdl.VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x0020_interface
> Soap_BindingStub.getTemplateByName(VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x
> 0020_interfaceSoap_BindingStub.java:2132)
> at Client.main(Client.java:57)
>
>
> Any help would be really appreciated regardng this. Many thanks in advance
>

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

HDTV Support

on Yahoo! Groups

Help with Samsung

HDTVs and devices

Food Lovers

Real Food Group

on Yahoo! Groups

find out more.

.

__,_._,___

[completeJava] Immutable classes

Mutable and Immutable Objects

by David O'Meara

Mutable and Immutable objects are a simple idea with wide ranging consequences. Often when immutability is mentioned it isn't defined, or when it is defined there are no details of how to ensure immutability or the consequences.

Before we start, the terminology follows the article Pass-by-Value, Please in the JavaRanch Camp fire. If you haven't learnt to say Java is pass-by-value, you might want to head there first.

Crappy Definition to start off with:

Mutable Objects: When you have a reference to an instance of an object, the contents of that instance can be altered
Immutable Objects: When you have a reference to an instance of an object, the contents of that instance cannot be altered

Immutability and Instances

To demonstrate this behaviour, we'll use java.lang.String as the immutable class and java.awt.Point as the mutable class.
	Point myPoint = new Point( 0, 0 ); 	System.out.println( myPoint ); 	myPoint.setLocation( 1.0, 0.0 ); 	System.out.println( myPoint );  	String myString = new String( "old String" ); 	System.out.println( myString ); 	myString.replaceAll( "old", "new" ); 	System.out.println( myString );
In case you can't see what the output is, here it is:
	java.awt.Point[0.0, 0.0] 	java.awt.Point[1.0, 0.0] 	old String 	old String
We are only looking at a single instance of each object, but we can see that the contents of myPoint has changed, but the contents of myString did not. To show what happens when we try to change the value of myString, we'll extend the previous example.
	String myString = new String( "old String" ); 	System.out.println( myString ); 	myString = new String( "new String" ); 	System.out.println( myString );
The output from this is:
	old String 	new String
Now we find that the value displayed by the myString variable has changed. We have defined immutable objects as being unable to change in value, so what is happening? Let's extend the example again to watch the myString variable closer.
	String myString = new String( "old String" ); 	String myCache = myString; 	System.out.println( "equal: " + myString.equals( myCache ) ); 	System.out.println( "same:  " + ( myString == myCache ) );  	myString = "not " + myString; 	System.out.println( "equal: " + myString.equals( myCache ) ); 	System.out.println( "same:  " + ( myString == myCache ) );
The result from executing this is:
	equal: true 	same:  true 	equal: false 	same:  false
What this shows is that variable myString is referencing a new instance of the String class. The contents of the object didn't change; we discarded the instance and changed our reference to a new one with new contents.

Variable Values and Instance Contents

If you look at the example above, you can see the point I'm trying to sneak through. You can always change the value of a variable by getting your variable to reference a new object. Sometimes you can change the value of a variable by keeping a reference to the same instance, but change the contents of the instance.

After you have eliminated those possibilities, you have a variable that retains its reference to an object, but the contents of this object cannot change. Doesn't sound like a very interesting idea, and it sounds a bit too simple to be useful.

It turns out that Immutable Objects, that is objects that you cannot change the contents after they have been set, are a very handy tool when used in the right place. They can promote thread safety in your code, you can share them around without being afraid that they will change without your knowledge, they are great for caching and constants. But we're not going to cover any of that yet; we are going to concentrate on building immutable objects.

Building an Immutable class

So what is it about the String class that makes it Immutable while a Point is mutable?

In this case, Strings have no mutators while Points do. If we removed all of the mutators from the Point class, would it be Immutable? No it wouldn't. Removing mutators is a necessary first step, but immutability requires more than that to ensure that the contents of an instance never changes.

Fields must be private

Obviously all of the fields must be private. There is little point removing the mutators if they aren't even required to change the instance contents.
	public class ImmutablePoint 	{ 		//note there are no mutators! 		private double x; 		private double y;  		//and the rest... 	
This is almost enough, but there are two more steps to consider.

Make sure methods can't be overridden.

If your class gets extended, it could add extra fields that are not immutable, or the methods could be overridden to return a different value each time. There are two ways to protect against this.

The preferred way is to make the class final. This is sometimes referred to as "Strong Immutability". It prevents anyone from extending your class and accidentally or deliberately making it mutable.

The second way, also called "Weak Immutability" is to make your methods final. It allows others to extend your class to add more behaviour, but protects the original contract specified by the class. If you want a more verbose description, imagine a class A is weakly immutable. If you have an instance of object A, it is immutable. If someone creates class B that extends A, it is only the behaviour defined by the A class that is immutable. Any added behaviour from class B may not be immutable.

Protect mutable fields

The last requirement which many people fall victim too, is to build your immutable class from primitive types or immutable fields, otherwise you have to protect mutable fields from manipulation.

To highlight this problem, we'll use the example of a supposedly immutable class representing a person. Our class has a first and last name, as well as a date of birth.

	import java.util.Date; 	public final class BrokenPerson 	{ 		private String firstName; 		private String lastName; 		private Date dob;  		public BrokenPerson( String firstName, 		  String lastName, Date dob) 		{ 			this.firstName = firstName; 			this.lastName = lastName; 			this.dob = dob; 		}  		public String getFirstName() 		{ 			return this.firstName; 		} 		public String getLastName() 		{ 			return this.lastName; 		} 		public Date getDOB() 		{ 			return this.dob; 		} 	}
This all looks fine, until someone uses it like this:
	Date myDate = new Date(); 	BrokenPerson myPerson = 	  new BrokenPerson( "David", "O'Meara", myDate ); 	System.out.println( myPerson.getDOB() ); 	myDate.setMonth( myDate.getMonth() + 1 ); 	System.out.println( myPerson.getDOB() );
Depending on the dates entered, the output could be something like this:

	Mon Mar 24 21:34:16 GMT+08:00 2003 	Thu Apr 24 21:34:16 GMT+08:00 2003
The Date object is mutable, and the myPerson variable is referencing the same instance of the Date object as the myDate variable. When myDate changes the instance it is referencing, the myPerson instance changes too. It isn't immutable!

We can defend against this by taking a copy of the of the Date instance when it is passed in rather than trusting the reference to the instance we are given.

	import java.util.Date; 	public final class BetterPerson 	{ 		private String firstName; 		private String lastName; 		private Date dob;  		public BetterPerson( String firstName, 		  String lastName, Date dob) 		{ 			this.firstName = firstName; 			this.lastName = lastName; 			this.dob = new Date( dob.getTime() ); 		} 		//etc...
Now we're close, but we're still not quite there. Our class is still open to abuse.
	BetterPerson myPerson = 	  new BetterPerson( "David", "O'Meara", new Date() ); 	System.out.println( myPerson.getDOB() ); 	Date myDate = myPerson.getDOB(); 	myDate.setMonth( myDate.getMonth() + 1 ); 	System.out.println( myPerson.getDOB() );
We see here that taking a copy on the way in wasn't enough; we also need to prevent anyone from getting a reference to our mutable Date field when we pass it out.
	public Date getDOB() 	{ 		return new Date( this.dob.getTime() ); 	}

Make deep copies of mutable data

The only point to add is that when you copy the instance on the way in and the way out, you need to make a deep copy. Otherwise you run the risk of leaving some mutable data in your immutable class!

If you are confused about the need to provide a deep copy, keep in mind that a single piece of shared mutable data, no matter how deep it is buried inside an object, makes your class mutable. When you create a copy of an object to defend against the value changing, you need to make sure your copy doesn't include this shared mutable class. You need to copy any mutable objects all the way down to the last field, and copy any nested fields until you have a completely new copy of your own. It's the only way to be safe!

Our Template for Immutable Classes

Now we have a template for creating immutable objects.
  • Make all fields private
  • Don't provide mutators
  • Ensure that methods can't be overridden by either making the class final (Strong Immutability) or making your methods final (Weak Immutability)
  • If a field isn't primitive or immutable, make a deep clone on the way in and the way out.

Which classes are Immutable?

To finish up, lets discuss the common Java classes that are immutable and those that aren't. Firstly, all of the java.lang package wrapper classes are immutable: Boolean, Byte, Character, Double, Float, Integer, Long, Short, String.

As in the Person classes we discussed, java.util.Date objects are not immutable. The classes java.math.BigInteger and BigDecimal are not immutable either, although maybe they should have been.

And we're done...

...for now. This concludes an introduction to Mutable and Immutable Classes in Java. Hopefully there will be a second part that will go into more detail on weak and strong immutability, reasons why you'd make classes immutable and reasons to avoid them, and some other miscellaneous topics on immutable types in Java.

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Fitness Edge

on Yahoo! Groups

Learn how to

increase endurance.

Green Groups

on Yahoo! Groups

share your passion

for the planet.

.

__,_._,___

Sunday, December 23, 2007

[completeJava] provides Programming help and WebDesign help

Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Ads on Yahoo!

Learn more now.

Reach customers

searching for you.

Yahoo! Groups

Join a Health

& Fitness Group

or create your own.

.

__,_._,___

[completeJava] Doubt on WSDL2Java

Hi all,

I need some help w.r.t web services in java. I have a wsdl file and i
need to send and receive calls to this wsdl url or file through java
program. This url needs authentication (user name and pwd). So for
this, i have used the wsdl2java tool(by downloading xerces,axis and
installing tomcat) to convert the wsdl into java classes and i wrote a
small client program to call this java classes. I am having a problem
now. The client program compiles succesfully but the when i run it, it
gives a "missing authentication header" exception. Actually from the
wsdl file i have, there is a class called AuthenticationHeader.java
also generated. I called setUsername and setPassword methods available
on this class to set the username and password for the wsdl url but
this does not help. I don't understand if this is the right way to do
it. The complete exception details are:

Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Missing authentication header.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:Missing authentication
header.
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
ationContext.java:1087)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at
org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
new5.wsdl.VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x0020_interface
Soap_BindingStub.getTemplateByName(VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x
0020_interfaceSoap_BindingStub.java:2132)
at Client.main(Client.java:57)

{http://xml.apache.org/axis/}hostname:supraja-win

Missing authentication header.
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:222)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:129)
at
org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
ationContext.java:1087)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknow
n Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sour
ce)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at
org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at
new5.wsdl.VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x0020_interface
Soap_BindingStub.getTemplateByName(VMware_x0020_Lab_x0020_Manager_x0020_SOAP_x
0020_interfaceSoap_BindingStub.java:2132)
at Client.main(Client.java:57)

Any help would be really appreciated regardng this. Many thanks in advance

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Women of Curves

on Yahoo! Groups

see how women are

changing their lives.

.

__,_._,___

Monday, December 17, 2007

[completeJava] Trendy Used Laptops

Looking for a cheap used laptop? Visit the website to get a sleek and
trendy laptop for you at throw away prices:
http://cheaplaptops.bigbargains.info

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Parenting Groups

on Yahoo! Groups

Single Parenting

to managing twins.

.

__,_._,___

[completeJava] Hibernate is Very Slow

Hi Friens:

I am new to Hibernate .Now I am using Hibernate3.0 which performance
is very slow. Could you please suggest me with some setting so that
it performance can increase. Many thanks for your help.

Please see below my attached files....

hibernate.cfg.xml file


<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC

"-//Hibernate/Hibernate Configuration DTD//EN"

"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</proper
ty>

<property
name="hibernate.connection.url">jdbc:mysql://localhost:3306/inish</pro
perty>

<property name="hibernate.connection.username">root</property>

<property name="hibernate.connection.password">password</property>

<property name="hibernate.connection.pool_size">10</property>

<property name="hibernate.jdbc.batch_size">30</property>

<property name="c3p0.max_size">20</property>

<property name="c3p0.max_statements">50</property>

<property name="c3p0.acquire_increment">10</property>

<property name="show_sql">true</property>

<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

<property name="hibernate.hbm2ddl.auto">create</property>

<!-- Mapping files -->

<mapping resource="message.hbm.xml"/>

</session-factory>

</hibernate-configuration>

Message.hbm.xml file

<?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>

<class name="hibernateImpl.message.Message" table="MESSAGE">

<id name="id" column="ID" >

<generator class="increment"/>

</id>

<map name="MessageProperties" cascade="all" batch-size="100"
optimistic-lock="false">

<key column="MESSAGEID"/>

<index column="NAME" type="string"/>

<element column="VALUE" type="string"/>

</map>

<property name="conversationId">

<column name="CONVERSATIONID" />

</property>

<property name="deliveryMode">

<column name="DELIVERYMODE" not-null="true"/>

</property>

<property name="destination">

<column name="DESTINATION" />

</property>

<property name="expiration">

<column name="EXPIRATION" />

</property>

<property name="messageId">

<column name="MESSAGEID" />

</property>

<property name="messageType">

<column name="MESSAGETYPE" />

</property>

<property name="replyTo">

<column name="REPLYTO" />

</property>

<property name="timeToLive">

<column name="TIMETOLIVE" />

</property>

<property name="timestamp">

<column name="TIMESTAMP" />

</property>

<property name="priority">

<column name="PRIORITY" />

</property>

</class>

</hibernate-mapping>

Thanks,
Asutosh

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

New web site?

Drive traffic now.

Get your business

on Yahoo! search.

Cat Zone

on Yahoo! Groups

Join a Group

all about cats.

.

__,_._,___