[Datasource Configuration] - Hibernate Dialect for DefaultDS
by Frank Langelage
Frank Langelage [http://community.jboss.org/people/lafr] created the discussion
"Hibernate Dialect for DefaultDS"
To view the discussion, visit: http://community.jboss.org/message/562592#562592
--------------------------------------------------------------
Using JBoss-6.0.0-SNAPSHOT, how can I specify the hibernate dialect to use for the DefaultDS?
The default hsqldb-ds.xml was replaced by this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<xa-datasource>
<jndi-name>DefaultDS</jndi-name>
<track-connection-by-tx/>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
<xa-datasource-property name="IfxIFXHOST">sb2000</xa-datasource-property>
<xa-datasource-property name="PortNumber">9088</xa-datasource-property>
<xa-datasource-property name="DatabaseName">jboss6</xa-datasource-property>
<xa-datasource-property name="ServerName">sb2000_net</xa-datasource-property>
<xa-datasource-property name="User">xxx</xa-datasource-property>
<xa-datasource-property name="Password">xxx</xa-datasource-property>
<xa-datasource-property name="IfxLOBCACHE">-1</xa-datasource-property>
<user-name>xxx</user-name>
<password>xxx</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>InformixDB</type-mapping>
</metadata>
</xa-datasource>
</datasources>
Using a database config from an ear file, the ear comes with an persistence.xml file which specifies the hibernate dialect, as InformixDialect in this case.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562592#562592]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[Performance Tuning] - tuning of JVM
by Mario Almeida
Mario Almeida [http://community.jboss.org/people/mario.almeida] created the discussion
"tuning of JVM"
To view the discussion, visit: http://community.jboss.org/message/562576#562576
--------------------------------------------------------------
Hi All,
OS CentOS 5.5 64bit
I am using JBOSS 4.2.3
JAVA 1.6u21
JAVA_OPTS= -server -XX:MaxNewSize=170m -XX:NewSize=170m -Xmx512m -Xms512m -XX:MaxPermSize=256m -Xss256k -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:gc -Djava.net.preferIPv4Stack=true
As per 'GARBAGE COLLECTION STATISTICAL ANALYSIS 201' below is the output of -verbose:gc
| Before | After | Time |
| 67910 | 8160 | 0.01124 |
| 8160 | 7890 | 0.089276 |
| 138450 | 18307 | 0.01023 |
| 148867 | 31076 | 0.020333 |
| 84187 | 38918 | 0.020976 |
| 38918 | 38579 | 0.264469 |
| 169139 | 47306 | 0.010821 |
| 177866 | 55031 | 0.020886 |
| 185591 | 58003 | 0.017817 |
| 185363 | 61550 | 0.018758 |
| 172014 | 68685 | 0.024119 |
| 179149 | 74589 | 0.028192 |
| 178397 | 80153 | 0.022211 |
| 183961 | 82988 | 0.018935 |
| 189484 | 86900 | 0.013572 |
| 193396 | 88065 | 0.016476 |
| 191393 | 95872 | 0.009507 |
| 199296 | 100037 | 0.012184 |
| 205445 | 101781 | 0.007035 |
| 207189 | 102516 | 0.005844 |
| 209384 | 102951 | 0.003822 |
| 209831 | 104487 | 0.004506 |
| 212994 | 104022 | 0.004398 |
| 212630 | 104138 | 0.003814 |
| 216202 | 105215 | 0.004032 |
| 217279 | 105590 | 0.003863 |
| 222134 | 105791 | 0.005497 |
| 222335 | 106069 | 0.00365 |
| 227267 | 107093 | 0.003381 |
| 228373 | 107426 | 0.003942 |
| 233954 | 108218 | 0.004841 |
| 234746 | 108441 | 0.003837 |
| 239961 | 108776 | 0.003702 |
| 240296 | 109691 | 0.004393 |
| 245883 | 110735 | 0.005467 |
| 246927 | 113158 | 0.009279 |
| 254022 | 112053 | 0.007649 |
| 252917 | 112057 | 0.005108 |
| 257081 | 111999 | 0.004932 |
| 257023 | 113045 | 0.00562 |
| 261141 | 113898 | 0.005607 |
| 261994 | 114388 | 0.005883 |
| 265556 | 114417 | 0.004873 |
| 265585 | 115265 | 0.007753 |
| 268865 | 115827 | 0.007209 |
| 269427 | 116785 | 0.006272 |
| 272667 | 118328 | 0.006826 |
| 274232 | 118351 | 0.006551 |
| 276367 | 118402 | 0.005399 |
| 276418 | 120218 | 0.007433 |
| 279962 | 120963 | 0.009114 |
| 280707 | 119886 | 0.005476 |
| 280526 | 122200 | 0.008937 |
| 282840 | 124072 | 0.010552 |
| 284712 | 122330 | 0.006757 |
| 282970 | 123936 | 0.00912 |
| 285344 | 124890 | 0.009292 |
| 286298 | 124362 | 0.007613 |
| 286538 | 125830 | 0.009574 |
| 288006 | 126404 | 0.009543 |
| 289284 | 126641 | 0.009608 |
| 289521 | 128555 | 0.011272 |
| 291755 | 127926 | 0.009885 |
| 291126 | 129245 | 0.011053 |
| 292702 | 127820 | 0.008749 |
| 291404 | 128374 | 0.007936 |
| 291958 | 129143 | 0.007507 |
| 292727 | 129395 | 0.007756 |
| 293299 | 129869 | 0.007054 |
| 293773 | 130709 | 0.007014 |
| 294997 | 130884 | 0.007413 |
| 295172 | 131118 | 0.007388 |
| 295918 | 132533 | 0.007544 |
| 297333 | 132626 | 0.006971 |
| 297938 | 134040 | 0.008049 |
| 299352 | 134444 | 0.007505 |
| 300396 | 136355 | 0.010362 |
| 302307 | 136472 | 0.00994 |
| 302104 | 136633 | 0.008865 |
| 302227 | 137758 | 0.010389 |
| 303774 | 139274 | 0.010978 |
| 305290 | 139054 | 0.011067 |
| 304430 | 139612 | 0.011818 |
| 304988 | 140242 | 0.010733 |
| 305810 | 140619 | 0.010408 |
| 306187 | 141614 | 0.010614 |
| 307630 | 142919 | 0.012793 |
| 308935 | 144229 | 0.014377 |
| 308709 | 143014 | 0.011988 |
| 307494 | 144805 | 0.015654 |
| 309029 | 143489 | 0.011692 |
| 307713 | 143602 | 0.00943 |
| 307826 | 144560 | 0.009486 |
| 308784 | 145840 | 0.01116 |
| 310384 | 145356 | 0.009615 |
| 309900 | 146427 | 0.009441 |
| 311387 | 149017 | 0.011989 |
| 314009 | 147795 | 0.010213 |
| 312659 | 148303 | 0.009085 |
| 313167 | 150238 | 0.011596 |
| 315230 | 151294 | 0.014132 |
| 316286 | 150406 | 0.010096 |
| 315334 | 152324 | 0.012351 |
| 317252 | 152389 | 0.011761 |
| 317573 | 152533 | 0.012058 |
| 317717 | 152391 | 0.010228 |
| 318151 | 153109 | 0.010195 |
| 318869 | 153929 | 0.010222 |
| 319881 | 154847 | 0.010916 |
| 320799 | 156969 | 0.013489 |
| 322601 | 156607 | 0.013065 |
| 322239 | 158497 | 0.014829 |
| 323745 | 158842 | 0.014876 |
| 324090 | 158653 | 0.013889 |
| 323645 | 160475 | 0.016195 |
| 325467 | 162143 | 0.021307 |
| 324575 | 159037 | 0.014079 |
Even if I increase the heap size and adjust the NewSize to 1/3 I always get a rising graph.
In the article it says Heap usage has stabilize with both the heap usage before collection and after collection forming horizontal lines
In my situation do I still have to increase the heap size more?
http://community.jboss.org/servlet/JiveServlet/showImage/2-562576-8468/he... http://community.jboss.org/servlet/JiveServlet/downloadImage/2-562576-846...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562576#562576]
Start a new discussion in Performance Tuning at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[jBPM] - saving a new attribute value in database
by parvathy j a
parvathy j a [http://community.jboss.org/people/parvathy] created the discussion
"saving a new attribute value in database"
To view the discussion, visit: http://community.jboss.org/message/562566#562566
--------------------------------------------------------------
Hi i created a new element escalation which acts as transition itself.. i parsed it similar to trasition in JpdlParser.java...i also have a new attribute 'level' in it public void parseEscalation(Element element, ActivityImpl activity, Parse parse) { UnresolvedTransitions unresolvedTransitions = parse.contextStackFind(UnresolvedTransitions.class); // HistoryActivityInstanceImpl hist = new HistoryActivityInstanceImpl(); List transitionElements = XmlUtil.elements(element, "escalation"); for (Element transitionElement : transitionElements) { String transitionName = XmlUtil.attribute(transitionElement, "name"); String level = XmlUtil.attribute(transitionElement, "level"); Element timerElement = XmlUtil.element(transitionElement, "timer"); if (timerElement != null) { TimerDefinitionImpl timerDefinitionImpl = parseTimerDefinition(timerElement, parse, activity); timerDefinitionImpl.setSignalName(transitionName); } TransitionImpl transition = activity.createOutgoingTransition(); transition.setName(transitionName); System.out.println("level#######>>>>>"+level); transition.setLevel(level== null || level ==""?0:Integer.parseInt(level)); // hist.setEscalationLevel(transition.getLevel()); // HistoryEvent.fire(new ActivityEnd(transitionName,transition.getLevel()),execution); unresolvedTransitions.add(transition, transitionElement); parseOnEvent(transitionElement, parse, transition, Event.TAKE); } could anyone please guide me how to save the attribute 'levels' value in JBPM4_HIST_ACTINST which will come for all escalation and the escaation name will come in the TRANSITION_ field.. i have added a new field ESCALATION_LEVEL_ in the table ..
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562566#562566]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[EJB 3.0] - optional OneToOne relation
by Frank Langelage
Frank Langelage [http://community.jboss.org/people/lafr] created the discussion
"optional OneToOne relation"
To view the discussion, visit: http://community.jboss.org/message/562556#562556
--------------------------------------------------------------
I have a entity with an optional unidirectional one-to-one relationship.
@Entity
@IdClass( value = MbiMsgpa.PK.class )
@Table( name = "mbi_msgpa" )
public class MbiMsgpa implements Serializable, Comparable<MbiMsgpa>
...
/** Relation with MbiMsgpt. */
@OneToOne( cascade = { CascadeType.PERSIST, CascadeType.REMOVE }, fetch = FetchType.LAZY )
@Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN )
@NotFound( action = NotFoundAction.IGNORE )
@PrimaryKeyJoinColumns( {
@PrimaryKeyJoinColumn( name = "msghd_serial", referencedColumnName = "msghd_serial" ),
@PrimaryKeyJoinColumn( name = "part_no", referencedColumnName = "part_no" )
} )
private MbiMsgpt mbiMsgpt;
...
}
This worked using JBoss-4.2.4, but migrating to JBoss-6.0.0.
But using JBoss6 I get an exception like this:
2010-09-18 22:00:15,055 ERROR [biz.mbisoftware.common.XmlHelper] (Thread-2 (group:HornetQ-client-global-threads-21860387))
javax.persistence.EntityNotFoundException : Unable to find biz.mbisoftware.fn.ejb.entity.MbiMsgpt with id [MsghdSerial=7741;PartNo=1;]
java.lang.reflect.InvocationTargetException : null
biz.mbisoftware.common.exceptions.MbiException : java.lang.reflect.InvocationTargetException
biz.mbisoftware.fn.ejb.entity.MbiMsgpt_$$_javassist_155(-1).getAdditionalData
biz.mbisoftware.common.XmlHelper(291).methods2Xml
biz.mbisoftware.common.XmlHelper(370).bean2Xml
biz.mbisoftware.common.XmlHelper(301).methods2Xml
biz.mbisoftware.common.XmlHelper(370).bean2Xml
biz.mbisoftware.common.XmlHelper(123).collectionMethod2Xml
biz.mbisoftware.common.XmlHelper(286).methods2Xml
biz.mbisoftware.common.XmlHelper(368).bean2Xml
biz.mbisoftware.fn.ejb.session.MessageDistributorType(73).buildTheXmlDocument
biz.mbisoftware.fn.ejb.message.core.MessageDistributor(123).onMessage
biz.mbisoftware.common.ParameterInterceptor(108).parameters: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at biz.mbisoftware.common.XmlHelper.methods2Xml(XmlHelper.java:291) [:]
at biz.mbisoftware.common.XmlHelper.bean2Xml(XmlHelper.java:370) [:]
at biz.mbisoftware.common.XmlHelper.methods2Xml(XmlHelper.java:301) [:]
at biz.mbisoftware.common.XmlHelper.bean2Xml(XmlHelper.java:370) [:]
at biz.mbisoftware.common.XmlHelper.collectionMethod2Xml(XmlHelper.java:123) [:]
at biz.mbisoftware.common.XmlHelper.methods2Xml(XmlHelper.java:286) [:]
at biz.mbisoftware.common.XmlHelper.bean2Xml(XmlHelper.java:368) [:]
at biz.mbisoftware.fn.ejb.session.MessageDistributorType.buildTheXmlDocument(MessageDistributorType.java:73) [:]
at biz.mbisoftware.fn.ejb.message.core.MessageDistributor.onMessage(MessageDistributor.java:123) [:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.Alpha3]
at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.0.8]
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138) [:1.0.8]
at biz.mbisoftware.common.ParameterInterceptor.parameters(ParameterInterceptor.java:108) [:]
at sun.reflect.GeneratedMethodAccessor459.invoke(Unknown Source) [:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at org.jboss.ejb3.interceptors.aop.EJB3InterceptorInterceptor.invoke(EJB3InterceptorInterceptor.java:83) [:1.0.8]
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562556#562556]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months