[jboss-user] [EJB 3.0] - Re: Variable argument list in session bean method causes NoS

2009-06-02 Thread ablevine1
I will try to get you a simplified example as soon as I can.  How does your 
testcase work?  We can get this to work when we call the session bean from a 
remote client, however when we call it from within our jboss server process, 
using either the local or remote session bean interface, we get the exception 
mentioned in the previous post.  I would also like to note that we do not use 
dependency injection but rather use JNDI lookups to get references to our 
session beans in both cases.

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234778
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Variable argument list in session bean method causes NoSuchM

2009-06-01 Thread ablevine1
I am in the process of upgrading from jboss 4.0.5 to jboss 5.1.0 and am getting 
NoSuchMethodErrors when accessing my session beans that have methods containing 
variable argument lists (...).  Is this a know issue for jboss?  I see 
something similar about weblogic.  For example I have this method in my 
interface:


  | public interface ProductManagerSessionRemote
  | {
  | public  T 
loadPersonsOldestPurchasableProductOfType(
  | T extends PurchasableProduct> T 
loadPersonsOldestPurchasableProductOfType(
  | String personID, Class purchasableProductClass, Status... 
statuses);
  | }
  | 


I notice that it appears as this in the server log when jboss is parsing it. 
Why is it transient?:

  | public transient com.squaretrade.product2.PurchasableProduct 
com.squaretrade.product2.ProductManagerSessionImpl.loadPersonsOldestPurchasableProductOfType(java.lang.String,java.lang.Class,com.s
  | quaretrade.enums.Status[])
  | 

When I try and access a different method on the session bean I get the 
following error:

  | java.lang.NoSuchMethodError: 
com.squaretrade.product2.ProductManagerSessionRemote.loadPersonsOldestPurchasableProductOfType(java.lang.String,
 java.lang.Class, [Lcom.squaretrade.enums.Status;)
  | at $Proxy817.(Unknown Source)
  | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
Method)
  | at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  | at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
  | at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:588)
  | at 
org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:351)
  | at 
org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134)
  | at 
org.jboss.ejb3.proxy.clustered.objectfactory.session.SessionClusteredProxyObjectFactory.getProxy(SessionClusteredProxyObjectFactory.java:87)
  | at 
org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158)
  | at 
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
  | at 
org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479)
  | at 
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496)
  | at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822)
  | at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
  | at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | at com.squaretrade.locator.Locator.getSession(Locator.java:193)
  | at 
com.squaretrade.product2.ProductManager.getManagerSession(ProductManager.java:1011)
  | at 
com.squaretrade.product2.ProductManager.personHasPurchasableProductsOfType(ProductManager.java:431)
  | at 
com.squaretrade.data.replication.DataReplicationQualifier.replicatePersonData(DataReplicationQualifier.java:100)
  | at 
com.squaretrade.data.replication.AsynchDataReplicationProcessor.processPerson(AsynchDataReplicationProcessor.java:127)
  | at 
com.squaretrade.admin.actions.CascadingDataRefresh.execute(CascadingDataRefresh.java:69)
  | at 
com.squaretrade.struts.jboss.JBossAbstractAction.execute(JBossAbstractAction.java:71)
  | at 
com.squaretrade.struts.AbstractActionBase.execute(AbstractActionBase.java:211)
  | at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
  | at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
  | at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
  | at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  | at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invok

[jboss-user] [Clustering/JBoss] - Re: Invocation of startSingleton()

2009-05-20 Thread ablevine1
After further investigation it looks like the HAPartition is never being set.  
If I override the method in setHAPartiton in 
org.jboss.ha.jmx.AbstractHAServiceMBeanSupport like so:


  | public void setHAPartition(HAPartition partition)
  | {
  | log.info("GOT PARTITION: " + partition);
  | super.setHAPartition(partition);
  | }
  | 

I never see my "GOT PARTITION" statement appear in the log.  
Since the partition is not being set 
org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.startService fails because it 
throws an exception if the HAPArtition has not been set.  
Is there something I can add to my config to make sure that the HAPartition is 
set?  

