[Persistence, JBoss/CMP, Hibernate, Database] - Re: How to use @Id @GeneratedValue(strategy=GenerationType.A
by rabbiaqaswar
When you will create your entity you will only have to set the desc property. The 'id' property will be set since it has these @Id @GeneratedValue(strategy=GenerationType.AUTO) annotations.
The database end depends upon the table generation strategy in your persistence.xml file. If this is what you have in persistence.xml:
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create"/>
| </properties>
|
OR
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| </properties>
Then you dont have to create the tables yourself, they'll be created. If you want to create the tables yourself then just like anyother column in a table you should also create the column for your id.
The @GeneratedValue annotations generates only int, Long or String values(but do check for yourself). So you should check what should be the datatype of your id. Say i have a table Customer in db with property Number CUSTOMERID. In my entity Customer, i will have property Long customerId. Then i use:
| @Id
| @GeneratedValue(strategy=GenerationType.AUTO)
It works fine.
hope this helps!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024993#4024993
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024993
19Â years, 1Â month
[Installation, Configuration & Deployment] - Loging of HTTP access
by Hutrer
Dear all,
I have a problem. JBOSS loging all HTTP access. like
----
2007-03-05 09:20:27,028 DEBUG [httpclient.wire.content] >> "202[\r][\n]"
2007-03-05 09:20:27,028 DEBUG [httpclient.wire.content] >> "n{gg?Z-[0xfc][0x9]c[0x4]l[0x9f]a[0xb5]$[0x9c][0x12]-[0xe2][0xc9][0
xe4][0xf3][0xf7]*[0x96]a[0xff][0x0]Nm[0xf7]^?[0x98][0xfd][0x8e][0x1f][0xa4][0xe7][0xff][0x0][0x92][0xaf][0xd4][0xfc]Vm/[0xc4]#
8[0xb1][0xbd][0xf4][0xff][0x0]S![0xe2][0xa2]}3^[0x8f][0xe5]k[0xb][0xd4]lp[0xc][0x12][0xa8] [0xf4]?r[0xbf]h[[0xc0]ZM[0xbc][0xde
]`[0xd2][0xed][0x99][0x8f]RaB[0x6]z[0xf1]Un<[0x9][0xa3];[0x96]}"[0xd9][0xc9][0xc1][0x1f][0xb8][0x88]F8'[0x18][0xf5][0xad]V>[0x
1f][0xf3][0xea][0xdf
----
I tried to turn of from log4j.xml configuration file, but i cant. After studing documentaiton. i realized that it is logs of HTTP access from Apache/Tomcat server, and found informataion, that i must configure file $JBOSS_HOME/server/default/deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xml but i can't find what i must configure. Can anybody help me with this problem?
Thanks in advance
P.S.
Information I'm triying to use located at http://www.pacoros.net/diario/2006/04/05/the-unofficial-jboss-performance...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024990#4024990
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024990
19Â years, 1Â month
[Performance Tuning] - Re: High CPU consumption.
by jpicard
Hello,
Thanks for your help.
Here is a result of the command 'jmap -heap', could you help me to interpret this result, and to optimize my parameters?
Best Regards,
Jerome.
Attaching to process ID 11776, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_11-b03
using parallel threads in the new generation.
using thread-local object allocation.
Mark Sweep Compact GC
Heap Configuration:
MinHeapFreeRatio = 40
MaxHeapFreeRatio = 70
MaxHeapSize = 2147483648 (2048.0MB)
NewSize = 2686976 (2.5625MB)
MaxNewSize = -65536 (-0.0625MB)
OldSize = 1835008 (1.75MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 134217728 (128.0MB)
Heap Usage:
New Generation (Eden + 1 Survivor Space):
capacity = 644218880 (614.375MB)
used = 581578344 (554.6363296508789MB)
free = 62640536 (59.738670349121094MB)
90.27651347318476% used
Eden Space:
capacity = 572653568 (546.125MB)
used = 572344744 (545.8304824829102MB)
free = 308824 (0.29451751708984375MB)
99.94607140909318% used
>From Space:
capacity = 71565312 (68.25MB)
used = 9233600 (8.80584716796875MB)
free = 62331712 (59.44415283203125MB)
12.902340172847985% used
To Space:
capacity = 71565312 (68.25MB)
used = 0 (0.0MB)
free = 71565312 (68.25MB)
0.0% used
tenured generation:
capacity = 1431699456 (1365.375MB)
used = 254001848 (242.23503875732422MB)
free = 1177697608 (1123.1399612426758MB)
17.741282706752667% used
Perm Generation:
capacity = 80216064 (76.5MB)
used = 80136544 (76.42416381835938MB)
free = 79520 (0.075836181640625MB)
99.90086773641748% used
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024987#4024987
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024987
19Â years, 1Â month