[EJB 3.0] - Re: Cyclic depencies
by Nico67
anonymous wrote :
| to compile @IgnoreDependency - you need
| jboss-4.0.5.GA\client\jboss-annotations-ejb3.jar in your compile classpath.
|
I found jboss-annotations-ejb3.jar in ejb3.deployer directory which is in the deploy directory of my server, not the client/ directory as you specified.
Note that to install EJB3 , I installed JBoss 4.0.5 , copied the default server configuration, then run the EJB3 ant script (install.xml) to install EJB3 stuffs in my server configuration.
Current conclusion is that:
- <ignore-dependency /> put in jboss.xml is ignored : i mean event if i specify it, the bean are not deployed;
- @IgnoreDependency works fine. When specified, the bean is started even if dependencies are not.
So, there may be a problem with my jboss.xml file and ignore-dependency. Has someone got it running ?
I copy below my jboss.xml file content.
<?xml version="1.0" encoding="UTF-8"?>
| <jboss
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
| http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
| version="3.0">
| <enterprise-beans>
| <session>
| <ejb-name>CmdbServiceBean</ejb-name>
| <ejb-ref>
| <ejb-ref-name>RepositoryServiceBean</ejb-ref-name>
| <ignore-dependency/>
| </ejb-ref>
| <ejb-ref>
| <ejb-ref-name>SecurityServiceBean</ejb-ref-name>
| <ignore-dependency/>
| </ejb-ref>
| </session>
| <session>
| <ejb-name>RegistryServiceBean</ejb-name>
| <ejb-ref>
| <ejb-ref-name>RepositoryServiceBean</ejb-ref-name>
| <ignore-dependency/>
| </ejb-ref>
| <ejb-ref>
| <ejb-ref-name>SecurityServiceBean</ejb-ref-name>
| <ignore-dependency/>
| </ejb-ref>
| </session>
| <session>
| <ejb-name>TestServiceBean</ejb-name>
| <ejb-ref>
| <ejb-ref-name>RegistryServiceBean</ejb-ref-name>
| <ignore-dependency/>
| </ejb-ref>
| </session>
| </enterprise-beans>
| </jboss>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991024#3991024
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991024
18 years, 1 month
[JBoss Seam] - Re: Excessive [could not destroy component] 1.1B1 to 1.1CR1
by lowecg2004
Oops - yes, you're quite right.
And you'll be searching for 'domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">'
(there should be a '<' before "domain name" above - but this renders the string invisible when it is displayed in the forum.)
<domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
| <!-- NON Clustered cache configuration -->
| <annotation expr="!class((a)org.jboss.annotation.ejb.cache.Cache) AND !class((a)org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
| </annotation>
| <annotation expr="!class((a)org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class((a)org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
| </annotation>
| <annotation expr="!class((a)org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class((a)org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=900)
| </annotation>
|
| <!-- Clustered cache configuration -->
| <annotation expr="!class((a)org.jboss.annotation.ejb.cache.Cache) AND class((a)org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
| </annotation>
| <annotation expr="!class((a)org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class((a)org.jboss.annotation.ejb.Clustered)">
| @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
| </annotation>
| </domain>
A wiki sounds like a great idea. Can you point me to the wiki page that tells me "how to create a wiki page"?!
C
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991023#3991023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991023
18 years, 1 month
[Messaging, JMS & JBossMQ] - JBossMQ errors after starting up with many messages in the q
by pkorros
Using JBoss 4.0.5, when I startup my application with ~2400 messages already persisted (but not yet processed) in the queue the application server correctly starts to dispatch the messages.
The problem is that I get some (~4-10) errors like the following, when the execution finishes I see the same amount of unprocessed messages in the database.
2006-12-04 16:51:46,651 ERROR [org.jboss.jms.asf.StdServerSession] (JMS SessionPool Worker-5) failed to commit/rollback
org.jboss.mq.SpyXAException: Resource manager error during commit; - nested throwable: (javax.jms.JMSException: Transaction is not active for rollback)
at org.jboss.mq.SpyXAException.getAsXAException(SpyXAException.java:72)
at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:92)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:317)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.jms.JMSException: Transaction is not active for rollback
at org.jboss.mq.pm.Tx.rollback(Tx.java:253)
at org.jboss.mq.pm.TxManager.rollbackTx(TxManager.java:180)
at org.jboss.mq.server.JMSDestinationManager.transact(JMSDestinationManager.java:449)
at org.jboss.mq.server.JMSServerInterceptorSupport.transact(JMSServerInterceptorSupport.java:126)
at org.jboss.mq.security.ServerSecurityInterceptor.transact(ServerSecurityInterceptor.java:197)
at org.jboss.mq.server.TracingInterceptor.transact(TracingInterceptor.java:352)
at org.jboss.mq.server.JMSServerInvoker.transact(JMSServerInvoker.java:132)
at org.jboss.mq.il.jvm.JVMServerIL.transact(JVMServerIL.java:175)
at org.jboss.mq.Connection.send(Connection.java:1110)
at org.jboss.mq.SpyXAResourceManager.commit(SpyXAResourceManager.java:166)
at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:88)
... 7 more
I have configured JBOSSMQ to use the MS SQL Server 2005 to persist the message queue.
Any ideas on how can I solve this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991022#3991022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991022
18 years, 1 month
[EJB 3.0] - EntityManager is loosing updates
by konstantin.ermakov
Hello!
I have the following problem. In our project we are using the standart design - there is one EntityBean pojo per table, and one Stateless session bean which is working with the table. We are also using rich clients, which are manipulating the data, i.e.:
|
| @Entity
| public class SomeObject {
|
| private Integer id_;
|
| private String name_;
|
| @Id
| public void setId( Integer id ) {
| id_ = id;
| }
|
| public Integer getId() {
| return id_;
| }
| .....
|
| };
|
|
| @Stateless
| public class SomeStatelessBean {
|
| @PersistenceContext(name = "myname", unitName = "myunit")
| private EntityManager manager;
|
|
| public SomeObject getObject() {
| return manager.find(SomeObject.class, id);
| };
|
| public update( SomeObject detached ) {
| SomeObject obj = manager.find(detached.id);
| obj.setName( detached.getName );
| manager.flush();
| };
|
| };
|
In the background there is a Timer Bean which is reading SomeObject information ( it does not manipulate, just reading ).
The problem is as following. If I am calling update() very often my EntityManger returns me the old with the getObject() method object, though I am sure that the new copy is in database (Oracle). Can somebody tell me why does it happen?
There are no exceptions on the server side, just the data is wrong.
Thank you,
Sincerely yours, Konstantin
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991018#3991018
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991018
18 years, 1 month