Here is my config:

  | 
  | 
  | 
  | 
  | 
  | 
  |  
  |  
  |  
  |  squaretrade:service=Semaphore
  |  
  |  startSingleton
  |  stopSingleton
  |  
  | 
  | 
  | 
I tried adding

  |  HAPartition
  | 
to the controller but that did not seem to make any difference

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232335
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Invocation of startSingleton()

2009-05-19 Thread ablevine1
I am using 5.01 and I can get a singleton MBean to deploy using the 
-service.xml configuration you describe above.  
I need to be able to store state in my MBean so I changed my MBean class to 
extend from org.jboss.ha.singleton.HASingletonSupport, but then I get the 
following error when deploying

  | 2009-05-19 18:25:52,611 ERROR 
[org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error 
installing to Real: 
name=vfszip:/usr/local/jboss-5.0.1.GA/server/batch/deploy/batch.sar/ 
state=PreReal mode=Manual requiredState=
  | Real
  | org.jboss.deployers.spi.DeploymentException: Error deploying: 
squaretrade:service=Semaphore
  |at 
org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
  |at 
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
  |at 
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
  |at 
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
  |at 
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
  |at 
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
  |at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
  |at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
  |at 
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
  |at 
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
  |at 
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
  |at 
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
  |at 
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
  |at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
  |at 
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
  |at 
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
  |at 
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
  |at 
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
  |at 
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
  |at 
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
  |at 
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
  |at 
org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
  |at org.jboss.Main.boot(Main.java:209)
  |at org.jboss.Main$1.run(Main.java:547)
  |at java.lang.Thread.run(Thread.java:619)
  | Caused by: java.lang.IllegalStateException: HAPartition property must be 
set before starting HAServiceMBeanSupport
  |at 
org.jboss.ha.jmx.AbstractHAServiceMBeanSupport.startService(AbstractHAServiceMBeanSupport.java:175)
  |at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
  |at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
  |at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
  |at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |at java.lang.reflect.Method.invoke(Method.java:597)
  |at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
  |at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
  |at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  |at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  |at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
  |at 
org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:189)
  |at $Proxy36.start(Unknown Source)
  |at 
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
  |at 
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
  |at 
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
  |at 
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
  |at 
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContex

[jboss-user] [Clustering/JBoss] - Two master nodes in the same cluster

2009-01-14 Thread ablevine1
I am currently using jboss 4.0.5 with the jgroups version that ships with it 
2.2.7 SP1 using the TCP communication for clustering. I have three nodes in my 
cluster and every once in a while two nodes become master and stay master until 
I restart one of them.  The ips of the three nodes are 192.168.1.101, 
192.168.1.102, 192.168.1.103. For each node I use its IP address as the TCP 
bind_addr and use the IPs of each of the other hosts as the TCPPING 
initial_hosts

Below is my clustering config for the first node. 













 

It will run fine for several days but then eventually two node become master 
and stay that way.  The Barrier service and all of my other single ton MBeans 
run on both of them causing a lot of issues. Any help on why this is happening 
and how I can fix it without having to upgrade my whole jboss distribution 
would be greatly appreciated.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201899
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Entity caching annotation question

2008-10-21 Thread ablevine1
I have an entity hierarchy that uses single table inheritance. I want to cache 
all entites in that hierarchy.  Do I need to put the cache annotation on every 
child entity class or just the base entity class??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183622
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Possible Bug related top DiscriminatorFormula

2008-09-19 Thread ablevine1
Here it is:

  | DEBUG [SocketServerInvokerThread-172.16.200.111-0][2008-09-18 
10:40:50,914][com.squaretrade.category.CategoryManagerSessionImpl] 
CategoryManagerSessionImpl.java(114): CAUGHT EXCEPTION WHEN LOOKING UP CATEGORY
  | javax.persistence.PersistenceException: org.hibernate.WrongClassException: 
