[Installation, Configuration & Deployment] - Re: 4.0.5 GA bluescreens
by therockhopper
It (the webstart installer version) will run if:
I set JAVA_HOME to a 1.4.2 JDK. I have RAD6 and used the JDK bundled with it. (A regular JDK "should" work). It is under c:\program files so I used the 8.3 name PROGRA~1 in the variable. run.bat doesn't like quotes.
I prepended the path with %JAVA_HOME%\bin.
No matter what I did with a 1.5 JDK it will bluescreen with the installer version. The downloaded and exploded zip works ok with 1.5.
ListDLLs v2.25 - DLL lister for Win9x/NT
Copyright (C) 1997-2004 Mark Russinovich
Sysinternals - www.sysinternals.com
------------------------------------------------------------------------------
java.exe pid: 2980
Command line: "c:\progra~1\\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin\java" -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 "-Djava.endorsed.dirs=C:\jboss-4.0.5.GA\bin\\..\lib\endorsed" -classpath "c:\progra~1\\IBM\Rational\SDP\6.0\runtimes\base_v6\java\lib\tools.jar;C:\jboss-4.0.5.GA\bin\\run.jar" org.jboss.Main
Base Size Version Path
0x00400000 0x9000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin\java.exe
0x7c900000 0xb0000 5.01.2600.2180 C:\WINDOWS\system32\ntdll.dll
0x7c800000 0xf4000 5.01.2600.2945 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 0x9b000 5.01.2600.2180 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 0x91000 5.01.2600.2180 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 0x58000 7.00.2600.2180 C:\WINDOWS\system32\MSVCRT.dll
0x5a000000 0x1f000 3.06.0000.2079 C:\Program Files\Spyware Doctor\tools\swpg.dat
0x77d40000 0x90000 5.01.2600.2622 C:\WINDOWS\system32\user32.dll
0x77f10000 0x47000 5.01.2600.2818 C:\WINDOWS\system32\GDI32.dll
0x77120000 0x8c000 5.01.2600.2180 C:\WINDOWS\system32\oleaut32.dll
0x774e0000 0x13d000 5.01.2600.2726 C:\WINDOWS\system32\ole32.dll
0x76390000 0x1d000 5.01.2600.2180 C:\WINDOWS\system32\IMM32.DLL
0x76bf0000 0xb000 5.01.2600.2180 C:\WINDOWS\system32\PSAPI.DLL
0x10000000 0x17b000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\classic\jvm.dll
0x00290000 0x1a000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\ute.dll
0x003b0000 0x6000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\jsig.dll
0x003c0000 0x6000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\dbgmalloc.dll
0x003d0000 0x7000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\xhpi.dll
0x003e0000 0x10000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\hpi.dll
0x76b40000 0x2d000 5.01.2600.2180 C:\WINDOWS\system32\WINMM.dll
0x003f0000 0xa000 1.72.0000.0025 C:\WINDOWS\system32\myokent.dll
0x02800000 0xb3000 6.00.0007.0000 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\dbghelp.dll
0x77c00000 0x8000 5.01.2600.2180 C:\WINDOWS\system32\VERSION.dll
0x01df0000 0x1a000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\java.dll
0x01e10000 0x18000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\classic\core.dll
0x01e30000 0x12000 142.2004.0010.0028 c:\progra~1\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\zip.dll
0x021e0000 0x3a5000 142.2004.0010.0028 C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\jitc.dll
0x03e60000 0x1a000 142.2004.0010.0028 C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\net.dll
0x71ab0000 0x17000 5.01.2600.2180 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 0x8000 5.01.2600.2180 C:\WINDOWS\system32\WS2HELP.dll
0x71a50000 0x3f000 5.01.2600.2180 C:\WINDOWS\System32\mswsock.dll
0x76f20000 0x27000 5.01.2600.2938 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 0x8000 5.01.2600.2180 C:\WINDOWS\System32\winrnr.dll
0x76f60000 0x2c000 5.01.2600.2180 C:\WINDOWS\system32\WLDAP32.dll
0x76fc0000 0x6000 5.01.2600.2938 C:\WINDOWS\system32\rasadhlp.dll
0x049d0000 0xf000 10.67.0000.0000 C:\WINDOWS\system32\ZoneLabs\vetredir.dll
0x662b0000 0x58000 5.01.2600.2180 C:\WINDOWS\system32\hnetcfg.dll
0x04b10000 0x15000 10.67.0000.0000 C:\WINDOWS\system32\ZoneLabs\isafeif.dll
0x71a90000 0x8000 5.01.2600.2180 C:\WINDOWS\System32\wshtcpip.dll
0x76d60000 0x19000 5.01.2600.2912 C:\WINDOWS\system32\iphlpapi.dll
0x04e90000 0xc000 142.2004.0010.0028 C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin\nio.dll
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982656#3982656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982656
19Â years, 6Â months
[EJB/JBoss] - hotdeployment error (org.hibernate.cache.CacheException)
by timecop12
Hi all,
my ejb3-application is running at
JBoss AS 4.0.4 GA,
TreeCache 1.2.4.SP2 in LOCAL mode,
Hibernate Core CR5,
Hibernate EM CR3 und
Hibernate Annotation CR3.
Database: Postgres 8.1.4
I know there newer releases available, but I dont't think it's a bug.
Problem description:
- start JBoss AS and deploying my ear-file
- get some information stored in db (ejb3 entity) using the web interface
Here's everything fine.
Now, starting a hotdeployment of my ear file
and get the same entity like above. (exactly the same entity with the same primary key)
The server throws an org.hibernate.cache.CacheException. I think there is an invalidation problem,
but I didn't found a way to handle this.
I read nearly all jboss pdf-files and forum entries (maybe I oversight something). I appreciate for every kind of help / ideas.
greetings christian
| Stacktrace:
| 2006-11-02 13:47:07,406 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/aepWeb].[action]] Servlet.service() for servlet action threw exception
| javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.cache.CacheException: org.jboss.util.NestedRuntimeException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId; - nested throwable: (org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId)
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy103.getStockById(Unknown Source)
| at de.aep.inventory.ui.InventoryAction.stockEdit(InventoryAction.java:127)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.struts.actions.ActionDispatcher.dispatchMethod(ActionDispatcher.java:359)
| at org.apache.struts.actions.ActionDispatcher.dispatchMethod(ActionDispatcher.java:333)
| at org.apache.struts.actions.ActionDispatcher.execute(ActionDispatcher.java:220)
| at de.aep.inventory.ui.InventoryAction.execute(InventoryAction.java:47)
| at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)
| at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)
| at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
| at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
| at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
| at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.persistence.PersistenceException: org.hibernate.cache.CacheException: org.jboss.util.NestedRuntimeException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId; - nested throwable: (org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId)
| at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:647)
| at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:194)
| at org.jboss.ejb3.entity.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:164)
| at de.aep.inventory.db.InventoryDAO.getStockById(InventoryDAO.java:39)
| at de.aep.inventory.InventoryBean.getStockById(InventoryBean.java:58)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 55 more
| Caused by: org.hibernate.cache.CacheException: org.jboss.util.NestedRuntimeException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId; - nested throwable: (org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId)
| at org.hibernate.cache.TreeCache.read(TreeCache.java:57)
| at org.hibernate.cache.TransactionalCache.get(TransactionalCache.java:31)
| at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:472)
| at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:356)
| at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:137)
| at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:193)
| at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:101)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
| at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:174)
| ... 71 more
| Caused by: org.jboss.util.NestedRuntimeException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId; - nested throwable: (org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4177)
| at org.jboss.cache.TreeCache.get(TreeCache.java:2728)
| at org.jboss.cache.TreeCache.get(TreeCache.java:2711)
| at org.hibernate.cache.TreeCache.read(TreeCache.java:54)
| ... 81 more
| Caused by: org.hibernate.PropertyAccessException: could not get a field value by reflection getter of de.aep.inventory.db.StockPK.stockId
| at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:35)
| at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValue(AbstractComponentTuplizer.java:64)
| at org.hibernate.tuple.component.AbstractComponentTuplizer.getPropertyValues(AbstractComponentTuplizer.java:70)
| at org.hibernate.tuple.component.PojoComponentTuplizer.getPropertyValues(PojoComponentTuplizer.java:83)
| at org.hibernate.type.ComponentType.getPropertyValues(ComponentType.java:353)
| at org.hibernate.type.ComponentType.isEqual(ComponentType.java:123)
| at org.hibernate.cache.CacheKey.equals(CacheKey.java:51)
| at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.eq(ConcurrentReaderHashMap.java:309)
| at EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap.get(ConcurrentReaderHashMap.java:443)
| at org.jboss.cache.Node.getOrCreateChild(Node.java:271)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:214)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:168)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:41)
| at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:35)
| at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4172)
| ... 84 more
| Caused by: java.lang.IllegalArgumentException
| at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
| at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
| at java.lang.reflect.Field.get(Field.java:357)
| at org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:32)
| ... 98 more
|
|
| Entity Class:
|
|
| @Entity
| @Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL)
| @Table(name="stock")
| public class Stock implements Serializable {
| private static final long serialVersionUID = 5210755493607362380L;
|
| @Version
| private int version = 0;
|
| @EmbeddedId
| @AttributeOverrides(
| {
| @AttributeOverride ( name="stockid",
| column=@Column(name="stockid", unique=false, nullable=false,
| insertable=true, updatable=true, length=7)
| ),
| @AttributeOverride ( name="stockpos",
| column=@Column(name="stockpos", unique=false, nullable=false,
| insertable=true, updatable=true)
| )
| }
| )
| private StockPK pk = new StockPK();
|
| @Column(name="geometricbool", unique=false, nullable=false, insertable=true, updatable=true)
| private boolean geometricBool = false;
|
| @Column(name="contractid", unique=false, nullable=true, insertable=true, updatable=true)
| private long contractId = 0;;
|
| @Column(name="qty", unique=false, nullable=false, insertable=true, updatable=true, precision=9)
| private double qty = 0.0;
|
| @ManyToOne(cascade={}, fetch=FetchType.EAGER)
| @JoinColumn(name="unitid", unique=false, nullable=false, insertable=true, updatable=true)
| private StockUnit unitId;
|
| @ManyToOne(cascade={}, fetch=FetchType.EAGER)
| @JoinColumn(name="matid", unique=false, nullable=false, insertable=true, updatable=true)
| private Mat matId = new Mat();
|
| @ManyToOne(cascade={}, fetch=FetchType.EAGER)
| @JoinColumn(name="areaid", unique=false, nullable=false, insertable=true, updatable=true)
| private StockArea areaId = new StockArea();
|
| @Column(name="inventorylock", unique=false, nullable=false, insertable=true, updatable=true)
| private boolean inventoryLock = false;
|
| @ManyToOne(cascade={}, fetch=FetchType.LAZY)
| @JoinColumn(name="inventoryid", unique=false, nullable=true, insertable=true, updatable=true)
| private StockInventory inventoryId = new StockInventory();
|
| @OneToMany(cascade={}, fetch=FetchType.EAGER, mappedBy="stock")
| private List<StockGeometric> stockGeometric = new ArrayList<StockGeometric>();
|
| [...] getters and setters [...]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982655#3982655
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982655
19Â years, 6Â months
[JBossWS] - Re: implementing wsse:UserNameToken
by sappenin
anonymous wrote : 7. how should I capture or examine the SOAP header in order to
| look for wsse usernametoken element? Is there any log file or option to
| log the SOAP header?
In your log4j.xml file (JBOSS_HOME/server/[servername]/conf/log4j.xml), set the CONSOLE appender threshold to DEBUG (instead of the default INFO). When you run your webservice, the in/out messages (including headers) will be displayed. You can do the same for other appenders if you want to capture logging info in other places.
|
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
| <param name="Threshold" value="INFO"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
| </layout>
| </appender>
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982651#3982651
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982651
19Â years, 6Â months
[JBossCache] - JBossCache with Hibernate
by ravi.nagubandi
Hi,
I am trying to integrate JBossCache with Hibernate. I am using Hibernate3.0 . I had placed the treecache.xml in my classpath and also provided entries in Hibernate configuration file related to JBossCache.
My requirement is like when i call my DAO method first time it should hit the database and for the subsequent calls it has to fetch from the cache.
Currently whenever i invoke my DAO method, hit on database is occuring. How can i avoid the database hits for subsequent calls.
I am providing the code of my Configuration file and treecache.xml.
Please provide me help in resolving this issue.
Thanks in advance.
| Hibernate Configuration 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">oracle.jdbc.driver.OracleDriver</property>
| <property name="hibernate.connection.url">jdbc:oracle:thin:@10.150.126.82:1521:endvu</property>
| <property name="hibernate.connection.username">app_developer</property>
| <property name="hibernate.connection.password">app_developer</property>
| <!-- <property name="hibernate.connection.datasource">jdbc/acsdatabase</property> -->
|
| <property name="show_sql">true</property>
| <property name="hibernate.jdbc.use_streams_for_binary">true</property>
| <property name="dialect">org.hibernate.dialect.OracleDialect</property>
| <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
| <property name="hibernate.use_outer_join">true</property>
| <property name="hibernate.bytecode.use_reflection_optimizer">true</property>
| <property name="hibernate.generate_statistics">true</property>
| <property name="hibernate.cache.use_second_level_cache">true</property>
| <property name="hibernate.cache.provider_class">org.hibernate.cache.TreeCacheProvider</property>
| <property name="hibernate.treecache.mbean.object_name">jboss.cache:service=TreeCache</property>
| <property name="hibernate.current_session_context_class">thread</property>
| <property name="TransactionManagerLookupClass">net.sf.hibernate.transaction.JBossTransactionManagerLookup</property>
|
| </session-factory>
| </hibernate-configuration>
|
|
|
|
| [/url]
|
| Treecache.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
| <attribute name="TransactionManagerLookupClass">
| JBossCache.src.com.example.SapWasTransactionManagerLookup
| </attribute>
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
| <attribute name="CacheMode">REPL_SYNC</attribute>
| <attribute name="UseReplQueue">false</attribute>
| <attribute name="ReplQueueInterval">0</attribute>
| <attribute name="ReplQueueMaxElements">0</attribute>
| <attribute name="ClusterName">SAP Web AS - Cluster</attribute>
| <attribute name="ClusterConfig">
| <config>
| <UDP mcast_addr="230.8.8.8" mcast_port="56677" ip_ttl="32" ip_mcast="true" mcast_send_buf_size="80000" mcast_recv_buf_size="150000" ucast_send_buf_size="80000" ucast_recv_buf_size="150000" loopback="true"/>
| <PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <FD shun="true" up_thread="true" down_thread="true"/>
| <VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" max_xmit_size="8192" up_thread="false" down_thread="false"/>
| <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false"/>
| <pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false"/>
| <FRAG frag_size="8192" down_thread="false" up_thread="false"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true"/>
| <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
| </config>
| </attribute>
| <attribute name="InitialStateRetrievalTimeout">10000</attribute>
| <attribute name="SyncReplTimeout">10000</attribute>
| <attribute name="LockAcquisitionTimeout">15000</attribute>
| <attribute name="EvictionPolicyClass"/>
| <attribute name="FetchStateOnStartup">true</attribute>
| </mbean>
|
| </server>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982650#3982650
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982650
19Â years, 6Â months
[Management, JMX/JBoss] - Re: auto redeploy dynamic mbean on JBoss restart
by cnsxxx09
Thanks for the info, this "experimental feature" sounds interesting ...
So, I need to do the following:
1. deploy the Deployment Service file found here:
$JBOSS_HOME/docs/examples/varia/deployment-service/deployment-service.sar
(keeping the default settings)
2a. create a template file(s) for my MBean in:
$JBOSS_HOME/server/default/conf/templates/mymbean/
(using the jms-queue as an example)
2b. add my persitence descriptor(s) to the velocity template
3. change my existing code (see other topic) to dynamically create XMBeans using this Deployment Service
(instead of registering them diretly in the server).
Then, when I dynamically create my XMBeans, JBoss will physically generate my mbean archive with XML config and drop it into the $JBOSS_HOME/server/default/deploy/ directory - thus guaranteeing that it is redeployed upon a server restart.
And then when JBoss restarts, because my beans are XMBeans specifying a persistence manager, then they will be redeployed and the attributes automatically loaded from the xml-attr/ store.
If it works as I think it does (see above) then this sounds ideal ... as long as multiple instances of the same XMbean can exist with separate persisted attributes then problem solved!
Thanks
Chris
-=-=
PS - when I stop/destroy my MBean (using the JMX-Console) I need to also make sure that they are physically destroyed, and not redeployed ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3982649#3982649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3982649
19Â years, 6Â months