[JBoss-user] Object transfer progress monitoring- Socket listening
The latest in my on-going attempts to monitor object transfers from ejbs is to try and monitor sockets. When I get the input stream associated with port 1099 I translate it to an object and find that its a Marshalled RMI object. When I call get() on it and print it I get the following: org.jnp.server.NamingServer_Stub[RemoteStub [ref: [endpoint:[:2530](remote),objID:[e3293:e7a96fca78:-8000, 2 Looking at the ports that open when my client talks to the ejbs, I notice that 2530 is one of the ports that opens. So maybe are objects returned by the ejbs transfered back on whatever port is given in this packet? Anyway, I try listening to this port and every other one that opens during and interaction and I don't get any data (through java.net.Socket means). Does anybody think I'm headed in a direction that would allow me to monitor the data transfer from the ejbs? Are there any features in RMI that allow you to monitor data transfers to and from remote methods? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] URGENT: Monitoring data transfer
Are there any ways of monitoring the progress of data transfer of objects from ejb methods. Is there any means of accomplishing this? If there's no clean way of doing this, is there a way of having the ejb generate events or messages that the client can listen for before a method execution completes? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] EJB data transfer monitoring
What is the best way to monitor the status of data transfer from ejbs? If the object being returned by a bean's method is large, is it possible to setup some kind of event or messaging stuff to monitor the progress? How is this kind of thing normally handled with ejbs? David Nordahl [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Memory overflow problem
When I run my client application on Jboss/Hypersonic, jboss and hypersonic take a bunch of memory and never deallocate it. But then, if I run the client application a second time the amount of memory allocated doesn't change. What is occuring here? Is there a setting I'm overlooking or should I be calling some method or sending some command to the database periodically? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Jboss or hypersonic memory problems
I have garbage collection turned on and my datasource is set to read-only but the memory used by jboss/hypersonic keeps growing without anything being released. I've had this problem with hypersonic outside of jboss in the past. Is there some setting that I'm overlooking or is this a problem with using hypersonic? Here's my datasource settings: DefaultDS org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l jdbc:hsqldb:hsql://localhost:1476 1200 sa 10 true false false true 1200 18 false false 1.0 0 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Re: ClassCastException getting home interface from Client - SOLVED
I solved the problem by jaring the interfaces on the ejb side and adding them to the client's classpath. So I think it either one of two things: 1. The classes on the ejb side had changed but the interface classes on the client side had not been updated. 2. The interface files on the client side having a different package statement than the ejb side classes caused class cast errors. >Replace this: > UpdateHome updateHome = (UpdateHome)ref; >With this: > UpdateHome updateHome = >(UpdateHome)javax.rmi.PortableRemoteObject.narrow(ref, UpdateHome.class); > >Not sure if this is your problem, but you should do it to be more correct. > >Also, *IF* you're going to hardcode those JNDI properties, the proper >way to do it is to pass a Hashtable containing the props into the >constructor of your InitialContext, not doing a System.setProperty(x,x). > Of course, a better way is to set them as -D params to your client >java command line. -- >Nordahl, David C wrote: >> I have two client classes using the same classpath, but one gets an error >> trying to get the home interface. Here is the code: >> >> System.setProperty("java.naming.factory.initial", >> "org.jnp.interfaces.NamingContextFactory"); >> System.setProperty("java.naming.provider.url", >> "localhost:1099"); >> InitialContext jndiContext = new InitialContext(); >> Object ref = jndiContext.lookup("session_beans/UpdateBean"); >> UpdateHome updateHome = (UpdateHome)ref; >> update = updateHome.create(); >> >> >> I get the error: >> >> java.lang.ClassCastException: $Proxy0 >> >> at the line that starts with UpdateHome >> >> Why is the lookup returning a $Proxy0 object instead of the home interface? >> >> >> >> >> ___ >> JBoss-user mailing list >> [EMAIL PROTECTED] >> http://lists.sourceforge.net/lists/listinfo/jboss-user >> ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] ClassCastException getting home interface from Client
I have two client classes using the same classpath, but one gets an error trying to get the home interface. Here is the code: System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); System.setProperty("java.naming.provider.url", "localhost:1099"); InitialContext jndiContext = new InitialContext(); Object ref = jndiContext.lookup("session_beans/UpdateBean"); UpdateHome updateHome = (UpdateHome)ref; update = updateHome.create(); I get the error: java.lang.ClassCastException: $Proxy0 at the line that starts with UpdateHome Why is the lookup returning a $Proxy0 object instead of the home interface? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Overriding finders - CMP
Could somebody post so sample code of how to overwrite finders by writing ejbFindBy methods in the bean class. This seems to be skipped over in the documentation. I'm unsure of how to intermix sql with java in the bean class using cmp. Or how to call other findBy methods from the bean class. It seems like one of this two things would have to take place in writing your own ejbFindBy methods. Thanks David Nordahl [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] CMP findAll: how to specify order of returned objects?
You can put an order field in the jaws entry SteveBean true STEVE findByAll last_name ASC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Kasperowski Sent: Thursday, June 21, 2001 10:53 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] CMP findAll: how to specify order of returned objects? I have CMP bean with a findAll operation that returns a Collection of objects. The order of the objects in the collection seems to be arbitrary: sometimes the sequence is A B C, other times the sequence is B A C, and other times objects are returned in a different sequence. As far as I can tell, JBoss doesn't support EJB QL. How, then, can I specify the order of the objects in the returned Collection? Thanks, -- Richard Kasperowski (mailto:[EMAIL PROTECTED]) Tel: 617-576-1552, Fax: 617-576-2441 http://www.altisimo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Auto-increment CMP primary key?
You'd need to create a PrimaryKeyBean like mentioned in earlier posts today only with fields that store the last number issued for each of your other beans that need these ids. Then create one instance of that PrimaryKeyBean to do the work. Then in the ejbCreate() method, call some findBy on PrimaryKeyHome to get the PrimaryKey remote interface for that instance, and call a method on the remote interface that returns the next id for the bean that is to be created. Like: public Long ejbCreate() throws RemoteException, CreateException{ PrimaryKey pk=null; PrimaryKeyHome pkhome=(PrimaryKeyHome)getHome("primaryKey/PrimaryKey",PrimaryKeyHome.class) ; try{ pk=pkhome.findByPrimaryKey(new Integer(0)); } catch(Exception e){ pk=pkhome.create(); } cancelled=false; reservationID=pk.getReservationID(); return null; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Richard Kasperowski Sent: Thursday, June 14, 2001 4:04 PM To: jboss-user Subject: [JBoss-user] Auto-increment CMP primary key? Another newbie question: Using a totally out-of-the-box JBoss+TomCat, I built a container managed EJB. The EJB's primary key is a Long; the idea is that a simple serial number is sufficient. In my bean's ejbCreate(), is there a recommended way to automatically generate the next Long? Thanks, -- Richard Kasperowski (mailto:[EMAIL PROTECTED]) Tel: 617-576-1552, Fax: 617-576-2441 http://www.altisimo.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Combo primary keys in ejb-jar
If you use a PK class which is an aggregate of multiple fields, what to you put for of the ejb-jar.jar file? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] The method return values in the home interface mustbe of valid types for RMI/IIOP.
I ran into this a little bit ago.. There is a good thread on it in the archive where someone listed all the possible reasons it can occur.. Try taking out the EJBException from the stuff that gives an error. If you're using TogetherSoft, it throws those in and the verifier gives that cryptic error. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tbone Sent: Thursday, June 14, 2001 12:25 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] The method return values in the home interface mustbe of valid types for RMI/IIOP. Does the Bicycle extends javax.ejb.EJBObject ( Remote interface )? - Original Message - From: "Richard Kasperowski" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 7:17 PM Subject: [JBoss-user] The method return values in the home interface must be of valid types for RMI/IIOP. > I'm a new JBoss user trying to debug my code with respect to this > warning message at deploy time. I've tried making the remote interface, > Bicycle, extend Serializable, but the warning doesn't go away. What am > I doing wrong? > > - > [Verifier] > Bean : BicycleBean > Method : public abstract Bicycle create() throws CreateException, > EJBException, RemoteException, SQLException > Section: 9.2.8 > Warning: The method return values in the home interface must be of valid > types for RMI/IIOP. > > [Verifier] > Bean : BicycleBean > Method : public abstract Bicycle findByPrimaryKey(Integer) throws > FinderException, RemoteException, EJBException > Section: 9.2.8 > Warning: The method return values in the home interface must be of valid > types for RMI/IIOP. > - > > Thanks, > > -- > Richard Kasperowski (mailto:[EMAIL PROTECTED]) > Tel: 617-576-1552, Fax: 617-576-2441 > http://www.altisimo.com/ > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Non-unique Primary Keys
Is it possible to create a primary key object for a bean where the PK object itself is not stored in the database, but its attributes are? In other words, I have a table which doesn't have a unique primary key but rather a pair of fields that must be unique. How do I make a primary key object without having to add another field to the database? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Rebuilding jboss.jar
Does anyone have a bat/make file to compile and jar the src code to make a new jboss.jar? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Upgrading to Hypersonic 1.6 and various other questions...
Hello, I am trying to accomplish 2 things: 1. Upgrade the hypersonic in JBoss to version 1.6 (i.e. make it use hsqldb.jar instead of hsql.jar) 2. Connect to an external or unembedded hypersonic 1.6 database I'm having trouble accomplishing this. I'm not sure what the Driver name should be. Using "org.hsqldb.jdbcDriver" doesn't seem to work. I don't understand the following: 1.When I try to change the hypersonic jdbc entry in the jboss.jmcl file, org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver to something other than whats there, it still loads hypersonic 1.4 when I start the server. What is telling it to do this? Also why is it loading instantdb stuff, does the default server setup create two simultaneous databases? 2. In the DefaultDS entries, DefaultDS org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l jdbc:HypersonicSQL:hsql://localhost:1476 does hsql coorespond to the hsql.jar file's name? 3. What tells jboss to use the .../db/hypersonic directory to write out database data? Thanks David ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Question about custom finders for compound objects
I found a place in my EJB book (O'Reilly 2nd ed. pg. 159) that talks about having a compound key as a primary key. It says that you have to map the keys to corresponding fields in the bean class. Ex. If 'Component' is a compound primary key and 'id' is an attribute of 'Component' which findByPrimaryKey(Integer key) is to search for. It says the Component.id field must map to a XYZBean.id field of type int in the XYZBean class. But it doesn't talk about mapping. Is this something you must setup in the jaws.xml file? Or does it just mean that for the attributes for which you want to execute searches on (ie. write findBy methods for), you must maintain duplicate copies of them in bean class? If so isn't there a cleaner way to do this? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Finder method question
I'm wondering if it is possible to create a finder method for an attribute which is nested in another object attribute of my bean. For example, say I have an Employee bean with an attribute of type Person (non bean) which has an attribute of last and first name, and I want to make a method findByFirstName. Is this possible? And if so how is it done? ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user