Object with id: EBAY_1314_61 was not of the specified subclass: 
com.squaretrade.category.Category (Discriminator: VENDOR  )
  | at 
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:647)
  | at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:99)
  | at 
com.squaretrade.category.CategoryManagerSessionImpl.loadCategory(CategoryManagerSessionImpl.java:101)
  | at 
com.squaretrade.category.CategoryManagerSessionImpl.loadCategory(CategoryManagerSessionImpl.java:129)
  | at 
com.squaretrade.category.CategoryManagerSessionImpl.loadObject(CategoryManagerSessionImpl.java:50)
  | 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:597)
  | 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:46)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  | at 
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
  | 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.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:51)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
  | at 
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
  | 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:263)
  | at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
  | at 
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
  | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
  | at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
  | at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:398)
  | at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
  | Caused by: org.hibernate.WrongClassException: Object with id: EBAY_1314_61 
was not of the specified subclass: com.squaretrade.category.Category 
(Discriminator: VENDOR  )
  | at org.hibernate.loader.Loader.getInstanceClass(Loader.java:1444)
  | at 
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1275)
  | at org.hibernate.loader.Loader.getRow(Loader.java:1197)
  | at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:568)
  |   

[jboss-user] [EJB 3.0] - Possible Bug related top DiscriminatorFormula

2008-09-18 Thread ablevine1
I am using jboss app server 4.0.5 with the version of EJB3 that it ships with(I 
am currently unable to upgrade due to project scheduling issues). When I use 
SingleTableInheritance and  a DiscriminatorFormula with string 
DiscriminatorValue's that are not the same length and have more that one when 
clause in my DiscriminatorFormula  then hibernate appears to pad the the 
shorter DiscriminatorValues with spaces until they are the length of the 
longest DiscriminatorValue.  They then get WrongClassExceptions when hibernate 
tries to resolve them to objects of the base class.

If I change the DiscriminatorValues to be all the same length then it works 
fine.  

Here is an example of what does not work:

  | @DiscriminatorFormula("case when DEFININGORG in ('VAC', 'AMTS') then 
'PROVIDER' when DEFININGORG='ST' then 'ST' else 'VENDOR' end")
  | class Category
  | {...}
  | 
  | @DiscriminatorValue("PROVIDER")
  | class ProviderCategory extends Category
  | {...}
  | 
  | 
  | @DiscriminatorValue("VENDOR")
  | class VendorCategory extends Category
  | {...}
  | 
  | 
  | @DiscriminatorValue("ST")
  | class STCategory extends Category
  | {...}
  | 
It can only load ProviderCategory as a Category but get a WrongClassException 
when loading any of the other ones. When I view the generated SQL in the logs, 
I notice that ST and VENDOR are padded with spaces until they are the length of 
PROVIDER

However this works for all of them:

  | @DiscriminatorFormula("case when DEFININGORG='ST' then 'S' when DEFININGORG 
in ('VAC', 'AMTS') then 'P' else 'V' end")
  | class Category
  | {...}
  | 
  | @DiscriminatorValue("P")
  | class ProviderCategory extends Category
  | {...}
  | 
  | 
  | @DiscriminatorValue("V")
  | class VendorCategory extends Category
  | {...}
  | 
  | 
  | @DiscriminatorValue("S")
  | class STCategory extends Category
  | {...}
  | 

Has this been fixed?? I tried to search in the JIRA for DiscriminatorFormula 
but for some reason my search did not come up with any results

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177515
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: serialVersionUID mismatch using remote client and jboss-

2008-04-26 Thread ablevine1
use all the jars in the client directory of your jboss installation

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147019
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - EntityManager.lock and database connections

2007-09-04 Thread ablevine1
When you use EntityManager.lock, does it hold on to the same database 
connection the whole time, not allowing other threads to use that connection??  
 I seem to be running out of connections in my connection pool, as I am getting 
the following exception:

  | INFO  [WorkManager(4)-53846][2007-09-03 
04:23:33,657][org.hibernate.event.def.DefaultLoadEventListener] 
Log4JLogger.java(99): Error performing load command
  | org.hibernate.exception.GenericJDBCException: Cannot open connection
  | at 
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  | at 
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  | at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  | at 
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
  | at 
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
  | at 
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
  | at 
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
  | at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1560)
  | at org.hibernate.loader.Loader.doQuery(Loader.java:661)
  | at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
  | at org.hibernate.loader.Loader.loadEntity(Loader.java:1784)
  | at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
  | at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
  | at 
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2977)
  | at 
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:393)
  | at 
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:374)
  | 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)
  | at 
