[jboss-user] [EJB 3.0] - Access the EJB2 bean from EJB3 Service problem

2009-03-17 Thread konstantin.ermakov
Hi! I am writing a small EJB3 Service app, which should call the EJB2 app. The code looks like this: | | @Service(name="MyService") | @Depends("jboss.management.local:J2EEApplication=EJB2App.ear,J2EEServer=Local,j2eeType=EJBModule,name=EJB2App.jar") | class MyManagement implements Man

[jboss-user] [EJB 3.0] - Re: Stateful Bean and the database commit

2007-01-17 Thread konstantin.ermakov
Hi! My Idea is to send or not to send a message according to the boolean parameter in the afterCompletion method. But thank you for the code. So far I have not seen any problems with afterCompletion event as well, but I want just to be sure, if it is fine, there is nothing specific about it.

[jboss-user] [EJB 3.0] - Re: Stateful Bean and the database commit

2007-01-17 Thread konstantin.ermakov
Hi! No, flush() does not mean commit. There was already a topic and we have a lot of problems with this issue. See the following topic: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=96458&postdays=0&postorder=asc&start=10 I have stateful bean, because SessionSynchronization is not

[jboss-user] [EJB 3.0] - Re: Asynchronous callbacks

2007-01-17 Thread konstantin.ermakov
We have implemented our own security mechanism, but I think there should be something in JMS implementation. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002726#4002726 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4

[jboss-user] [EJB 3.0] - Re: Asynchronous callbacks

2007-01-17 Thread konstantin.ermakov
Hi! I was planning to implement it. My idea was to implement the MDB, which is listening to the messages and giving the result back to the client, i.e. during the execution your state/less/full bean sends messages to MDB, MDB does the rest. View the original post : http://www.jboss.com/in

[jboss-user] [EJB 3.0] - Stateful Bean and the database commit

