Re: [JBoss-user] Prim-key-class must match?
Check your ejb-jar.xml the prim-key-type must match your beans prim key. if your bean prim key is a composite key.. you most prolly create a expensePK class. in your xml, you must define your prim-key-type to that class... John - Original Message - From: "Jake Thompson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 17, 2001 10:57 AM Subject: [JBoss-user] Prim-key-class must match? Hi all, Jboss 2.4.1 / Catalina / Linux RedHat 7.1 / Sun JDK 1.3.1_01 When I deploy my application, I get the following errors? [Verifier] Bean : zebra/Expense Section: 9.4.7.1 Warning: The type of the field named in the primkey-field element must match the class in the prim-key-class element. I get these messages for about half of my beans, I am using Xdoclet, however all the code is prety much the same, some I get the warning and some I do not. Any thoughts? Thanks, Jake T. PS When I try to search the archives, I get an error, so I have not looked there first. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] RE: JBoss-user digest, Vol 1 #1568 - 11 msgs
Hi Charles, Never try out Netbeans yet... will look at it... But i must comment that Jbuilder is really fantastic when it comes to generating beans codes. john - Original Message - From: "Charles Ng" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 10:53 PM Subject: [JBoss-user] RE: JBoss-user digest, Vol 1 #1568 - 11 msgs Hi Ivan and John, I'm fortunate enough to have JBuilder Enterprise so I can setup JBoss to be debugged remotely. How entrenched are you guys with JBuilder? Have you considered NetBeans? NetBeans has remote debugging as well as Ant support... and it's free. I've played around with NetBeans 3.2.1 to evaluate it as an alternative to JBuilder Enterprise; it appears to have a lot of the features of JBuilder minus the $3000 price tag. :) Charles --__--__-- Message: 3 From: "John LYC" <[EMAIL PROTECTED]> To: "IvanLatysh" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: Re: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration. Date: Tue, 16 Oct 2001 15:56:04 +0800 Hi Ivan, did you find any solutions yet? i also need info on this.. I'm now using jbuilder to generate my CMP/BMP EJBs. i use it for development and coding too. but i will write my own deployment descriptor.. compile and deploy using ant. i do not go thru Jbuilder for compiling , deploying and testing... i will test my beans on a standalone instance of Jboss running outside jbuilder.. very memory intensive.. BTW, i know that ant can be configure to work with Jbuilder. just dunt know how to do it. Let me know if you have anything. Thanks John - Original Message - From: "IvanLatysh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 12:56 AM Subject: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration. > If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. > Please help with configuration. > > I have been om jBoss server and have read manual. > But they mention some jar which I haven't. > > Please If you have seen somewhere on the web some fresh documentation - send me a link. > > Thank you. > > Sincerely yours, Ivan Latysh. > > [EMAIL PROTECTED] > http://ivan.yourmail.com > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] PreparedStatements & Cloudscape
Don't know if this is relevant at all, but whenever I get the Unable to Create PreparedStatement with Oracle, inevitably it is because my pooled connection has timed out, i.e., I don't have a connection (I have since set an idle timeout so this doesn't happen.) Make sure you have a connection for your prepared statement. - Original Message - From: "Kent Henneuse" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 12:57 PM Subject: [JBoss-user] PreparedStatements & Cloudscape > Environment: > Red Hat 7.0 > JBoss 2.4.1a > Tomcat 3.2.3 > JDK 1.3.0_03 > Cloudscape 3.6 > > Problem: > When I try to create a PreparedStatement in my code > I get the exception at the bottom. > > What I find is that I am able to connect to Cloudscape > (Running in process not RMI) for regular queries but > I am not able to create a PreparedStatement. I know > Cloudscape is less then ideal but it is what I currently > have until I can rework for another DB. > > I also have Hypersonic still wired in but not InstantDB. > > Is there something extra I must do in the configuration > to have PreparedStatements work? > > Thanks, > > -Kent > > - Begin Exception --- > [EntitySynchronizationInterceptor] Store failed > java.rmi.RemoteException: Unable to create PreparedStatement!; nested > exception is: > java.sql.SQLException: Unable to create PreparedStatement! > java.sql.SQLException: Unable to create PreparedStatement! > at > org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientC onnection.java:169) > at comstock.srv.ejb.entity.RoleEJB.update(RoleEJB.java:327) > at comstock.srv.ejb.entity.CsBMPEntity.ejbStore(CsBMPEntity.java:32) > at java.lang.reflect.Method.invoke(Native Method) > at > org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManage r.java:347) > at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:252) > at > org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronizati on.beforeCompletion(EntitySynchronizationInterceptor.java:400) > at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1210) > at org.jboss.tm.TxCapsule.commit(TxCapsule.java:304) > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) > at > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:364) > at > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) > at > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12 8) > at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) > at > org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav a:286) > at > org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:483) > at > org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericPr oxy.java:335) > at > org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless SessionProxy.java:123) > at $Proxy11.findDist(Unknown Source) > at > comstock.samu.server.discover.NMapObjectDBInterface.initializeStatics(NMapOb jectDBInterface.java:104) > at > comstock.samu.server.discover.NMapObjectDBInterface.getRootId(NMapObjectDBIn terface.java:676) > at > samu._0002fsamu_0002ftree_0005fapplet_0005fbuilder_0002ejsptree_0005fapplet_ 0005fbuilder_jsp_0._jspService(_0002fsamu_0002ftree_0005fapplet_0005fbuilder _0002ejsptree_0005fapplet_0005fbuilder_jsp_0.java:317) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja va:130) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:282) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) > at org.apache.tomcat.core.Handler.service(Handler.java:287) > at > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) > at > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) > at > org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) > at > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) > at > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) > at java.lang.Thread.run(Thread.java:484) > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user _
[JBoss-user] Help !! Strange ejbStore behaviour, Cant Update
Hi Everybody, I am still using jboss version 2.2.2 jetty RC6 on win2k with postgresql 7.1.2 I have a strange problem here I am using this certain architecture Servlets --> Session Bean --> EntityBean -- Database; I am trying to call a business method of Entity Bean from session bean and passing a delegate object to modify values of the attributes of the entity bean :- SessionBean : - updateCustomerInfo() --- > EntityBean :- updateCustomer(CustomerInfo info) Method In the Session Bean: updateCustomerInfo(CustomerInfo info ) { CustomerEntityRemote remote = customerHome.findByPrimaryKey() // finds customer Entity Bean remote.updateCustomer( info); } Method n the EntityBean : updateCustomer(CustomerInfo info) { this.customerName = info.customerName; this.customerAge = info.customerAge; this.customerAddress = info.customer; } The transaction type attribute in the deployment descriptor is: --RequiresNew I have tried with -Required- too Now calling the session bean method updateCustomerInfo calls remote method on the entity bean which does nothing but assign the attributes from the delegate class to entity bean attributes which logically should call ejbstore and ejbload .. things are fine till there . but i am getting a strange NullPointer Exception after ejbstore and ejbload is called Here is the stack trace : [CustomerSessionBean] Started CustomerSessionBean.updateCustomerInfo()... [CustomerEntityBean] Started CustomerEntityBean.setEntityContext()... [CustomerEntityBean] Finished CustomerEntityBean.setEntityContext()... [CustomerEntityBean] Started CustomerEntityBean.updateCustomer()... [CustomerSessionBean] Finished CustomerSessionBean.updateCustomer()... [CustomerSessionBean] Started CustomerEntityBean.ejbStore()... [CustomerSessionBean] Started CustomerEntityBean.storeRow()... [CustomerSessionBean] javax.ejb.EJBException: CustomerEntityBean:ejbStore:java.lang.NullPointerException [CustomerSessionBean] at CRM.DataManagement.CustomerEntityBean.ejbStore(CustomerEntityBean.java:120) [CustomerSessionBean] at java.lang.reflect.Method.invoke(Native Method) [CustomerSessionBean] at org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManage r.java:331) [CustomerSessionBean] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronizati on.beforeCompletion(EntitySynchronizationInterceptor.java:342) [CustomerSessionBean] at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1228) [CustomerSessionBean] at org.jboss.tm.TxCapsule.commit(TxCapsule.java:322) [CustomerSessionBean] at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) [CustomerSessionBean] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:318) [CustomerSessionBean] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [CustomerSessionBean] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:19 0) [CustomerSessionBean] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [CustomerSessionBean] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.jav a:271) [CustomerSessionBean] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI nvoker.java:482) [CustomerSessionBean] at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless SessionProxy.java:152) [CustomerSessionBean] at $Proxy20.updateCustomer(Unknown Source) [CustomerSessionBean] at CRM.UserInterface.CustomerSessionUIServlet.invokeUpdate(CustomerSessionUISer vlet.java:184) [CustomerSessionBean] at CRM.UserInterface.CustomerSessionUIServlet.doGet(CustomerSessionUIServlet.ja va:173) [CustomerSessionBean] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) [CustomerSessionBean] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) [CustomerSessionBean] at com.mortbay.Jetty.Servlet.ServletHolder.handle(ServletHolder.java:488) [CustomerSessionBean] at com.mortbay.Jetty.Servlet.ServletHandler.handle(ServletHandler.java:488) [CustomerSessionBean] at com.mortbay.Jetty.Servlet.ServletHandler.handle(ServletHandler.java:317) [CustomerSessionBean] at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:956) [CustomerSessionBean] at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:913) [CustomerSessionBean] at com.mortbay.HTTP.HttpServer.service(HttpServer.java:703) [CustomerSessionBean] at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:508) [CustomerSessionBean] at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:347) [CustomerSessionBean] at com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:107) [CustomerSessionBean] at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:294) [CustomerSessionBean] at com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:613) [CustomerSessionBean] at java.lang.Thread.run(Unknown Source) [Jetty] Servlet Exc
[JBoss-user] Prim-key-class must match?
Hi all, Jboss 2.4.1 / Catalina / Linux RedHat 7.1 / Sun JDK 1.3.1_01 When I deploy my application, I get the following errors? [Verifier] Bean : zebra/Expense Section: 9.4.7.1 Warning: The type of the field named in the primkey-field element must match the class in the prim-key-class element. I get these messages for about half of my beans, I am using Xdoclet, however all the code is prety much the same, some I get the warning and some I do not. Any thoughts? Thanks, Jake T. PS When I try to search the archives, I get an error, so I have not looked there first. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] RE: JBoss-2.4.3 and NameAlreadyBoundException problem
Hi, I tried to attach the sample source which will reproduce the problem whereby there seem to be problem when a new InitialContext is created, and a lookup is done with the constructor of an EJB. This only happens when deploying 2 or more EJBs in an application. It failed to get submitted for some reason. I am attaching the sample source and the server.log file here. The offending code seems to be here: package com.example; import java.rmi.RemoteException; import javax.ejb.*; import javax.naming.InitialContext; public class ExampleMainEJB implements SessionBean { public ExampleMainEJB () { try { InitialContext c=new InitialContext(); System.err.println("Initial context:"+c); System.err.println("lookup:"+c.lookup("java:comp/env/blah")); } catch (Exception e) { System.err.println("Exception:"+e); } } public void ejbCreate() {} public void ejbRemove() {} public void ejbActivate() {} public void ejbPassivate(){} public void setSessionContext(SessionContext sc) {} } I am using JBoss-2.4.3_Tomcat-4.0. Thanks keith sampe2.zip Description: Zip compressed data
RE: [JBoss-user] narrow() causing ClassCastException
Make sure you don't have the same class in the classpath more than once. James -Original Message- From: Asad Faizi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 16, 2001 12:37 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] narrow() causing ClassCastException Hello, I am getting ClassCastException when I try to do javax.rmi.PortableRemoteObject.narrow() in my EJB code. It appears that all the classes are there in the classpath, so this is a bit puzzling to me. Can someone who has had similar problem help me with this. Thanks, Asad Faizi ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] narrow() causing ClassCastException
Hello, I am getting ClassCastException when I try to do javax.rmi.PortableRemoteObject.narrow() in my EJB code. It appears that all the classes are there in the classpath, so this is a bit puzzling to me. Can someone who has had similar problem help me with this. Thanks, Asad Faizi ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] PreparedStatements & Cloudscape
Environment: Red Hat 7.0 JBoss 2.4.1a Tomcat 3.2.3 JDK 1.3.0_03 Cloudscape 3.6 Problem: When I try to create a PreparedStatement in my code I get the exception at the bottom. What I find is that I am able to connect to Cloudscape (Running in process not RMI) for regular queries but I am not able to create a PreparedStatement. I know Cloudscape is less then ideal but it is what I currently have until I can rework for another DB. I also have Hypersonic still wired in but not InstantDB. Is there something extra I must do in the configuration to have PreparedStatements work? Thanks, -Kent - Begin Exception --- [EntitySynchronizationInterceptor] Store failed java.rmi.RemoteException: Unable to create PreparedStatement!; nested exception is: java.sql.SQLException: Unable to create PreparedStatement! java.sql.SQLException: Unable to create PreparedStatement! at org.jboss.pool.jdbc.xa.wrapper.XAClientConnection.prepareStatement(XAClientConnection.java:169) at comstock.srv.ejb.entity.RoleEJB.update(RoleEJB.java:327) at comstock.srv.ejb.entity.CsBMPEntity.ejbStore(CsBMPEntity.java:32) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManager.java:347) at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:252) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSynchronization.beforeCompletion(EntitySynchronizationInterceptor.java:400) at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1210) at org.jboss.tm.TxCapsule.commit(TxCapsule.java:304) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:364) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:286) at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:483) at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335) at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123) at $Proxy11.findDist(Unknown Source) at comstock.samu.server.discover.NMapObjectDBInterface.initializeStatics(NMapObjectDBInterface.java:104) at comstock.samu.server.discover.NMapObjectDBInterface.getRootId(NMapObjectDBInterface.java:676) at samu._0002fsamu_0002ftree_0005fapplet_0005fbuilder_0002ejsptree_0005fapplet_0005fbuilder_jsp_0._jspService(_0002fsamu_0002ftree_0005fapplet_0005fbuilder_0002ejsptree_0005fapplet_0005fbuilder_jsp_0.java:317) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] cmp primary key
I usually use a counter entity bean. The entity bean's PK is a string, which uniquely names the counter. It has a method called, "getNextValue", which returns a long incrementing from zero. This may not be the fastest way, but it's very simple, and you will never get a duplicate (unless you've exhausted all 2^64 values.) If wrap-around is a concern, you can always make it into a string, and append the date. This way, you'd have to use up all 2^64 values in one day before the value would repeat. Mike - Original Message - From: "Frank Morton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 15, 2001 11:40 AM Subject: [JBoss-user] cmp primary key > I'm a newbie for sure, but I've been surfing around for > a solution to assigning unique primary key values with > CMPs. I have seen lots of vague descriptions of how > to do it and some specific ones that are all followed by > other comments from people why that solution doesn't > work. > > Does anyone have a specific solution and the complete > code to do this they can share? This seems like it must > be a very common problem that ought to have a standard > solution. > > Help. I'm really getting frustrated. > > Frank > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] RE: JBoss-user digest, Vol 1 #1568 - 11 msgs
Hello, Charles! You wrote to <[EMAIL PROTECTED]> on Tue, 16 Oct 2001 10:53:44 -0400: CN> Hi Ivan and John, CN> I'm fortunate enough to have JBuilder Enterprise so I can setup CN> JBoss to be debugged remotely. CN> How entrenched are you guys with JBuilder? Have you considered CN> NetBeans? I am switch from NetBeant to jBuilder. I have install ANT (5 minute). Also now I am writing manual how to setup jBoss as Application server under jBuilder 5 It's take more time because English not my native language :-) I like NetBeans - but I hate when netBeans disable editing for source which NetBeans was create for me. CN> NetBeans has remote debugging as well as Ant support... and it's CN> free. Yes, you are right it's free. --- Yours sincerely, Ivan Latysh. [EMAIL PROTECTED] http://ivan.yourmail.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Transaction
How are you getting the database connections? Make sure you get them from JNDI, not via DriverManager. Are the entity bean methods marked transaction Required, not RequiresNew? Is the session bean method marked Required or RequiresNew? Another thing, the EJB spec dictates that the container _not_ roll back the transaction on application exceptions! You must call setRollbackOnly() if an application exception does imply a rollback. -danch - Original Message - From: "Hermann RANGAMANA" <[EMAIL PROTECTED]> Cc: "User @ JBoss" <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 9:27 AM Subject: [JBoss-user] Transaction Hi all, I'm using jBoss 2.2.1 with win2k, and database on a Linux box running Mandrake 7.2 and postgresql 7.2.1 Here is the problem : whithin a method in a session bean, i call 3 methods of an entity bean. I want pack those three calls in a single transaction, in order that when a call fails, all of the 3 are rolled back. But the problem is that each of the 3 methods of the entity bean add data into the database, and when a exception occurs in the 2nd call (for ex), data that were added during the first call are not removed. Here is how i coded it : mySessionBeanMethod () { myEntityBean.call () ; // this call performs an getConnection()/close () myEntityBean.call_0 () ; // the same myEntityBean.call_1 () ; // the same } So how can i achieve that? Is it possible to roll back data that were added in call () if call_0 or call_1 fails ? Thanx for you response. --hermann ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Agent in jboss?
What you want to write is an MBean (Management Bean) Have a look here http://www.jboss.org/documentation/HTML/ch13s32.html Good Luck!! Tim. - Original Message - From: jquest jquest <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 4:24 PM Subject: [JBoss-user] Agent in jboss? > Hi all, > is it possible to write a part of code that will run as agent in jboss. > I need to have a task that live in jboss and strarts every 30 min. > > Many thanks in advance. > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Agent in jboss?
on 1-10-16 17.24, jquest jquest at [EMAIL PROTECTED] wrote: > Hi all, > is it possible to write a part of code that will run as agent in jboss. > I need to have a task that live in jboss and strarts every 30 min. check out "How To use the Timer MBean" : http://jboss.org/documentation/HTML/ch13s61.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Agent in jboss?
Hi all, is it possible to write a part of code that will run as agent in jboss. I need to have a task that live in jboss and strarts every 30 min. Many thanks in advance. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] RE: JBoss-user digest, Vol 1 #1568 - 11 msgs
Hi Ivan and John, I'm fortunate enough to have JBuilder Enterprise so I can setup JBoss to be debugged remotely. How entrenched are you guys with JBuilder? Have you considered NetBeans? NetBeans has remote debugging as well as Ant support... and it's free. I've played around with NetBeans 3.2.1 to evaluate it as an alternative to JBuilder Enterprise; it appears to have a lot of the features of JBuilder minus the $3000 price tag. :) Charles --__--__-- Message: 3 From: "John LYC" <[EMAIL PROTECTED]> To: "IvanLatysh" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: Re: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration. Date: Tue, 16 Oct 2001 15:56:04 +0800 Hi Ivan, did you find any solutions yet? i also need info on this.. I'm now using jbuilder to generate my CMP/BMP EJBs. i use it for development and coding too. but i will write my own deployment descriptor.. compile and deploy using ant. i do not go thru Jbuilder for compiling , deploying and testing... i will test my beans on a standalone instance of Jboss running outside jbuilder.. very memory intensive.. BTW, i know that ant can be configure to work with Jbuilder. just dunt know how to do it. Let me know if you have anything. Thanks John - Original Message - From: "IvanLatysh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 12:56 AM Subject: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration. > If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. > Please help with configuration. > > I have been om jBoss server and have read manual. > But they mention some jar which I haven't. > > Please If you have seen somewhere on the web some fresh documentation - send me a link. > > Thank you. > > Sincerely yours, Ivan Latysh. > > [EMAIL PROTECTED] > http://ivan.yourmail.com > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] How can disable the log report of JBoss?
> Hi, All: > > Everytime JBoss print it's own behavior message to the STDOUT. > > e.g.: When my program is done with the JDBC connection, it reports: > [CompiereDS] Pool CompiereDS [0/1/Unlimited] returned object >org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@61dfb5 to the pool. > > and something else. > > Can anyone tell me how to shut up this annoying message? > Thanks. Hi, This type of message is normally displayed when you turn the DB logging on. This means that you have in jboss.jcml file, where you have your DataSource's MBean configured (ie. CompiereDS), a specific attribute called : "LoggingEnabled", and probably this is set to "true". If you don't want to see those messages again, you know what you have to do ... :) Hope this helps, Remus. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transaction
Hi all, I'm using jBoss 2.2.1 with win2k, and database on a Linux box running Mandrake 7.2 and postgresql 7.2.1 Here is the problem : whithin a method in a session bean, i call 3 methods of an entity bean. I want pack those three calls in a single transaction, in order that when a call fails, all of the 3 are rolled back. But the problem is that each of the 3 methods of the entity bean add data into the database, and when a exception occurs in the 2nd call (for ex), data that were added during the first call are not removed. Here is how i coded it : mySessionBeanMethod () { myEntityBean.call () ; // this call performs an getConnection()/close () myEntityBean.call_0 () ; // the same myEntityBean.call_1 () ; // the same } So how can i achieve that? Is it possible to roll back data that were added in call () if call_0 or call_1 fails ? Thanx for you response. --hermann
Re: [JBoss-user] F1 F1 F1 F1 F1 F1 F1 F1
thanks John; One more thing, I was looking at the link "http://www.javaworld.com/javaworld/jw-06-2000/jw-0609-ejb_p.html" aouther has defined a tag in the deployment descriptor to define Value Object dependents of CMP as per 2.0 but on the sun site "http://java.sun.com/dtd/ejb-jar_2_0.dtd" in the DTD this element is not there, Now my problem is, if this element is not in the DTD by sun, how i can define "cmp-field of cmr-field" in CMP entity bean and does J-BOSS support EJB 2.0 Specification. Thanks Ajit John LYC wrote: Go Download the "EnterPrise JavaBeans Specification v1.1" from Sun websites.. there is a section called deployment descriptor.. it contains the DTD and also a sample file where all tags are defined. hope this helps John - Original Message - From: "ajit" <[EMAIL PROTECTED]> To: "User @ JBoss" <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 1:28 PM Subject: [JBoss-user] F1 F1 F1 F1 F1 F1 F1 F1 > Hi everybody; > Here are few element in the ejb-jar.xml, i could not under stand in > which condition i should defined in my DD and even if i want to defined > what should be the values. > Element names are > > assembly-descriptor > env-entry > security-role-ref > security-identity > resource-ref > resource-env-ref > > Please provide simple example with child element ,I am new for EJB.. As > > per SUN DTD all these tags are optional, but first i want to know where > we should use and what will be the values of these tag as well as the > values of child tag. > > PLEASE PROVIDE SOME EXAMPLE OF DD, WHERE ALL THESE TAGS ARE DEFINED. > > Thanks > Ajit > Have a nice day > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user >
[JBoss-user] Message Bean
I have scheduler message bean running Can I get a reference of this messag bean ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] How can disable the log report of JBoss?
Hi, All: Everytime JBoss print it's own behavior message to the STDOUT. e.g.: When my program is done with the JDBC connection, it reports: [CompiereDS] Pool CompiereDS [0/1/Unlimited] returned object org.opentools.minerva.jdbc.xa.wrapper.XAConnectionImpl@61dfb5 to the pool. and something else. Can anyone tell me how to shut up this annoying message? Thanks. Always Your Friend! Edward Wang <[EMAIL PROTECTED]> Asia Quantum Tech. Co. Ltd (Shanghai) \\\|||/// . === / \| O O | \ / \v_'/ # _| |_ (#) ( ) #\//|* *|\\ #\/( * )/ # = # (\ /) # || || .#---'| |. #' -' ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Select COUNT????? in Entity
You don't need to do this in a finder method ... just do it in a normal business method, wich return an int or an Integer object (the result of the 'select count' query ...) Hermann R A N G A M A N A Ingénieur Informaticien Primagendys SAS Tél : +(33) 1 43 58 27 83 Fax : +(33) 1 43 58 27 17 e-mail : [EMAIL PROTECTED] - Original Message - From: "John LYC" <[EMAIL PROTECTED]> To: "Jboss Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 5:08 AM Subject: [JBoss-user] Select COUNT? in Entity > Hi all, > I'm using Bean-managed Entity Beans.. > and i wanna do a sql "select count".. > the thing is the finder methods in entity can only return the beans remote > type or a collection of it. > meaning i cannot select count . > > How do i do a sql "count"? > > one way to do work around i guess is to do a sql "select" as per normal , > return collection. and do a collection .size. > but this seems redundant. > i just wan a figure. instead i'm selecting a collection of beans > > help > thanks > john > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Select COUNT????? in Entity
Got It... Thanks John - Original Message - From: "Joost v.d. Wijgerd" <[EMAIL PROTECTED]> To: "John LYC" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 3:31 PM Subject: RE: [JBoss-user] Select COUNT? in Entity Hi, You're doing a BMP bean, so you work with jdbc already, why don't you just define a method count() on the bean and call "SELECT COUNT * FROM blabla" on the datasource In my opinion you don't have to use only findBYXXX methods... Joost. -Original Message- From: John LYC [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 16, 2001 5:08 AM To: Jboss Mailing List Subject: [JBoss-user] Select COUNT? in Entity Hi all, I'm using Bean-managed Entity Beans.. and i wanna do a sql "select count".. the thing is the finder methods in entity can only return the beans remote type or a collection of it. meaning i cannot select count . How do i do a sql "count"? one way to do work around i guess is to do a sql "select" as per normal , return collection. and do a collection .size. but this seems redundant. i just wan a figure. instead i'm selecting a collection of beans help thanks john ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration.
Hi Ivan, did you find any solutions yet? i also need info on this.. I'm now using jbuilder to generate my CMP/BMP EJBs. i use it for development and coding too. but i will write my own deployment descriptor.. compile and deploy using ant. i do not go thru Jbuilder for compiling , deploying and testing... i will test my beans on a standalone instance of Jboss running outside jbuilder.. very memory intensive.. BTW, i know that ant can be configure to work with Jbuilder. just dunt know how to do it. Let me know if you have anything. Thanks John - Original Message - From: "IvanLatysh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 12:56 AM Subject: [JBoss-user] If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. Please help with configuration. > If someone using jBuilder and have configured jBuilder to debug EJB with jBoss. > Please help with configuration. > > I have been om jBoss server and have read manual. > But they mention some jar which I haven't. > > Please If you have seen somewhere on the web some fresh documentation - send me a link. > > Thank you. > > Sincerely yours, Ivan Latysh. > > [EMAIL PROTECTED] > http://ivan.yourmail.com > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Select COUNT????? in Entity
Sorry to trouble again... Just wanna know is there a implemtation specs to follow... such that the method must starts with ejbHomeXXX(); John - Original Message - From: "Kar YEOW" <[EMAIL PROTECTED]> To: "Jboss Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 3:13 PM Subject: Re: [JBoss-user] Select COUNT? in Entity > Have a method in your home interface say > public interface UserHome extends EJBHome { > int getUserCount() throws RemoteException; > } > > then in you ejb bean class you implement the method say > > public class UserBean extends { > public int ejbHomeGetUserCount() { > ... do your "select count(*)" sql here >... etc > return count; > } > > } > > hope this help. Kar > - Original Message - > From: "John LYC" <[EMAIL PROTECTED]> > To: "Kar YEOW" <[EMAIL PROTECTED]>; "Jboss Mailing List" > <[EMAIL PROTECTED]> > Sent: Tuesday, October 16, 2001 5:14 PM > Subject: Re: [JBoss-user] Select COUNT? in Entity > > > what do you mean? > John > > - Original Message - > From: "Kar YEOW" <[EMAIL PROTECTED]> > To: "Jboss Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, October 16, 2001 2:54 PM > Subject: Re: [JBoss-user] Select COUNT? in Entity > > > > Try using Home Interface. Kar > > - Original Message - > > From: "John LYC" <[EMAIL PROTECTED]> > > To: "Jboss Mailing List" <[EMAIL PROTECTED]> > > Sent: Tuesday, October 16, 2001 1:08 PM > > Subject: [JBoss-user] Select COUNT? in Entity > > > > > > Hi all, > > I'm using Bean-managed Entity Beans.. > > and i wanna do a sql "select count".. > > the thing is the finder methods in entity can only return the beans remote > > type or a collection of it. > > meaning i cannot select count . > > > > How do i do a sql "count"? > > > > one way to do work around i guess is to do a sql "select" as per normal , > > return collection. and do a collection .size. > > but this seems redundant. > > i just wan a figure. instead i'm selecting a collection of beans > > > > help > > thanks > > john > > > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] F1 F1 F1 F1 F1 F1 F1 F1
Go Download the "EnterPrise JavaBeans Specification v1.1" from Sun websites.. there is a section called deployment descriptor.. it contains the DTD and also a sample file where all tags are defined. hope this helps John - Original Message - From: "ajit" <[EMAIL PROTECTED]> To: "User @ JBoss" <[EMAIL PROTECTED]> Sent: Friday, October 12, 2001 1:28 PM Subject: [JBoss-user] F1 F1 F1 F1 F1 F1 F1 F1 > Hi everybody; > Here are few element in the ejb-jar.xml, i could not under stand in > which condition i should defined in my DD and even if i want to defined > what should be the values. > Element names are > > assembly-descriptor > env-entry > security-role-ref > security-identity > resource-ref > resource-env-ref > > Please provide simple example with child element ,I am new for EJB.. As > > per SUN DTD all these tags are optional, but first i want to know where > we should use and what will be the values of these tag as well as the > values of child tag. > > PLEASE PROVIDE SOME EXAMPLE OF DD, WHERE ALL THESE TAGS ARE DEFINED. > > Thanks > Ajit > Have a nice day > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] cmp primary key
Frank, I have found that it is the easiest to use a UUID that combines the time with some random number in a java Long object. These values are so ridiculously big that it is almost impossible to get a duplicate key, but of course you have to make arrangements in your code to catch the DuplicateKeyException and generate a new key, but I can assure you that this will not happen often... Joost. -Original Message- From: Frank Morton [mailto:[EMAIL PROTECTED]] Sent: Monday, October 15, 2001 7:40 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] cmp primary key I'm a newbie for sure, but I've been surfing around for a solution to assigning unique primary key values with CMPs. I have seen lots of vague descriptions of how to do it and some specific ones that are all followed by other comments from people why that solution doesn't work. Does anyone have a specific solution and the complete code to do this they can share? This seems like it must be a very common problem that ought to have a standard solution. Help. I'm really getting frustrated. Frank ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Select COUNT????? in Entity
Isee... so you do not inplement a finder methods for this... well, i'll try it out... Thanks... Kar John - Original Message - From: "Kar YEOW" <[EMAIL PROTECTED]> To: "Jboss Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 3:13 PM Subject: Re: [JBoss-user] Select COUNT? in Entity > Have a method in your home interface say > public interface UserHome extends EJBHome { > int getUserCount() throws RemoteException; > } > > then in you ejb bean class you implement the method say > > public class UserBean extends { > public int ejbHomeGetUserCount() { > ... do your "select count(*)" sql here >... etc > return count; > } > > } > > hope this help. Kar > - Original Message - > From: "John LYC" <[EMAIL PROTECTED]> > To: "Kar YEOW" <[EMAIL PROTECTED]>; "Jboss Mailing List" > <[EMAIL PROTECTED]> > Sent: Tuesday, October 16, 2001 5:14 PM > Subject: Re: [JBoss-user] Select COUNT? in Entity > > > what do you mean? > John > > - Original Message - > From: "Kar YEOW" <[EMAIL PROTECTED]> > To: "Jboss Mailing List" <[EMAIL PROTECTED]> > Sent: Tuesday, October 16, 2001 2:54 PM > Subject: Re: [JBoss-user] Select COUNT? in Entity > > > > Try using Home Interface. Kar > > - Original Message - > > From: "John LYC" <[EMAIL PROTECTED]> > > To: "Jboss Mailing List" <[EMAIL PROTECTED]> > > Sent: Tuesday, October 16, 2001 1:08 PM > > Subject: [JBoss-user] Select COUNT? in Entity > > > > > > Hi all, > > I'm using Bean-managed Entity Beans.. > > and i wanna do a sql "select count".. > > the thing is the finder methods in entity can only return the beans remote > > type or a collection of it. > > meaning i cannot select count . > > > > How do i do a sql "count"? > > > > one way to do work around i guess is to do a sql "select" as per normal , > > return collection. and do a collection .size. > > but this seems redundant. > > i just wan a figure. instead i'm selecting a collection of beans > > > > help > > thanks > > john > > > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user