org.jboss.ejb3.entity.TransactionScopedEntityManager.find(TransactionScopedEntityManager.java:164)
  | at 
com.squaretrade.stateful.AbstractStateEngineImpl.loadObject(AbstractStateEngineImpl.java:118)
  | at 
com.squaretrade.stateful.AbstractStateEngineImpl.process(AbstractStateEngineImpl.java:31)
  | at sun.reflect.GeneratedMethodAccessor1671.invoke(Unknown Source)
  | 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:46)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
  | at 
org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
  | 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:77)
  | at 
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce

[jboss-user] [Clustering/JBoss] - Re: session persistence and cluster cache (4.0.3 SP1)

2007-06-07 Thread ablevine1
Brian. Thanks for your quick responses.  Any time estimate for when JBoss 5 
should be out??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052263
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: session persistence and cluster cache (4.0.3 SP1)

2007-06-07 Thread ablevine1
That is rather unfortunate as it poses a bit of  problem for my company in 
that, when we upgrade our production ear, our sessions are lost.  Is there 
another way around this issue?? Currently we distribute the war to our 3 app 
servers in a staggered fashion, allowing for about 2 minutes in between the 
dist to each server in order to allow for the app to restart, but we still 
occasionally lose sessions.  Would using farming instead of our own 
distribution technique take care of this problem??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052245
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: session persistence and cluster cache (4.0.3 SP1)

2007-06-06 Thread ablevine1
does this mean that in newer versions of jboss (4.0.5 and 4.2.0),  that if I 
have a clustered web app and set the following in context.xml

  |  
  | 
that when I stop jboss the sessions will not be serialized to the SESSIONS.ser 
file and deserialized upon the next startup???  If this does not currently 
work, are the plans to implement this functionality in the future??  Its rather 
important because while my webapp is clustered across servers, whenever I 
update it, all of the current sessions are lost.  Is ther perhaps another 
solution to this problem??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051952
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub

2007-04-19 Thread ablevine1
"[EMAIL PROTECTED]" wrote : Sorry, I saw the 1st post in this thread and 
replied; didn't see the rest of the thread.  I'll assume your beans are marked 
clustered, either via annotation or in the xml.
  | 
  | RetryInterceptor is not yet available in EJB3.  Don't think it would solve 
your problem though.  I'd need to know more details about your exact error (how 
does it fail on reconnect -- full stack trace please) to say much more.

Has this retry interceptor or some simlar concept become available for use with 
the jboss ejb3 implementation yet??  Currently, failover works fine in my 
client if at least one node in the server cluster is still running, however, 
when all the nodes in the cluster go down and then come up, the client now has 
a bad session stub reference and will throw exceptions.  I then have to 
surround every call on the stub with error handling code that will clear my 
server connections and start with fresh ones.  It would be nice to have the 
retry interceptor so that this excess code can be eliminated.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039086
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Reverse entity Mapping on a @SecondaryTable

2007-04-19 Thread ablevine1
Thanks for the resonse.  That's what I'm doing now but I'd like to avoid having 
to write delgator methods to access properties from the secondary object from 
the primary object in order to make it appear as one object

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038982
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Reverse entity Mapping on a @SecondaryTable

