[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread [EMAIL PROTECTED]
Ok, ok... I forgot about timezone conversion.

But putting a hat of a customer I was once, on a system I was writting, simply 
using Calendars to do such conversions were much faster than using 
SimpleDateFormat.  There is a lot of expression parser and compilations as you 
said, and if you don't need that avoiding it would improve performance.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945911#3945911

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945911


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread elkner
"[EMAIL PROTECTED]" wrote : 
  | - I actually (as a programmer) would recommend to not use SimpleDateFormat 
unless your formatting is stored in a database field since its performance is 
pretty bad. 

Hmmm, would say, that depends. Its probably not as fast as Integer.toString(), 
but IMHO its still pretty fast and quite comfortable (especially if you have to 
consider timezone conversion etc.). 

What I've seen is, that the way hibernate uses SimpleDateFormat is often 
inefficient and actually that results in bad performance. E.g. hibernate often 
creates a new SimpleDateFormat when it needs one. Better would be to clone a 
static instance (since pattern is the same) and adjust its timezone if 
neccessary. This would safe the relative expensive compilation of the 
underlying format pattern, which is done for each new instance of a 
simpledateformat ...



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945910#3945910

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945910


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread hlfsousa
I guess we posted at the same time :)
I'm using JBoss 4.0.4.CR2 (can't upgrade to GA right now because of some bad 
collection mapping; not my fault). Thanks for the tips, they are certainly very 
useful. I'm using that DateFormat just for debugging and intend to remove it 
soon -- as soon as everything else works. Thanks again

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945856#3945856

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945856


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread [EMAIL PROTECTED]
You could have added the word transient on the field declaratio, this way 
JBossSerialization wont have used it.

I asked you about the version because there were some problems with 
JBossSerialization used on JBoss 4.0.4 RCLatest.

I created a testcase serializing a SimpleDateFormat, and it works fine. If you 
upgraded your version you would probably have your test working.

Also, just some  TIPs non related to your post:

- be careful on moving SimpleDateFormat to a static class since it's non 
multi-thread.  

- I actually (as a programmer) would recommend to not use SimpleDateFormat 
unless your formatting is stored in a database field since its performance is 
pretty bad, hence Apache created some FastDateFormat classes.

Two cents from someone who wrote a Profiler.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945845#3945845

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945845


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread hlfsousa
Since I cannot delete this topic, let me just say that I solved the problem. 
The thing is, as the error suggests, that I had a SimpleDateFormat that was not 
serializable. I declared it in a class as '"DateFormat fmt", and assigned a 
value to it as DateFormat.getDateInstance(). It was used to format some dates 
in toString(), so I made it static final and everything works. The world would 
be so perfect if I didn't do these stupidities.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945828#3945828

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945828


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: SerializationException, not sure about the source

2006-05-23 Thread [EMAIL PROTECTED]
What version of JBoss are you using?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945827#3945827

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3945827


---
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user