2007-01-17 Thread konstantin.ermakov
Hi! I have the following stateful bean: | | public class MyStatefulBean implements MyStatefulBeanI, SessionSynchronization { | | @PersistenceUnit(unitName = "db") | public EntityManagerFactory factory; | | public MyEntity getObject( int id ) throws Exception { |

[jboss-user] [EJB 3.0] - NameNotFound exception in .jsp

2007-01-03 Thread konstantin.ermakov
Hello! I was deploying my app as ejb3 jar. now I migrated to .ear as I would like to use the small on-the-web frontend. All my stateless beans are annotated as | @Stateless(name="application/session/SomeBean") | class .. | as soon as I am trying to execute context.lookup("appl

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-18 Thread konstantin.ermakov
I also implemented the Hibernate interceptor and injected it with post-commit-update tag in persistence.xml. I still have the same problem. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994714#3994714 Reply to the post : http://www.jboss.com/index.html?modu

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-18 Thread konstantin.ermakov
"dilator" wrote : Hibernate provides both Interceptors and Event listeners - they should do the trick, as long as you dont mind using non-JPA features I was trying to use @PostUpdate event listener - it does not help. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopi

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-15 Thread konstantin.ermakov
In addition to, I have the following question. If I am calling my update() method from the client, may I be sure that after this call from the same client from the same thread I will NOT receive the old data? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=399

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-15 Thread konstantin.ermakov
Hi! Thanks a lot for your answer. I actually want not to update the entity from the second thread, but just be sure, that the entity I am reading is up-to-date. And, of course, @Version, optimistic locking does not help me in this case. In general, let's assume the following scenario. |

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-11 Thread konstantin.ermakov
Hi! I am tracing my flush() statement, and I am sure that is happens before I am trying to read the data. If I understand it correctly, flush() is commiting the data and with the next manager.createQuery run the new data should be available. Is it true, or flush() is doing some background

[jboss-user] [EJB 3.0] - Re: JTA EntityManager cannot access a transactions

2006-12-06 Thread konstantin.ermakov
Hi! This line exists before the Stateless Bean implementation. Thanks, Konstantin View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991681#3991681 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991681 __

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-06 Thread konstantin.ermakov
Sorry - there is no transaction management in this case. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991673#3991673 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991673 __

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-06 Thread konstantin.ermakov
Hi! We are using Oracle 10g, it is the XA datasource. JBoss version is 4.0.4 GA. For the version information I just added the column in my table, so I did not have to rebuild it. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991667#3991667 Reply to the

[jboss-user] [EJB 3.0] - Re: JTA EntityManager cannot access a transactions

2006-12-06 Thread konstantin.ermakov
Sorry, the message is as following: JTA EntityManager cannot access a transactions View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991597#3991597 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991597 ___

[jboss-user] [EJB 3.0] - JTA EntityManager cannot access a transactions

2006-12-06 Thread konstantin.ermakov
Hello! I am receiving the following exception, when I am trying to start a transaction in my Stateless bean: | EntityManager m = emf_.createEntityManager(); | m.getTransaction().begin(); | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-05 Thread konstantin.ermakov
Hello! It seems that some internal error leads to incorrect data in my entity bean POJO: | 2006-12-05 14:13:14,496 INFO [myapp] Invoking: mypackage..session.MyObjectSession.getObject() | 2006-12-05 14:13:14,496 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 47731

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-05 Thread konstantin.ermakov
Before this exception I receive the following message: [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991234#3991234 Reply to the post : htt

[jboss-user] [EJB 3.0] - Re: EntityManager is loosing updates

2006-12-05 Thread konstantin.ermakov
I added Version to my data and I did not receive any new exceptions. The only exception I can see in the JBoss log file is as following: 2006-12-05 11:18:36,674 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE java.net.SocketException: socket closed at java.net.Sock

[jboss-user] [EJB 3.0] - EntityManager is loosing updates

2006-12-04 Thread 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

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

2006-11-16 Thread konstantin.ermakov
Sorry, but the only details I can give you are, that we have 20 Entity Beans, 1 Timer Bean, 1 Message-Driven Bean, 18 Session Beans for DAO, Some extra service and session beans which are doing some background job. The project is not on-the-web, so we have the fat client with rich GUI. View th

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

2006-11-15 Thread konstantin.ermakov
Hi! Our EJB3 project is under development. IMHO, EJB3 is stable enough. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986166#3986166 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986166

[jboss-user] [EJB 3.0] - Re: Advanced problems with Jboss and Hibernate !

2006-11-13 Thread konstantin.ermakov
Yes, exactly. For me it was a big problem to understand how the composite key concept works. But it became clear after I generated some beans from the datbase structure with the JAG product: http://jag.sourceforge.net. I can recommend you to generate some examples and you will see the best way

[jboss-user] [EJB 3.0] - Re: Problems deploying a service under JBoss

2006-11-13 Thread konstantin.ermakov
I simply downgraded to jboss-4.0.4, where it works fine. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985424#3985424 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985424 __

[jboss-user] [EJB 3.0] - Re: Advaned problems with Jboss and Hibernate !

2006-11-10 Thread konstantin.ermakov
Hi! I think you should use the composite key as an id in your daughter class, I think it is so in EJB3 spec. P.S. May the force be with you View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984931#3984931 Reply to the post : http://www.jboss.com/index.html

[jboss-user] [EJB 3.0] - @Version annotation problem

2006-11-10 Thread konstantin.ermakov
Hello! In my Entity Bean I have a @Version annotation. When I am trying to persist an object I receive the following exception: [org.hibernate.type.IntegerType] could not bind value '1' to parameter: 1; The statement is closed. The first parameter is exacly the version. With JBoss-4.0.4 it w

[jboss-user] [EJB 3.0] - Re: Problems deploying a service under JBoss

2006-11-10 Thread konstantin.ermakov
In my situation I have the following: | @Remote | public interface ServiceI { | | } | | @Management | public interface ServiceManagementI { | | public void start(); | | public void stop() throws Exception; | | } | | @Service | public class Service impleme

[jboss-user] [EJB 3.0] - Re: Problems deploying a service under JBoss

2006-11-09 Thread konstantin.ermakov
After rewriting the service with the @Service, @Management annotations I receive the following exception during the undeploy mechanism: | 10:43:31,413 WARN [ServiceDelegateWrapper] Stopping failed jboss.j2ee:jar=mypapp.jar,name=MyService,service=EJB3 | java.lang.RuntimeException: javax.man

[jboss-user] [EJB 3.0] - Re: What happened to InvocationContext.getBeanName()?

2006-11-08 Thread konstantin.ermakov
thank you, that was it View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984134#3984134 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3984134 ___ jboss-user mailing list jbos

[jboss-user] [EJB 3.0] - What happened to InvocationContext.getBeanName()?

2006-11-08 Thread konstantin.ermakov
Hello! In JBoss 4.0.5 the method InvocationContext.getBeanName() does not exist anymore. Is is supposed to be so, or is it a bug? Thanks, Konstantin View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984043#3984043 Reply to the post : http://www.jboss.com/i

[jboss-user] [EJB 3.0] - Problems deploying a service under JBoss

2006-11-07 Thread konstantin.ermakov
Hello, I wrote the following service : | public interface ServiceI { | | } | | public interface ServiceManagementI { | | public void start(); | | public void stop() throws Exception; | | } | | | public class Service implements ServiceManagementI, ServiceI {

[jboss-user] [EJB 3.0] - Re: JBoss 4.0.5 EJB3 Deploy need server restart ?

2006-11-07 Thread konstantin.ermakov
Hi! I have the same issue! is it a bug? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983735#3983735 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983735 ___ jboss-user

[jboss-user] [EJB 3.0] - SessionContext injection

2006-11-06 Thread konstantin.ermakov
Hello! I have the Entity Listener, and I want to inject a SessionContext into it: | public class EntityBeanListener { | |private @Resource SessionContext context; | ... | |@PostPersist |void afterInsert(Object obj) { | Queue q = (Queue) context.lookup("queue/M

[jboss-user] [EJB 3.0] - Re: Timer event is always handled by a new instance?

2006-08-31 Thread konstantin.ermakov
Hi! in the $JBOSS_HOME/server/default/data/hypersonic/localdb.script after the server crash you will be able to find the following code: INSERT INTO TIMERS just delete this line and the code works fine then. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopi

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Two persistence units in one EJB3 App

2006-08-31 Thread konstantin.ermakov
Hi! I have two persistence units in my application - one is Oracle and one in HSQL. For the Oracle datasource all the tables are already created, so I use the mapping in my Entity beans. In Hypersonic DB I want to store some additional information, But as it is "In-Memory" I am using the con

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

2006-08-17 Thread konstantin.ermakov
Hello! I wrote a QuartzBean, which I am trying to deploy. The code is as following: | package mybeans; | | import org.jboss.annotation.ejb.ResourceAdapter; | import org.jboss.logging.Logger; | import org.quartz.Job; | import org.quartz.JobExecutionContext; | import org.

[jboss-user] [EJB 3.0] - Re: Problem deploying the MessageDrivenBean

2006-08-17 Thread konstantin.ermakov
Hi! The problem was solved. jbossmq-client.jar must be in the client classpath. Also, /remote has to be removed from the lookup() View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965675#3965675 Reply to the post : http://www.jboss.com/index.html?module=bb&o

[jboss-user] [EJB 3.0] - Problem deploying the MessageDrivenBean

2006-08-17 Thread konstantin.ermakov
Hello! I wrote the MessageDrivenBean with the following annotations: | @MessageDriven(activationConfig = | { | @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), | @ActivationConfigProperty(propertyName="destination", propertyValue="queue/myO