2007-04-18 Thread ablevine1
Is there any way to have a multi-table mapped object where primary table has a 
foreign key column to the secondary table??  The reason I want to do this is 
because I am dealing with legacy tables and need to have the main primary key 
of the object reference the primary key of the primary table, but the primary 
table has a foregin key reference to the secondary table but not vice-versa. Is 
this possible??  It seems the the @SecondaryTable annotation only supports the 
secondary table having a foregn key to the primary table

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038601
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - How to get Query time??

2007-02-07 Thread ablevine1
I'm trying to write some code to evaluate query performance in my ejb3 code. I 
was wondering if there was some way to get the actual time that it takes jboss 
to load/store /update stuff in the database.  Doint this following will NOT 
work:

  | long t1 = System.currentTimeMillis();
  | em.merge(myEJB);
  | long updateTime = System.currentTimeMillis() - t1;
  | 

This does not work because if this is happening in a transaction the actually 
storing of the stuff is not done until the end of the transaction, so measuring 
the time it takes em.merge to complete is not a valid estimate of the actual 
update time.

Is there any way to tap into some low level jboss API or use interceptors to 
get a more accurate measure of the database update time??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012717
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to get EnitityManager in SLSB without injection??

2006-12-12 Thread ablevine1
Thanks for the response. If I put the entityManager in JNDI, the way you 
describe, can I just load it from JNDI and then call joinTransaction() on it to 
make it join the current session transaction, or do I need to load the 
EntityManagerFactory first and then create the EntityManger from it to make it 
join the transaction??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993169
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to get EnitityManager in SLSB without injection??

2006-12-11 Thread ablevine1
anyone??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992895
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: How to get EnitityManager in SLSB without injection??

2006-12-08 Thread ablevine1
just to clarify because I made a typo:
MyPersistenceUnitName, PurchaseNotification, and MyPeristenceContext should all 
be the same string

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992360
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - How to get EnitityManager in SLSB without injection??

2006-12-08 Thread ablevine1
Does anyone know how to get an EntityManager refernce from withing a statelesss 
session bean without using injection?? I have tried the following but with no 
success:



  | EntityManagerFactory emf = getEntityManagerFactory("MyPersistenceUnitName");
  | EntityManager em = emf.createEntityManager();
  | 

but this just fails with the following exception:

  | javax.persistence.PersistenceException: No Persistence provider for 
EntityManager named PurchaseNotification
  | at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:41)
  | at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:27)
  | at 
com.squaretrade.queueing.QueueingEngine.execute(QueueingEngine.java:36)
  | at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
  | 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.invokeInCallerTx(TxPolicy.java:126)
  | ... 40 more
  | 

When I use injection it works

  | @PersistenceContext(unitName = "MyPersistenceContext")
  | EntityManager em;
  | 

But I need be able to get refernces to EntityManagers for various different 
perstence units on the fly from within my session bean so injection is not an 
option.  any suggestions would be appreciated

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992358
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: Quartz Bean deployment

2006-12-05 Thread ablevine1
I am having the same problem as konstantin and I am using jboss ejb rc7 on 
jboss 4.0.4 GA.  I can get it to work if I specify the activation properties in 
ejb-jar-xml but not via the annotated verison.  I was wondering if anyone got 
this to work on the version o jboss I am using or if it does not work until a 
later version??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991505
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-12-05 Thread ablevine1
apparently not unless you are using EJB3 RC9 or higher

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991502
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: clustering

2006-11-09 Thread ablevine1
check out this thread:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973584

It may have some of the info you are looking for. Also supposedly, in an 
upcoming EJB3 release the value of the partition will default to 
jboss.partition.name so that you can have the same ejb clustered in multiple 
partitions.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984632
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: EntityManager.lock() issues

2006-10-25 Thread ablevine1
anonymous wrote : 
  | The approach I was trying to use: 
  | 
  | AEntity a = manager.find(AEntity.class, aId); 
  | manager.lock(a, LockModeType.READ); 
  | 
  | I think now it's not the way to go, because it's not atomic: Different 
competing threads could adquire an entity representing that database row before 
one of then reaches the lock. 
  | 

