[EJB 3.0] - Re: removalTimeoutInSeconds & subsequent removal?
by Protuhj
So I think I have a solution that works, but it seems like a hack. I have to set my idle timeout to less than the removal timeout, which is not what I wanted to do. I wanted it to just remove my bean as soon as it hit became idle.
But since when you hit removalTimeoutSeconds it doesn't actually do any cleanup of the memory (it just removes the data from the disk cache), setting the idleTimeout higher than the removalTimeout per the wiki doesn't work.
Something definitely seems broken with the way this is implemented in JBOSS AS 4.2.3, I don't know if it is any different in 5.0, I assume not.
This is the way I want it to work:
Client gets bean
bean connects the socket
client crashes (in our setup, this may happen, you never know)
bean times out (removalTimeoutSeconds not idle)
some annotated function gets called (@Remove or @PreDestroy this doesnt happen right now)
my socket is closed properly since the function was called
the other end of the socket gets the closure notice
this is what happens:
client gets bean
bean connects the socket
client crashes
bean times out (removalTimeoutSeconds)
no function of mine gets called
<nothing until...> i redeploy the EJB and then the preDestroy on the bean gets called..
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217007#4217007
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217007
17 years, 1 month
[JBoss Portal] - Using Portal 2.7.1 + 4.2.3 AS Bundle on Windows XP - not s
by rezensor
Hello,
I'm evaluating JBoss Portal, or rather I would, if I could get it running.
Here is what I receive after running the run.bat script:
| 16:06:14,645 INFO [Server] Starting JBoss (MX MicroKernel)...
| 16:06:14,645 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVN
| JBoss_4_2_3_GA date=200807181417)
| 16:06:14,645 INFO [Server] Home Dir: C:\jboss-portal-2.7.1
| 16:06:14,645 INFO [Server] Home URL: file:/C:/jboss-portal-2.7.1/
| 16:06:14,645 INFO [Server] Patch URL: null
| 16:06:14,645 INFO [Server] Server Name: default
| 16:06:14,645 INFO [Server] Server Home Dir: C:\jboss-portal-2.7.1\server\de
| t
| 16:06:14,645 INFO [Server] Server Home URL: file:/C:/jboss-portal-2.7.1/ser
| default/
| 16:06:14,645 INFO [Server] Server Log Dir: C:\jboss-portal-2.7.1\server\def
| \log
| 16:06:14,645 INFO [Server] Server Temp Dir: C:\jboss-portal-2.7.1\server\de
| t\tmp
| 16:06:14,661 INFO [Server] Root Deployment Filename: jboss-service.xml
| 16:06:15,083 INFO [ServerInfo] Java version: 1.6.0_11,Sun Microsystems Inc.
| 16:06:15,083 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 11.0-b16
| Microsystems Inc.
| 16:06:15,083 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
| 16:06:15,754 INFO [Server] Core system initialized
| 16:06:16,317 ERROR [MainDeployer] Could not create deployment: file:/C:/jbos
| rtal-2.7.1/server/default/conf/jboss-service.xml
| org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jbo
| anagement.j2ee.LocalJBossServerDomain; - nested throwable: (java.lang.ClassN
| undException: No ClassLoaders found for: org.jboss.management.j2ee.LocalJBos
| verDomain)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.
| :196)
| at org.jboss.system.ServiceController.install(ServiceController.java
| )
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvo
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:6
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:251)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInter
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(Mo
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvo
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:6
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.
| s.management.j2ee.LocalJBossServerDomain
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(Reposito
| assLoader.java:521)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryCl
| oader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.j
| 1204)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.j
| 286)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.j
| 344)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfi
| tor.java:451)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.
| :171)
| ... 36 more
| Failed to boot JBoss:
| org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jbo
| anagement.j2ee.LocalJBossServerDomain; - nested throwable: (java.lang.ClassN
| undException: No ClassLoaders found for: org.jboss.management.j2ee.LocalJBos
| verDomain)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.
| :196)
| at org.jboss.system.ServiceController.install(ServiceController.java
| )
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvo
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:6
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:251)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp
| er.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInter
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(Mo
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvo
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:6
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.
| s.management.j2ee.LocalJBossServerDomain
| at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(Reposito
| assLoader.java:521)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryCl
| oader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.j
| 1204)
| at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.j
| 286)
| at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.j
| 344)
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfi
| tor.java:451)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.
| :171)
| ... 36 more
| 16:06:16,333 INFO [Server] Runtime shutdown hook called, forceHalt: true
| 16:06:16,333 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
| 16:06:16,333 INFO [Server] Shutdown complete
| Shutdown complete
| Halting VM
|
JBoss AS was already running fine and working properly here,
but before I tried to install Portal.
Following the manual, I changed to bundle version (I used Windows Installer first).
I really hope that someone could help me out here.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217003#4217003
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217003
17 years, 1 month
[JBoss Tools (users)] - Re: Hibernate Configurations problem
by asookazian
Here's the entire Equipment class:
package com.cox.bets.entity;
| // Generated Oct 31, 2008 8:53:40 AM by Hibernate Tools 3.2.0.CR1
|
| import java.util.Date;
| import java.util.HashSet;
| import java.util.Set;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Column;
| import javax.persistence.Entity;
| import javax.persistence.FetchType;
| import javax.persistence.GeneratedValue;
| import javax.persistence.GenerationType;
| import javax.persistence.Id;
| import javax.persistence.JoinColumn;
| import javax.persistence.ManyToOne;
| import javax.persistence.OneToMany;
| import javax.persistence.Table;
| import javax.persistence.Temporal;
| import javax.persistence.TemporalType;
| import javax.persistence.UniqueConstraint;
|
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
|
| /**
| * Equipment generated by hbm2java
| */
| @Entity
| @Table(name = "Equipment", uniqueConstraints = @UniqueConstraint(columnNames = "SerialNumber"))
| public class Equipment implements java.io.Serializable {
|
| private int equipmentId;
| private ApplicationUser applicationUserByUpdatedByUserId;
| private ApplicationUser applicationUserByAddedByUserId;
| private String serialNumber;
| private String macaddress;
| private Integer equipmentTypeListCode;
| private Date equipmentServiceDate;
| private Date addedDate;
| private Date updatedDate;
| private String modelNumber;
| private Set<EquipmentRepair> equipmentRepairs = new HashSet<EquipmentRepair>(
| 0);
|
| public Equipment() {
| }
|
| public Equipment(int equipmentId,
| ApplicationUser applicationUserByUpdatedByUserId,
| ApplicationUser applicationUserByAddedByUserId,
| String serialNumber,
| Date addedDate,
| Date updatedDate) {
| this.equipmentId = equipmentId;
| this.applicationUserByUpdatedByUserId = applicationUserByUpdatedByUserId;
| this.applicationUserByAddedByUserId = applicationUserByAddedByUserId;
| this.serialNumber = serialNumber;
| this.addedDate = addedDate;
| this.updatedDate = updatedDate;
| }
| public Equipment(int equipmentId,
| ApplicationUser applicationUserByUpdatedByUserId,
| ApplicationUser applicationUserByAddedByUserId,
| String serialNumber, String macaddress,
| Integer equipmentTypeListCode, Date equipmentServiceDate,
| Date addedDate, Date updatedDate,
| Set<EquipmentRepair> equipmentRepairs) {
| this.equipmentId = equipmentId;
| this.applicationUserByUpdatedByUserId = applicationUserByUpdatedByUserId;
| this.applicationUserByAddedByUserId = applicationUserByAddedByUserId;
| this.serialNumber = serialNumber;
| this.macaddress = macaddress;
| this.equipmentTypeListCode = equipmentTypeListCode;
| this.equipmentServiceDate = equipmentServiceDate;
| this.addedDate = addedDate;
| this.updatedDate = updatedDate;
| this.equipmentRepairs = equipmentRepairs;
| }
|
| @Id
| @GeneratedValue(strategy=GenerationType.IDENTITY)
| @Column(name = "EquipmentID", unique = true, nullable = false)
| @NotNull
| public int getEquipmentId() {
| return this.equipmentId;
| }
|
| public void setEquipmentId(int equipmentId) {
| this.equipmentId = equipmentId;
| }
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "UpdatedByUserID", nullable = false)
| @NotNull
| public ApplicationUser getApplicationUserByUpdatedByUserId() {
| return this.applicationUserByUpdatedByUserId;
| }
|
| public void setApplicationUserByUpdatedByUserId(
| ApplicationUser applicationUserByUpdatedByUserId) {
| this.applicationUserByUpdatedByUserId = applicationUserByUpdatedByUserId;
| }
| @ManyToOne(fetch = FetchType.LAZY)
| @JoinColumn(name = "AddedByUserID", nullable = false)
| @NotNull
| public ApplicationUser getApplicationUserByAddedByUserId() {
| return this.applicationUserByAddedByUserId;
| }
|
| public void setApplicationUserByAddedByUserId(
| ApplicationUser applicationUserByAddedByUserId) {
| this.applicationUserByAddedByUserId = applicationUserByAddedByUserId;
| }
|
| @Column(name = "SerialNumber", unique = true, nullable = false, length = 50)
| @NotNull
| @Length(max = 50)
| public String getSerialNumber() {
| return this.serialNumber;
| }
|
| public void setSerialNumber(String serialNumber) {
| this.serialNumber = serialNumber;
| }
|
| @Column(name = "ModelNumber", length = 50)
| @Length(max = 50)
| public String getModelNumber() {
| return this.modelNumber;
| }
|
| public void setModelNumber(String modelNumber) {
| this.modelNumber = modelNumber;
| }
|
| @Column(name = "MACAddress", length = 50)
| @Length(max = 50)
| public String getMacaddress() {
| return this.macaddress;
| }
|
| public void setMacaddress(String macaddress) {
| this.macaddress = macaddress;
| }
|
| @Column(name = "EquipmentTypeListCode")
| public Integer getEquipmentTypeListCode() {
| return this.equipmentTypeListCode;
| }
|
| public void setEquipmentTypeListCode(Integer equipmentTypeListCode) {
| this.equipmentTypeListCode = equipmentTypeListCode;
| }
| @Temporal(TemporalType.TIMESTAMP)
| @Column(name = "EquipmentServiceDate", length = 23)
| public Date getEquipmentServiceDate() {
| return this.equipmentServiceDate;
| }
|
| public void setEquipmentServiceDate(Date equipmentServiceDate) {
| this.equipmentServiceDate = equipmentServiceDate;
| }
| @Temporal(TemporalType.TIMESTAMP)
| @Column(name = "AddedDate", nullable = false, length = 23)
| @NotNull
| public Date getAddedDate() {
| return this.addedDate;
| }
|
| public void setAddedDate(Date addedDate) {
| this.addedDate = addedDate;
| }
| @Temporal(TemporalType.TIMESTAMP)
| @Column(name = "UpdatedDate", nullable = false, length = 23)
| @NotNull
| public Date getUpdatedDate() {
| return this.updatedDate;
| }
|
| public void setUpdatedDate(Date updatedDate) {
| this.updatedDate = updatedDate;
| }
| @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipment")
| public Set<EquipmentRepair> getEquipmentRepairs() {
| return this.equipmentRepairs;
| }
|
| public void setEquipmentRepairs(Set<EquipmentRepair> equipmentRepairs) {
| this.equipmentRepairs = equipmentRepairs;
| }
|
|
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216997#4216997
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216997
17 years, 1 month