I had a simlar problem and came up with this solution: Since multiple threads 
can get then entity before locking it, once you get the lock, refresh the 
entitiy, then you will have the latest copy and you can then update it without 
overwriting previous updates:

  | AEntity a = manager.find(AEntity.class, aId); 
  | manager.lock(a, LockModeType.READ); 
  | manager.refresh(a);
  | // now do stuff
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980871
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Security & JAAS/JBoss] - Getting Subject in EJB3 Session Bean

2006-09-27 Thread ablevine1
I am trying to access the subject in an ejb3 session bean so that one of the 
Subject's Principal's can be used for some auditing information. 

My subjects have several different principals including emailAddress and 
subjectID.  When I make a call to SecurityAssociation.getSubject from within a 
session bean method it returns null .  How ever, when I make the same call from 
an interceptor on the session method, the call returns the subject fine.  Why 
then can I not access the subject from within the session bean method itself??

I have also tried using:
Subject subject = (Subject) 
PolicyContext.getContext("javax.security.auth.Subject.container");
  | 

but that also returns null.

I also tried calling SecurityAssociation.getPrincipal and from within the 
session bean method and it works but returns the emailAddress Principal, while 
the subjectID Principal is the one that I need.  Possibly, just getting this 
call to return the subjectID Principal instead of the emailAddress Principal  
would also be a viable solution to my problem.

Any suggestions would be appreciated.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974728
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub

2006-09-25 Thread ablevine1
Since I have the same ejb's in two different clusters, I am using the jboss.xml 
approach with 
true 
for each of my sesion beans.
see: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=91189

The jboss failover code does not seem to be working though, and I get the 
following exception stack trace when I shutdown one of the servers in the 
cluster that the client had been making calls to:

  | java.lang.reflect.UndeclaredThrowableException
  | at $Proxy1.loadObject(Unknown Source)
  | at 
com.squaretrade.managed.AbstractManager.loadObject(AbstractManager.java:37)
  | at 
com.squaretrade.person.PersonManager.loadPerson(PersonManager.java:52)
  | at 
com.squaretrade.person.RecurringPersonLoader.main(RecurringPersonLoader.java:44)
  | Caused by: org.jboss.aop.NotFoundInDispatcherException: Object with oid: 
jboss.j2ee:ear=batch.ear,jar=beans-batch.jar,name=PersonManagerSessionImpl,service=EJB3
 was not found in the Dispatcher
  | at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:85)
  | at 
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
  | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
  | at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
  | at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
  | at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
  | at 
org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
  | at org.jboss.remoting.Client.invoke(Client.java:525)
  | at org.jboss.remoting.Client.invoke(Client.java:488)
  | at 
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
  | at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at 
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
  | ... 4 more
  | 

note that loadObject is the session bean call. and that is where it is failing. 
As soon as I create a new InitialContext using port 1100 and then lookup the 
session bean again, the call goes through. Although, I thought that the stub 
was supposed to do this for me.


here is the entry in jboss.xml for one of my sesion beans:


  | 
  | PersonManagerSessionImpl
  | true
  | 
  | ${jboss.partition.name}
  |  
org.jboss.ha.framework.interfaces.FirstAvailable
  | 
  | 
  | 

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973991
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub

2006-09-22 Thread ablevine1
After looking more closely at the retry interceptor wiki page, I see that it is 
geared towards an older ejb, specifically the jboss.xml. Anyone know what this 
file would look like for an EJB3.0 Session bean??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973664
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-22 Thread ablevine1
I meant to say that when one of the servers in the partition is brought down I 
get a CannotConnectException from the client, so it seems as if the automatic 
failover in the client stub is not working. could changing the load balancing 
policy fix this??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973627
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-22 Thread ablevine1
I figured out the correct way to do this file after quite a bit of trial and 
error:

  | 
  | 
  | 
  | 
  | ProductManagerSessionImpl
  | true
  | 
  | 
  | ${jboss.partition.name}
  | 
org.jboss.ha.framework.interfaces.FirstAvailable
  | 
  | 
  | 
  | 
  | 

However now when one of the servers in the partition I get a 
CannotConnectException until I create a new context and do a new lookup.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973625
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub

2006-09-22 Thread ablevine1
Thanks Marc. I've notice that the error I mentioned happens sometime only when 
one server is brought down, putting the client in a bad state where the cached 
stub continuously fails to reconnect properly. The only way to get the client 
program to work again when in that state, is to reconnect with a new initial 
context and lookup. I've put code in to do that, but was hoping that there was 
a better way.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973606
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-21 Thread ablevine1
additionally, I would like to add that I am using JBoss-4.0.4GA with the EJB3.0 
release that came bundled with it

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973454
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-21 Thread ablevine1
REPOSTED DUE TO JUMBLED XML

So, I,ve found that this is supposed to be able to be done by using jboss.xml 
files in the META-INF directory of your ejb jar file, but I can;t seem to get 
it to work

My session implemetation class looks like this:
@Stateless
@Remote(ProductManagerSession.class)
@Local(ProductManagerSession.class)
public class ProductManagerSessionImpl extends AbstractManagerSession 
implements ProductManagerSession
{

}

with both a remote and local interface:
then my jboss.xml file looks like this for one of the clusters:

  | 
  | 
  | 
  | 
  | ProductManagerSessionImpl
  | ProductManagerSessionImpl/remote
  | true
  | 
  | AppPartition
  | 
org.jboss.ha.framework.interfaces.FirstAvailable
  | 
  | 
  | 
  | 
  | ProductManagerSessionImpl
  | ProductManagerSessionImpl/local
  | true
  | 
  | AppPartition
  | 
org.jboss.ha.framework.interfaces.FirstAvailable
  | 
  | 
  | 
  | 
  | 
It is then packaged in an ear file named app.ear
when I try to connect using a remote client using the jndi name 
app/ProductManagerSessionImpl/remote
I get a NamingException saying "remote not bound"

What am I doing wrong??
Do I also need an ejb-jar.xml file??

Is there something I am missing from jboss.xml??

Any suggestions would be appreciated

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973449
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-21 Thread ablevine1
So, I,ve found that this is supposed to be able to be done by using jboss.xml 
files in the META-INF directory of your ejb jar file, but I can;t seem to get 
it to work

My session implemetation class looks like this:
@Stateless
@Remote(ProductManagerSession.class)
@Local(ProductManagerSession.class)
public class ProductManagerSessionImpl extends AbstractManagerSession 
implements ProductManagerSession
{

}

with both a remote and local interface:
then my jboss.xml file looks like this for one of the clusters:





ProductManagerSessionImpl
ProductManagerSessionImpl/remote
true

AppPartition

org.jboss.ha.framework.interfaces.FirstAvailable




ProductManagerSessionImpl
ProductManagerSessionImpl/local
true

AppPartition

org.jboss.ha.framework.interfaces.FirstAvailable





It is then packaged in an ear file named app.ear
when I try to connect using a remote client using the jndi name 
app/ProductManagerSessionImpl/remote
I get a NamingException saying "remote not bound"

What am I doing wrong??
Do I also need an ejb-jar.xml file??

Is there something I am missing from jboss.xml??

Any suggestions would be appreciated


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973444
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: same SLSB in multiple clusters

2006-09-21 Thread ablevine1
So, I,ve found that this is supposed to be able to be done by using jboss.xml 
files in the META-INF directory of your ejb jar file, but I can;t seem to get 
it to work

My session implemetation class looks like this:
@Stateless
@Remote(ProductManagerSession.class)
@Local(ProductManagerSession.class)
public class ProductManagerSessionImpl extends AbstractManagerSession 
implements ProductManagerSession
{

}

with both a remote and local interface:
then my jboss.xml file looks like this for one of the clusters:





ProductManagerSessionImpl
ProductManagerSessionImpl/remote
true

AppPartition

org.jboss.ha.framework.interfaces.FirstAvailable




ProductManagerSessionImpl
ProductManagerSessionImpl/local
true

AppPartition

org.jboss.ha.framework.interfaces.FirstAvailable





It is then packaged in an ear file named app.ear
when I try to connect using a remote client using the jndi name 
app/ProductManagerSessionImpl/remote
I get a NamingException saying "remote not bound"

What am I doing wrong??
Do I also need an ejb-jar.xml file??

Is there something I am missing from jboss.xml??

Any suggestions would be appreciated


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973447
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - same SLSB in multiple clusters

2006-09-21 Thread ablevine1
If I have an EJB3 SLSB and I want it to be in multiple clusters, how do I 
achieve this.  The @Clustered annotation seems to tie it to only one cluster, 
as the partition name parameter refers to only one partition.  Is there some 
way I can deploy the same Session Bean in two clusters??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973402
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Re: Some Issues with clustering on JBoss 4.0.4 and EJB stub

2006-09-21 Thread ablevine1
I am using a stateless session bean.  Now it seems like it does reconnect to 
the second server if the first one goes down, but if all servers in the cluster 
go down and the client tries to connect when they are down, the client gets in 
a state where it fails every time, even after all servers are up again.  

Also, what is the default Cluster configuration for an EJB3 slsb using the 
@Clustered annotation??

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973349
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Clustering/JBoss] - Some Issues with clustering on JBoss 4.0.4 and EJB stub cach

2006-09-20 Thread ablevine1
I am currently usign the JBoss4.0.4 and the EJB3 release that is included with 
it.  I have been using this 
http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html as my 
basis for understanding how jboss clustering works, but I think my 
understanding of it may be wrong.  I am currently running with a cluster of two 
app servers on the same partition called app1 and app2. 

Here is my test:
1. My external client program connects to the cluster via HAJNDI(port 1100) and 
gets a client stub to a session bean by doing a lookup on an initial context.
2. It then makes some calls to the ejb using this stub and caches the stub in 
variable.
3. I see which of the app servers handled the request and shut it down but 
leave the other one running.
4. Now I use the stored stub on the client to make the same call to the cluster 
as before but it fails.

>From the clustering doc mentioned above, I was under the impression that step 
>4 should have worked and that the stubs handled failover.  Is this assumption 
>incorrect, or am I missing something?? 

any help with this would be greatly appreciated.



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973033
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: EJB 3.0 - PK Generation with GenerationType

2006-09-12 Thread ablevine1
There is no way to do this that is ejb3-spec compliant, however, you can use 
some hibernate extensions to accomplish this.

1. You need create an id genretor class that implements 
org.hibernate.id.IdentifierGenerator implementing the generate method to return 
your custom generated pk.

2. Annotate the primary key getter method for you ejb with the following
@Id
@Column(name = "ID")
@GeneratedValue(generator = "myCustomIDGen")
@GenericGenerator(name = "myCustomIDGen", strategy = 
"full_classname_of_your_IdentifierGenerator_implementation")

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971157
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBossCache] - Re: TransactionManager Name not bound?

2006-07-13 Thread ablevine1
no. not yet, as no one has responded

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957877
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Re: check if a lazy property is loaded

2006-07-11 Thread ablevine1
I'm not exactly sure how this works for lazy-loadable properties that are 
non-collection based objects, but I bet it's probably pretty similar.  For 
properties that are a collection implementation e.g. List, Set, .. etc., their 
lazy loaded proxy collections implement the interface 
org.hibernate.collection.PersistentCollection after they are persisted by the 
entity manager.  To determine if one of these has been loaded yet, you can call 
the wasInitialized() method.  Most likely, the proxy objects that implement 
lazy-loaded non-collection based properties implement a common interface and 
have a method that you can call that is similar to wasInitialized().

I see that there is a org.hibernate.proxy.HibernateProxy interface. Perhaps 
these objects implement that.  If so, then you may be able to call
getHibernateLazyInitializer() to get a LazyInitializer and then from that call 
isUninitialized(), how ever I have not yet tried this.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957200
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user