[jBoss-User] Re: [jBoss-User]

2001-03-07 Thread David Castro Diephouse

Hmm.  With serialization this should work.  Try printing out the class of
the returned object.  You're
sure youre casting to the right thing?

Could rmi be using the remote codebase while tomcat is using the local
codebase???  I dont see why that
would happen.

There were some serialization issues fixed between 2.0 and 2.1-beta, but I
wouldn't think they would
affect serialization of return values in standalone mode.  You could try
running current source though.

[EMAIL PROTECTED] wrote:

> Please accept apologies in advance if this is a basic/trivial question.
> I've looked at the docs and FAQs but am still confused.
>
> I'm running JBoss2.0 with Tomcat3.1.1 in Standalone mode and
> I'm getting a ClassCastException calling one of my EJB's Remote methods.
>
> The method returns several of the bean's properties in a wrapper class.
> This class is Serializable.  The other methods of the EJB, which return
> Strings or
> primitives all work okay.  (I have also tried putting the wrapper class
> in to an ArrayList and then casting in the Tomcat client.  The remote
> method
> returns the Collection to the client, but once I try to cast its contents
> it still
> fails).
>
> I have my EJB (plus the wrapper class) in a JAR in the JBoss deploy
> directory.  I
> also have the full class tree in the WEB-INF/classes directory
> in Tomcat.
>
> Here's a snippet of the stack trace
>
> java.lang.ClassCastException:
> uk.co.agora.excellence.behaviour.team.model.XLBTeam
>at $Proxy14.getTeamDetails(Unknown Source)
>at
>
uk.co.agora.excellence.behaviour.team.web.XLBTeamWebImpl.performUpdate(XLBTe
amWebImpl.java:118)
>
>at
> uk.co.agora.control.web.ModelManager.notifyListeners(ModelManager.java:59)
>at
>
uk.co.agora.excellence.behaviour.control.web.XLBEventHandler.handleEvent(XLB
EventHandler.java:53)
>
>at
> uk.co.agora.control.web.EventHandler.processEvent(EventHandler.java:30)
>at
> uk.co.agora.control.web.EventHandler.processEvent(EventHandler.java:32)
>at
>
uk.co.agora.control.web.RequestProcessor.processRequest(RequestProcessor.jav
a:81)
>
>at
> uk.co.agora.control.web.MainServlet.doGet(MainServlet.java:118)
>at
> uk.co.agora.control.web.MainServlet.doPost(MainServlet.java:82)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>
>at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
>
>at
>
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
>
>at java.lang.Thread.run(Unknown Source)
>
> If anyone can cast any light on this I'd be very grateful.
>
> Thanks,
> Syed
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]





-
This message (including any attachments) contains confidential, proprietary
or privileged information intended for a specific purpose and individual(s),
and is protected by law.  If you receive this message in error, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender.  Any unauthorized disclosure,
copying or distribution of any part of this message, or the taking of any
unauthorized action based on it, is strictly prohibited.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-02-27 Thread abrahiv


Dont see any errors



__
 Ernst & Young South Africa - http://www.ey.com/southafrica

 WARNING:  this e-mail contains confidential information and any
 unauthorised use or interception is illegal.
 If this e-mail is not intended for you, you may not copy, distribute
 or disclose the contents to anyone nor
 take any action in reliance on the content.  If you receive this in
 error, please contact the sender and
 delete the material from any computer.



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-25 Thread Ricky

Thanks Ole , 
  I have find the problems and the records is created
  
 Thanks anyway.wt

Ole Husgaard wrote:
> 
> Hi,
> 
> You need a little more than than
> just adding your JDBC driver to
> the classpath.
> 
> See the manual:
> http://www.jboss.org/newsite/documentation/HTML/ch03s05.html
> 
> It also has an example for PostgreSQL.
> 
> Best Regards,
> 
> Ole Husgaard.
> 
> Ricky wrote:
> >
> > Hi all ,
> >
> >  Happy weekend to you all,
> >
> >   I have done it all , but i have the error :
> >
> >
> >   java.sql.SQLException :No suitable driver found.
> >
> >   I have added the postgresql jar file to lib\ext
> >
> >   Anybody know why ?? Thanks.
> >
> > "Castro, David" wrote:
> > >
> > > If you're not using jaws.xml then you DB mapping will go to DefaultDS i
> > > believe, which is Hypersonic.
> > >
> > > jaws.xml allows you to map your entity to a particular DS, table, columns,
> > > etc.
> > >
> > > see the customizing jaws section in the documentation or new manual
> > >
> > > > -Original Message-
> > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, February 23, 2001 11:19 PM
> > > > To: JBoss-User
> > > > Subject: Re: [jBoss-User]
> > > > Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject
> > > >
> > > >
> > > > Hi all,
> > > >
> > > >   Thanks for your feedbacks.
> > > >   I have changed the code however when called the code below :
> > > >
> > > >home.create("1","weetat");
> > > >  The record was created but not in my database.
> > > >  May I know how to set database in jboss ? Do i need to set
> > > > jboss.wml or
> > > > jaws.xml ?
> > > >
> > > >  Thanks for your info. wt
> > > >
> > > > "Castro, David" wrote:
> > > > >
> > > > > PRO.Narrow makes your code portable to IIOP.  Jboss does
> > > > not currently
> > > > > support IIOP but probably will in the future.
> > > > >
> > > > > > -Original Message-
> > > > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: Friday, February 23, 2001 7:17 PM
> > > > > > To: JBoss-User
> > > > > > Subject: Re: [jBoss-User]
> > > > > >
> > > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > > >
> > > > > >
> > > > > > Hi Mica,
> > > > > >
> > > > > >   The PortableRemoteObject.narrow is for narrowing remote
> > > > reference.
> > > > > >   I have did it for a while without any errors.
> > > > > >
> > > > > >   I did not see why i must cast it like you have did it.
> > > > > >   Some more explaination please.
> > > > > >
> > > > > > Thanks.
> > > > > >
> > > > > > MicaCooper wrote:
> > > > > > >
> > > > > > > I see one thing wrong...
> > > > > > > You should be doing a cast like this:
> > > > > > >
> > > > > > > Enterprise1Home bh =
> > > > > > >
> > > > > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > > > > prise1"),Enter
> > > > > > > prise1.class);
> > > > > > >
> > > > > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > > > > >
> > > > > > > Mica Cooper
> > > > > > >
> > > > > > > -Original Message-
> > > > > > > From: [EMAIL PROTECTED]
> > > > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > > > > To: JBoss-User
> > > > > > > Subject: Re: [jBoss-User]
> > > > > > >
> > > > > >
> > > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > > > >
> > > > > > > Hi Rickard ,
> > > > > > >
> > &g

Re: [jBoss-User] Re:[jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-25 Thread Ole Husgaard

Hi,

You need a little more than than
just adding your JDBC driver to
the classpath.

See the manual:
http://www.jboss.org/newsite/documentation/HTML/ch03s05.html

It also has an example for PostgreSQL.


Best Regards,

Ole Husgaard.


Ricky wrote:
> 
> Hi all ,
> 
>  Happy weekend to you all,
> 
>   I have done it all , but i have the error :
> 
> 
>   java.sql.SQLException :No suitable driver found.
> 
>   I have added the postgresql jar file to lib\ext
> 
>   Anybody know why ?? Thanks.
> 
> "Castro, David" wrote:
> >
> > If you're not using jaws.xml then you DB mapping will go to DefaultDS i
> > believe, which is Hypersonic.
> >
> > jaws.xml allows you to map your entity to a particular DS, table, columns,
> > etc.
> >
> > see the customizing jaws section in the documentation or new manual
> >
> > > -Original Message-
> > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, February 23, 2001 11:19 PM
> > > To: JBoss-User
> > > Subject: Re: [jBoss-User]
> > > Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject
> > >
> > >
> > > Hi all,
> > >
> > >   Thanks for your feedbacks.
> > >   I have changed the code however when called the code below :
> > >
> > >home.create("1","weetat");
> > >  The record was created but not in my database.
> > >  May I know how to set database in jboss ? Do i need to set
> > > jboss.wml or
> > > jaws.xml ?
> > >
> > >  Thanks for your info. wt
> > >
> > > "Castro, David" wrote:
> > > >
> > > > PRO.Narrow makes your code portable to IIOP.  Jboss does
> > > not currently
> > > > support IIOP but probably will in the future.
> > > >
> > > > > -Original Message-
> > > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Friday, February 23, 2001 7:17 PM
> > > > > To: JBoss-User
> > > > > Subject: Re: [jBoss-User]
> > > > >
> > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > >
> > > > >
> > > > > Hi Mica,
> > > > >
> > > > >   The PortableRemoteObject.narrow is for narrowing remote
> > > reference.
> > > > >   I have did it for a while without any errors.
> > > > >
> > > > >   I did not see why i must cast it like you have did it.
> > > > >   Some more explaination please.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > MicaCooper wrote:
> > > > > >
> > > > > > I see one thing wrong...
> > > > > > You should be doing a cast like this:
> > > > > >
> > > > > > Enterprise1Home bh =
> > > > > >
> > > > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > > > prise1"),Enter
> > > > > > prise1.class);
> > > > > >
> > > > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > > > >
> > > > > > Mica Cooper
> > > > > >
> > > > > > -Original Message-
> > > > > > From: [EMAIL PROTECTED]
> > > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > > > To: JBoss-User
> > > > > > Subject: Re: [jBoss-User]
> > > > > >
> > > > >
> > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > > >
> > > > > > Hi Rickard ,
> > > > > >
> > > > > >   Thanks for your kind advise.
> > > > > >
> > > > > >   I have  another weird problems in Jboss , we try to
> > > > > execute the code
> > > > > > below .
> > > > > >
> > > > > >  InitialContext ctx = new InitialContext(props);
> > > > > >  Enterprise1Home bh =
> > > > > (Enterprise1Home)ctx.lookup("Enterprise1");
> > > > > >  bh.create("2","weetat");
> > > > > >
> > > > > >   All are well except it did not update in my postgresql7.0
> > > > > table.The

RE: [jBoss-User] Re:[jBoss-User]Re:[jBoss-User]java.lang.ClassCa stException:jav a.rmi.MarshalledObject

2001-02-25 Thread Robert Schulz

Postgres with jBoss-2.0Final:

In jboss.conf



In jboss.jcml


   
   jdbc:postgresql://dbmachine/dbname
   120
   dbuserName
   0
   secret
   false
   false
   false
   true
   12
   180
   false
   false
   1.0
   0
 

Cheers,

Robert.
> -Original Message-
> From: Ricky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 26 February 2001 12:34
> To: JBoss-User
> Subject: [jBoss-User] Re:
> [jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav
> a.rmi.MarshalledObject
> 
> 
> 
> Hi all ,
>
>  Happy weekend to you all, 
> 
>   I have done it all , but i have the error : 
>   
> 
>   java.sql.SQLException :No suitable driver found.
>   
>   I have added the postgresql jar file to lib\ext
> 
>   Anybody know why ?? Thanks.
> 
> "Castro, David" wrote:
> > 
> > If you're not using jaws.xml then you DB mapping will go to 
> DefaultDS i
> > believe, which is Hypersonic.
> > 
> > jaws.xml allows you to map your entity to a particular DS, 
> table, columns,
> > etc.
> > 
> > see the customizing jaws section in the documentation or new manual
> > 
> > > -Original Message-----
> > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, February 23, 2001 11:19 PM
> > > To: JBoss-User
> > > Subject: Re: [jBoss-User]
> > > Re:[jBoss-User]java.lang.ClassCastException:jav 
> a.rmi.MarshalledObject
> > >
> > >
> > > Hi all,
> > >
> > >   Thanks for your feedbacks.
> > >   I have changed the code however when called the code below :
> > >
> > >home.create("1","weetat");
> > >  The record was created but not in my database.
> > >  May I know how to set database in jboss ? Do i need to set
> > > jboss.wml or
> > > jaws.xml ?
> > >
> > >  Thanks for your info. wt
> > >
> > > "Castro, David" wrote:
> > > >
> > > > PRO.Narrow makes your code portable to IIOP.  Jboss does
> > > not currently
> > > > support IIOP but probably will in the future.
> > > >
> > > > > -Original Message-
> > > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Friday, February 23, 2001 7:17 PM
> > > > > To: JBoss-User
> > > > > Subject: Re: [jBoss-User]
> > > > >
> > > 
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > >
> > > > >
> > > > > Hi Mica,
> > > > >
> > > > >   The PortableRemoteObject.narrow is for narrowing remote
> > > reference.
> > > > >   I have did it for a while without any errors.
> > > > >
> > > > >   I did not see why i must cast it like you have did it.
> > > > >   Some more explaination please.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > MicaCooper wrote:
> > > > > >
> > > > > > I see one thing wrong...
> > > > > > You should be doing a cast like this:
> > > > > >
> > > > > > Enterprise1Home bh =
> > > > > >
> > > > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > > > prise1"),Enter
> > > > > > prise1.class);
> > > > > >
> > > > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > > > >
> > > > > > Mica Cooper
> > > > > >
> > > > > > -Original Message-
> > > > > > From: [EMAIL PROTECTED]
> > > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > > > To: JBoss-User
> > > > > > Subject: Re: [jBoss-User]
> > > > > >
> > > > >
> > > 
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > > >
> > > > > > Hi Rickard ,
> > > > > >
> > > > > >   Thanks for your kind advise.
> > > > > >
> > > > > >   I have  another weird problems in Jboss , we try to
> > > > > execute the code
> >

RE: [jBoss-User] Re:[jBoss-User]Re:[jBoss-User]java.lang.ClassCa stException:jav a.rmi.MarshalledObject

2001-02-25 Thread Scott Warren
Title: RE: [jBoss-User] Re: [jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav		  a.rmi.MarshalledObject





Rick 


check the Jboss.Properties file for an entry for the JDBC drivers and add the Postgress driver.. I don't know what it is as I don't use Postgress.

mine looks like this


jdbc.drivers=org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,com.jnetdirect.jsql.JSQLDriver
Regards



Scott Warren
Lead Internet Technologies Developer
-
Phone: +61 3 5222 6240
mailto:  [EMAIL PROTECTED]
web: www.advancedresource.com.au
-


-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED]]
Sent: Monday, 26 February 2001 12:34 PM
To: JBoss-User
Subject: [jBoss-User] Re:
[jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav
a.rmi.MarshalledObject




Hi all ,
   
 Happy weekend to you all, 


  I have done it all , but i have the error : 
  


  java.sql.SQLException :No suitable driver found.
  
  I have added the postgresql jar file to lib\ext


  Anybody know why ?? Thanks.


"Castro, David" wrote:
> 
> If you're not using jaws.xml then you DB mapping will go to DefaultDS i
> believe, which is Hypersonic.
> 
> jaws.xml allows you to map your entity to a particular DS, table, columns,
> etc.
> 
> see the customizing jaws section in the documentation or new manual
> 
> > -Original Message-
> > From: Ricky [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 11:19 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User]
> > Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject
> >
> >
> > Hi all,
> >
> >   Thanks for your feedbacks.
> >   I have changed the code however when called the code below :
> >
> >    home.create("1","weetat");
> >  The record was created but not in my database.
> >  May I know how to set database in jboss ? Do i need to set
> > jboss.wml or
> > jaws.xml ?
> >
> >  Thanks for your info. wt
> >
> > "Castro, David" wrote:
> > >
> > > PRO.Narrow makes your code portable to IIOP.  Jboss does
> > not currently
> > > support IIOP but probably will in the future.
> > >
> > > > -Original Message-
> > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, February 23, 2001 7:17 PM
> > > > To: JBoss-User
> > > > Subject: Re: [jBoss-User]
> > > >
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > >
> > > >
> > > > Hi Mica,
> > > >
> > > >   The PortableRemoteObject.narrow is for narrowing remote
> > reference.
> > > >   I have did it for a while without any errors.
> > > >
> > > >   I did not see why i must cast it like you have did it.
> > > >   Some more explaination please.
> > > >
> > > > Thanks.
> > > >
> > > > MicaCooper wrote:
> > > > >
> > > > > I see one thing wrong...
> > > > > You should be doing a cast like this:
> > > > >
> > > > > Enterprise1Home bh =
> > > > >
> > > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > > prise1"),Enter
> > > > > prise1.class);
> > > > >
> > > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > > >
> > > > > Mica Cooper
> > > > >
> > > > > -Original Message-
> > > > > From: [EMAIL PROTECTED]
> > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > > To: JBoss-User
> > > > > Subject: Re: [jBoss-User]
> > > > >
> > > >
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > >
> > > > > Hi Rickard ,
> > > > >
> > > > >   Thanks for your kind advise.
> > > > >
> > > > >   I have  another weird problems in Jboss , we try to
> > > > execute the code
> > > > > below .
> > > > >
> > > > >  InitialContext ctx = new InitialContext(props);
> > > > >  Enterprise1Home bh =
> > > > (Enterprise1Home)ctx.lookup("Enterprise1");
>

[jBoss-User] Re:[jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-25 Thread Ricky


Hi all ,
   
 Happy weekend to you all, 

  I have done it all , but i have the error : 
  

  java.sql.SQLException :No suitable driver found.
  
  I have added the postgresql jar file to lib\ext

  Anybody know why ?? Thanks.

"Castro, David" wrote:
> 
> If you're not using jaws.xml then you DB mapping will go to DefaultDS i
> believe, which is Hypersonic.
> 
> jaws.xml allows you to map your entity to a particular DS, table, columns,
> etc.
> 
> see the customizing jaws section in the documentation or new manual
> 
> > -Original Message-
> > From: Ricky [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 11:19 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User]
> > Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject
> >
> >
> > Hi all,
> >
> >   Thanks for your feedbacks.
> >   I have changed the code however when called the code below :
> >
> >home.create("1","weetat");
> >  The record was created but not in my database.
> >  May I know how to set database in jboss ? Do i need to set
> > jboss.wml or
> > jaws.xml ?
> >
> >  Thanks for your info. wt
> >
> > "Castro, David" wrote:
> > >
> > > PRO.Narrow makes your code portable to IIOP.  Jboss does
> > not currently
> > > support IIOP but probably will in the future.
> > >
> > > > -Original Message-
> > > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, February 23, 2001 7:17 PM
> > > > To: JBoss-User
> > > > Subject: Re: [jBoss-User]
> > > >
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > >
> > > >
> > > > Hi Mica,
> > > >
> > > >   The PortableRemoteObject.narrow is for narrowing remote
> > reference.
> > > >   I have did it for a while without any errors.
> > > >
> > > >   I did not see why i must cast it like you have did it.
> > > >   Some more explaination please.
> > > >
> > > > Thanks.
> > > >
> > > > MicaCooper wrote:
> > > > >
> > > > > I see one thing wrong...
> > > > > You should be doing a cast like this:
> > > > >
> > > > > Enterprise1Home bh =
> > > > >
> > > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > > prise1"),Enter
> > > > > prise1.class);
> > > > >
> > > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > > >
> > > > > Mica Cooper
> > > > >
> > > > > -Original Message-
> > > > > From: [EMAIL PROTECTED]
> > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > > To: JBoss-User
> > > > > Subject: Re: [jBoss-User]
> > > > >
> > > >
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > > >
> > > > > Hi Rickard ,
> > > > >
> > > > >   Thanks for your kind advise.
> > > > >
> > > > >   I have  another weird problems in Jboss , we try to
> > > > execute the code
> > > > > below .
> > > > >
> > > > >  InitialContext ctx = new InitialContext(props);
> > > > >  Enterprise1Home bh =
> > > > (Enterprise1Home)ctx.lookup("Enterprise1");
> > > > >  bh.create("2","weetat");
> > > > >
> > > > >   All are well except it did not update in my postgresql7.0
> > > > table.The
> > > > > record is not display in the table.
> > > > >   Do i need to set anything in the database ? Or did i need
> > > > to create
> > > > > JAWS.xml or Jboss.xml ?
> > > > >
> > > > >   What are the difference between jboss.xml and
> > JAWS.xml ? What are
> > > > > their purposes?
> > > > >
> > > > >   Thanks wt
> > > > >
> > > > > Rickard Öberg wrote:
> > > > > >
> > > > > > Hi!
> > > > > >
> > > > > > Ricky wrote:
> > > > > > >   May i know what do you mean by updating the clients
> > > > jnp-c

Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-23 Thread Ole Husgaard

Hi,

If your create seems to work fine, but
you do not find the created record in
your database, maybe the bean is using
the wrong datasource.
If no jboss.xml file is present, the
DefaultDS datasource is used as a
default.
To avoid creating jboss.xml files, I
change my jboss configuration, so that
the existing DefaultDS datasource is
removed, and add my own datasource
for my own database under name
DefaultDS.


Best Regards,

Ole Husgaard.


Ricky wrote:
> 
> Hi all,
> 
>   Thanks for your feedbacks.
>   I have changed the code however when called the code below :
> 
>home.create("1","weetat");
>  The record was created but not in my database.
>  May I know how to set database in jboss ? Do i need to set jboss.wml or
> jaws.xml ?
> 
>  Thanks for your info. wt
> 
> "Castro, David" wrote:
> >
> > PRO.Narrow makes your code portable to IIOP.  Jboss does not currently
> > support IIOP but probably will in the future.
> >
> > > -Original Message-
> > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, February 23, 2001 7:17 PM
> > > To: JBoss-User
> > > Subject: Re: [jBoss-User]
> > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > >
> > >
> > > Hi Mica,
> > >
> > >   The PortableRemoteObject.narrow is for narrowing remote reference.
> > >   I have did it for a while without any errors.
> > >
> > >   I did not see why i must cast it like you have did it.
> > >   Some more explaination please.
> > >
> > > Thanks.
> > >
> > > MicaCooper wrote:
> > > >
> > > > I see one thing wrong...
> > > > You should be doing a cast like this:
> > > >
> > > > Enterprise1Home bh =
> > > >
> > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > prise1"),Enter
> > > > prise1.class);
> > > >
> > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > >
> > > > Mica Cooper
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > To: JBoss-User
> > > > Subject: Re: [jBoss-User]
> > > >
> > > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > >
> > > > Hi Rickard ,
> > > >
> > > >   Thanks for your kind advise.
> > > >
> > > >   I have  another weird problems in Jboss , we try to
> > > execute the code
> > > > below .
> > > >
> > > >  InitialContext ctx = new InitialContext(props);
> > > >  Enterprise1Home bh =
> > > (Enterprise1Home)ctx.lookup("Enterprise1");
> > > >  bh.create("2","weetat");
> > > >
> > > >   All are well except it did not update in my postgresql7.0
> > > table.The
> > > > record is not display in the table.
> > > >   Do i need to set anything in the database ? Or did i need
> > > to create
> > > > JAWS.xml or Jboss.xml ?
> > > >
> > > >   What are the difference between jboss.xml and JAWS.xml ? What are
> > > > their purposes?
> > > >
> > > >   Thanks wt
> > > >
> > > > Rickard Öberg wrote:
> > > > >
> > > > > Hi!
> > > > >
> > > > > Ricky wrote:
> > > > > >   May i know what do you mean by updating the clients
> > > jnp-client.jar
> > > > > > file.
> > > > > >
> > > > > >   Please forgive me that I asked so many question cause
> > > i just started
> > > > > > to use jboss.
> > > > >
> > > > > Copy all files from /client to your clients classpath.
> > > > >
> > > > > /Rickard
> > > > >
> > > > > --
> > > > > Rickard Öberg
> > > > >
> > > > > Email: [EMAIL PROTECTED]
> > > > >
> > > > > --
> > > > > --
> > > > > To subscribe:[EMAIL PROTECTED]
> > > > > To unsubscribe:  [EMAIL PROTECTED]
> > > > > List Help?:  [EMAIL PROTECTED]
> > > >

RE: [jBoss-User]Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-23 Thread Castro, David

If you're not using jaws.xml then you DB mapping will go to DefaultDS i
believe, which is Hypersonic.

jaws.xml allows you to map your entity to a particular DS, table, columns,
etc.

see the customizing jaws section in the documentation or new manual

> -Original Message-
> From: Ricky [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 11:19 PM
> To: JBoss-User
> Subject: Re: [jBoss-User]
> Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject
> 
> 
> Hi all,
> 
>   Thanks for your feedbacks.
>   I have changed the code however when called the code below :
> 
>home.create("1","weetat"); 
>  The record was created but not in my database.
>  May I know how to set database in jboss ? Do i need to set 
> jboss.wml or
> jaws.xml ?
> 
>  Thanks for your info. wt
> 
> "Castro, David" wrote:
> > 
> > PRO.Narrow makes your code portable to IIOP.  Jboss does 
> not currently
> > support IIOP but probably will in the future.
> > 
> > > -Original Message-
> > > From: Ricky [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, February 23, 2001 7:17 PM
> > > To: JBoss-User
> > > Subject: Re: [jBoss-User]
> > > 
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > >
> > >
> > > Hi Mica,
> > >
> > >   The PortableRemoteObject.narrow is for narrowing remote 
> reference.
> > >   I have did it for a while without any errors.
> > >
> > >   I did not see why i must cast it like you have did it.
> > >   Some more explaination please.
> > >
> > > Thanks.
> > >
> > > MicaCooper wrote:
> > > >
> > > > I see one thing wrong...
> > > > You should be doing a cast like this:
> > > >
> > > > Enterprise1Home bh =
> > > >
> > > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > > prise1"),Enter
> > > > prise1.class);
> > > >
> > > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > > >
> > > > Mica Cooper
> > > >
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > > Sent: Friday, February 23, 2001 6:45 PM
> > > > To: JBoss-User
> > > > Subject: Re: [jBoss-User]
> > > >
> > > 
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > > >
> > > > Hi Rickard ,
> > > >
> > > >   Thanks for your kind advise.
> > > >
> > > >   I have  another weird problems in Jboss , we try to
> > > execute the code
> > > > below .
> > > >
> > > >  InitialContext ctx = new InitialContext(props);
> > > >  Enterprise1Home bh =
> > > (Enterprise1Home)ctx.lookup("Enterprise1");
> > > >  bh.create("2","weetat");
> > > >
> > > >   All are well except it did not update in my postgresql7.0
> > > table.The
> > > > record is not display in the table.
> > > >   Do i need to set anything in the database ? Or did i need
> > > to create
> > > > JAWS.xml or Jboss.xml ?
> > > >
> > > >   What are the difference between jboss.xml and 
> JAWS.xml ? What are
> > > > their purposes?
> > > >
> > > >   Thanks wt
> > > >
> > > > Rickard Öberg wrote:
> > > > >
> > > > > Hi!
> > > > >
> > > > > Ricky wrote:
> > > > > >   May i know what do you mean by updating the clients
> > > jnp-client.jar
> > > > > > file.
> > > > > >
> > > > > >   Please forgive me that I asked so many question cause
> > > i just started
> > > > > > to use jboss.
> > > > >
> > > > > Copy all files from /client to your clients classpath.
> > > > >
> > > > > /Rickard
> > > > >
> > > > > --
> > > > > Rickard Öberg
> > > > >
> > > > > Email: [EMAIL PROTECTED]
> > > > >
> > > > > --
> > > > > --
> > > > > To subscribe:[EMAIL PROTECTED]
> > > > > To unsubscribe:  [EMAIL PROTE

Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-23 Thread Ricky

Hi all,

  Thanks for your feedbacks.
  I have changed the code however when called the code below :

   home.create("1","weetat"); 
 The record was created but not in my database.
 May I know how to set database in jboss ? Do i need to set jboss.wml or
jaws.xml ?

 Thanks for your info. wt

"Castro, David" wrote:
> 
> PRO.Narrow makes your code portable to IIOP.  Jboss does not currently
> support IIOP but probably will in the future.
> 
> > -Original Message-
> > From: Ricky [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 23, 2001 7:17 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User]
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> >
> >
> > Hi Mica,
> >
> >   The PortableRemoteObject.narrow is for narrowing remote reference.
> >   I have did it for a while without any errors.
> >
> >   I did not see why i must cast it like you have did it.
> >   Some more explaination please.
> >
> > Thanks.
> >
> > MicaCooper wrote:
> > >
> > > I see one thing wrong...
> > > You should be doing a cast like this:
> > >
> > > Enterprise1Home bh =
> > >
> > (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> > prise1"),Enter
> > > prise1.class);
> > >
> > > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > >
> > > Mica Cooper
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > > Sent: Friday, February 23, 2001 6:45 PM
> > > To: JBoss-User
> > > Subject: Re: [jBoss-User]
> > >
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > >
> > > Hi Rickard ,
> > >
> > >   Thanks for your kind advise.
> > >
> > >   I have  another weird problems in Jboss , we try to
> > execute the code
> > > below .
> > >
> > >  InitialContext ctx = new InitialContext(props);
> > >  Enterprise1Home bh =
> > (Enterprise1Home)ctx.lookup("Enterprise1");
> > >  bh.create("2","weetat");
> > >
> > >   All are well except it did not update in my postgresql7.0
> > table.The
> > > record is not display in the table.
> > >   Do i need to set anything in the database ? Or did i need
> > to create
> > > JAWS.xml or Jboss.xml ?
> > >
> > >   What are the difference between jboss.xml and JAWS.xml ? What are
> > > their purposes?
> > >
> > >   Thanks wt
> > >
> > > Rickard Öberg wrote:
> > > >
> > > > Hi!
> > > >
> > > > Ricky wrote:
> > > > >   May i know what do you mean by updating the clients
> > jnp-client.jar
> > > > > file.
> > > > >
> > > > >   Please forgive me that I asked so many question cause
> > i just started
> > > > > to use jboss.
> > > >
> > > > Copy all files from /client to your clients classpath.
> > > >
> > > > /Rickard
> > > >
> > > > --
> > > > Rickard Öberg
> > > >
> > > > Email: [EMAIL PROTECTED]
> > > >
> > > > --
> > > > --
> > > > To subscribe:[EMAIL PROTECTED]
> > > > To unsubscribe:  [EMAIL PROTECTED]
> > > > List Help?:  [EMAIL PROTECTED]
> > >
> > > --
> > > --
> > > To subscribe:[EMAIL PROTECTED]
> > > To unsubscribe:  [EMAIL PROTECTED]
> > > List Help?:  [EMAIL PROTECTED]
> > >
> > > --
> > > --
> > > To subscribe:[EMAIL PROTECTED]
> > > To unsubscribe:  [EMAIL PROTECTED]
> > > List Help?:  [EMAIL PROTECTED]
> >
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> >
> 
> -
> This message (including any attachments) contains confidential, proprietary
> or privileged information intended for a specific purpose and individual(s),
> and is protected by law.  If you receive this message in error, please
> immediately delete it and all copies of it from your system, destroy any
> hard copies of it and notify the sender.  Any unauthorized disclosure,
> copying or distribution of any part of this message, or the taking of any
> unauthorized action based on it, is strictly prohibited.
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-23 Thread Lionel Siau

Mica is right. EJB 1.1 requires that way of 'casting' and 'narrowing'. JBoss
may not been protesting becoz it is backward compatibility to EJB 1.0.

Advise u conform to 1.1 for portability and potential failure on another
container.

Lionel
- Original Message -
From: "Ricky" <[EMAIL PROTECTED]>
To: "JBoss-User" <[EMAIL PROTECTED]>
Sent: Saturday, February 24, 2001 9:17 AM
Subject: Re: [jBoss-User]
Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject


> Hi Mica,
>
>   The PortableRemoteObject.narrow is for narrowing remote reference.
>   I have did it for a while without any errors.
>
>   I did not see why i must cast it like you have did it.
>   Some more explaination please.
>
> Thanks.
>
> MicaCooper wrote:
> >
> > I see one thing wrong...
> > You should be doing a cast like this:
> >
> > Enterprise1Home bh =
> >
(Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enterprise1"),Enter
> > prise1.class);
> >
> > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> >
> > Mica Cooper
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > Sent: Friday, February 23, 2001 6:45 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User]
> > Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> >
> > Hi Rickard ,
> >
> >   Thanks for your kind advise.
> >
> >   I have  another weird problems in Jboss , we try to execute the code
> > below .
> >
> >  InitialContext ctx = new InitialContext(props);
> >  Enterprise1Home bh = (Enterprise1Home)ctx.lookup("Enterprise1");
> >  bh.create("2","weetat");
> >
> >   All are well except it did not update in my postgresql7.0 table.The
> > record is not display in the table.
> >   Do i need to set anything in the database ? Or did i need to create
> > JAWS.xml or Jboss.xml ?
> >
> >   What are the difference between jboss.xml and JAWS.xml ? What are
> > their purposes?
> >
> >   Thanks wt
> >
> > Rickard Öberg wrote:
> > >
> > > Hi!
> > >
> > > Ricky wrote:
> > > >   May i know what do you mean by updating the clients jnp-client.jar
> > > > file.
> > > >
> > > >   Please forgive me that I asked so many question cause i just
started
> > > > to use jboss.
> > >
> > > Copy all files from /client to your clients classpath.
> > >
> > > /Rickard
> > >
> > > --
> > > Rickard Öberg
> > >
> > > Email: [EMAIL PROTECTED]
> > >
> > > --
> > > --
> > > To subscribe:[EMAIL PROTECTED]
> > > To unsubscribe:  [EMAIL PROTECTED]
> > > List Help?:  [EMAIL PROTECTED]
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




RE: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:jav a.rmi.MarshalledObject

2001-02-23 Thread Castro, David

PRO.Narrow makes your code portable to IIOP.  Jboss does not currently
support IIOP but probably will in the future.

> -Original Message-
> From: Ricky [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 23, 2001 7:17 PM
> To: JBoss-User
> Subject: Re: [jBoss-User]
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> 
> 
> Hi Mica, 
> 
>   The PortableRemoteObject.narrow is for narrowing remote reference.
>   I have did it for a while without any errors.
>  
>   I did not see why i must cast it like you have did it.
>   Some more explaination please.
> 
> Thanks.
> 
> MicaCooper wrote:
> > 
> > I see one thing wrong...
> > You should be doing a cast like this:
> > 
> > Enterprise1Home bh =
> > 
> (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enter
> prise1"),Enter
> > prise1.class);
> > 
> > The PortableRemoteObject.narrow is a requirement of EJB1.1.
> > 
> > Mica Cooper
> > 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> > Sent: Friday, February 23, 2001 6:45 PM
> > To: JBoss-User
> > Subject: Re: [jBoss-User]
> > 
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> > 
> > Hi Rickard ,
> > 
> >   Thanks for your kind advise.
> > 
> >   I have  another weird problems in Jboss , we try to 
> execute the code
> > below .
> > 
> >  InitialContext ctx = new InitialContext(props);
> >  Enterprise1Home bh = 
> (Enterprise1Home)ctx.lookup("Enterprise1");
> >  bh.create("2","weetat");
> > 
> >   All are well except it did not update in my postgresql7.0 
> table.The
> > record is not display in the table.
> >   Do i need to set anything in the database ? Or did i need 
> to create
> > JAWS.xml or Jboss.xml ?
> > 
> >   What are the difference between jboss.xml and JAWS.xml ? What are
> > their purposes?
> > 
> >   Thanks wt
> > 
> > Rickard Öberg wrote:
> > >
> > > Hi!
> > >
> > > Ricky wrote:
> > > >   May i know what do you mean by updating the clients 
> jnp-client.jar
> > > > file.
> > > >
> > > >   Please forgive me that I asked so many question cause 
> i just started
> > > > to use jboss.
> > >
> > > Copy all files from /client to your clients classpath.
> > >
> > > /Rickard
> > >
> > > --
> > > Rickard Öberg
> > >
> > > Email: [EMAIL PROTECTED]
> > >
> > > --
> > > --
> > > To subscribe:[EMAIL PROTECTED]
> > > To unsubscribe:  [EMAIL PROTECTED]
> > > List Help?:  [EMAIL PROTECTED]
> > 
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> > 
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> 
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]
> 





-
This message (including any attachments) contains confidential, proprietary
or privileged information intended for a specific purpose and individual(s),
and is protected by law.  If you receive this message in error, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender.  Any unauthorized disclosure,
copying or distribution of any part of this message, or the taking of any
unauthorized action based on it, is strictly prohibited.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-23 Thread Ricky

Hi Mica, 

  The PortableRemoteObject.narrow is for narrowing remote reference.
  I have did it for a while without any errors.
 
  I did not see why i must cast it like you have did it.
  Some more explaination please.

Thanks.

MicaCooper wrote:
> 
> I see one thing wrong...
> You should be doing a cast like this:
> 
> Enterprise1Home bh =
> (Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enterprise1"),Enter
> prise1.class);
> 
> The PortableRemoteObject.narrow is a requirement of EJB1.1.
> 
> Mica Cooper
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
> Sent: Friday, February 23, 2001 6:45 PM
> To: JBoss-User
> Subject: Re: [jBoss-User]
> Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject
> 
> Hi Rickard ,
> 
>   Thanks for your kind advise.
> 
>   I have  another weird problems in Jboss , we try to execute the code
> below .
> 
>  InitialContext ctx = new InitialContext(props);
>  Enterprise1Home bh = (Enterprise1Home)ctx.lookup("Enterprise1");
>  bh.create("2","weetat");
> 
>   All are well except it did not update in my postgresql7.0 table.The
> record is not display in the table.
>   Do i need to set anything in the database ? Or did i need to create
> JAWS.xml or Jboss.xml ?
> 
>   What are the difference between jboss.xml and JAWS.xml ? What are
> their purposes?
> 
>   Thanks wt
> 
> Rickard Öberg wrote:
> >
> > Hi!
> >
> > Ricky wrote:
> > >   May i know what do you mean by updating the clients jnp-client.jar
> > > file.
> > >
> > >   Please forgive me that I asked so many question cause i just started
> > > to use jboss.
> >
> > Copy all files from /client to your clients classpath.
> >
> > /Rickard
> >
> > --
> > Rickard Öberg
> >
> > Email: [EMAIL PROTECTED]
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




RE: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-23 Thread MicaCooper

I see one thing wrong...
You should be doing a cast like this:

Enterprise1Home bh =
(Enterprise1Home)PortableRemoteObject.narrow(ctx.lookup("Enterprise1"),Enter
prise1.class);

The PortableRemoteObject.narrow is a requirement of EJB1.1.

Mica Cooper


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ricky
Sent: Friday, February 23, 2001 6:45 PM
To: JBoss-User
Subject: Re: [jBoss-User]
Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject


Hi Rickard ,

  Thanks for your kind advise.

  I have  another weird problems in Jboss , we try to execute the code
below .


 InitialContext ctx = new InitialContext(props);
 Enterprise1Home bh = (Enterprise1Home)ctx.lookup("Enterprise1");
 bh.create("2","weetat");

  All are well except it did not update in my postgresql7.0 table.The
record is not display in the table.
  Do i need to set anything in the database ? Or did i need to create
JAWS.xml or Jboss.xml ?

  What are the difference between jboss.xml and JAWS.xml ? What are
their purposes?

  Thanks wt



Rickard Öberg wrote:
>
> Hi!
>
> Ricky wrote:
> >   May i know what do you mean by updating the clients jnp-client.jar
> > file.
> >
> >   Please forgive me that I asked so many question cause i just started
> > to use jboss.
>
> Copy all files from /client to your clients classpath.
>
> /Rickard
>
> --
> Rickard Öberg
>
> Email: [EMAIL PROTECTED]
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-23 Thread Ricky

Hi Rickard ,

  Thanks for your kind advise.
   
  I have  another weird problems in Jboss , we try to execute the code
below .

  
 InitialContext ctx = new InitialContext(props);
 Enterprise1Home bh = (Enterprise1Home)ctx.lookup("Enterprise1");
 bh.create("2","weetat"); 

  All are well except it did not update in my postgresql7.0 table.The
record is not display in the table.
  Do i need to set anything in the database ? Or did i need to create
JAWS.xml or Jboss.xml ?

  What are the difference between jboss.xml and JAWS.xml ? What are
their purposes?

  Thanks wt

   

Rickard Öberg wrote:
> 
> Hi!
> 
> Ricky wrote:
> >   May i know what do you mean by updating the clients jnp-client.jar
> > file.
> >
> >   Please forgive me that I asked so many question cause i just started
> > to use jboss.
> 
> Copy all files from /client to your clients classpath.
> 
> /Rickard
> 
> --
> Rickard Öberg
> 
> Email: [EMAIL PROTECTED]
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-23 Thread Rickard Öberg

Hi!

Ricky wrote:
>   May i know what do you mean by updating the clients jnp-client.jar
> file.
> 
>   Please forgive me that I asked so many question cause i just started
> to use jboss.

Copy all files from /client to your clients classpath.

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-22 Thread Ricky

Hi Richard , 

  May i know what do you mean by updating the clients jnp-client.jar
file.

  Please forgive me that I asked so many question cause i just started
to use jboss.

  Thanks

Rickard Öberg wrote:
> 
> Hi!
> 
> Ricky wrote:
> >Now I can accessed the ejb however I have the error :
> >
> >java.lang.ClassCastException: java.rmi.MarshalledObject
> > at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:98)
> > at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
> > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:272)
> > at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
> > at javax.naming.InitialContext.lookup(InitialContext.java:354)
> > at mybean.Untitled1.main(Untitled1.java:28)
> 
> Try updating the clients jnp-client.jar file.
> 
> /Rickard
> 
> >
> >   Thanks weetat.
> >
> >
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > If you are calling your ejb from another ejb you have to use the following
> > > statement:
> > >
> > > Object home = ctx.lookup("java:comp/env/ejb/test");
> > >
> > > assuming you have linked your ejb to the other ejb in the deployment descriptor 
>using the following elements:
> > >
> > > 
> > >  ejb/test
> > >  Session
> > >  package.testhome
> > >  package.testremote
> > >  test
> > > 
> > >
> > > Of course, you will have to replace package with the package of test and 
>testhome with what ever you called the home interface of test and testremote
> > > whatever you
> > > called the remote interface of test.
> > >
> > > If you happen to call your ejb from a client running outside of jboss you will 
>have to use the following statements:
> > >
> > > Properties props = new Properties();
> > > props.put(Context.INITIAL_CONTEXT_FACTORY, 
>"org.jnp.interfaces.NamingContextFactory");
> > > props.put(Context.PROVIDER_URL, "localhost:1099");
> > > Context ctx = new InitialContext(props);
> > > Object ref = ctx.lookup("test");
> > >
> > > If your client is running on another machine, you have to replace localhost with 
>the name of the server.
> > >
> > > I hope this helps!
> > >
> > > Thomas Kirsch
> > >
> > > --
> > > --
> > > To subscribe:[EMAIL PROTECTED]
> > > To unsubscribe:  [EMAIL PROTECTED]
> > > List Help?:  [EMAIL PROTECTED]
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> 
> --
> Rickard Öberg
> 
> Email: [EMAIL PROTECTED]
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re:[jBoss-User]java.lang.ClassCastException:java.rmi.MarshalledObject

2001-02-22 Thread Rickard Öberg

Hi!

Ricky wrote:
>Now I can accessed the ejb however I have the error :
> 
>java.lang.ClassCastException: java.rmi.MarshalledObject
> at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:98)
> at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:272)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
> at javax.naming.InitialContext.lookup(InitialContext.java:354)
> at mybean.Untitled1.main(Untitled1.java:28)

Try updating the clients jnp-client.jar file.

/Rickard

> 
>   Thanks weetat.
> 
> 
> 
> [EMAIL PROTECTED] wrote:
> >
> > If you are calling your ejb from another ejb you have to use the following
> > statement:
> >
> > Object home = ctx.lookup("java:comp/env/ejb/test");
> >
> > assuming you have linked your ejb to the other ejb in the deployment descriptor 
>using the following elements:
> >
> > 
> >  ejb/test
> >  Session
> >  package.testhome
> >  package.testremote
> >  test
> > 
> >
> > Of course, you will have to replace package with the package of test and testhome 
>with what ever you called the home interface of test and testremote
> > whatever you
> > called the remote interface of test.
> >
> > If you happen to call your ejb from a client running outside of jboss you will 
>have to use the following statements:
> >
> > Properties props = new Properties();
> > props.put(Context.INITIAL_CONTEXT_FACTORY, 
>"org.jnp.interfaces.NamingContextFactory");
> > props.put(Context.PROVIDER_URL, "localhost:1099");
> > Context ctx = new InitialContext(props);
> > Object ref = ctx.lookup("test");
> >
> > If your client is running on another machine, you have to replace localhost with 
>the name of the server.
> >
> > I hope this helps!
> >
> > Thomas Kirsch
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User]RE: [jBoss-User] Client cant find class

2001-02-22 Thread Scott Warren
Title: RE: [jBoss-User] Client cant find class





Have you got jboss-client.jar and ejb.jar in your clients class path ?


Regards



Scott Warren
Lead Internet Technologies Developer
-
Phone: +61 3 5222 6240
mailto:  [EMAIL PROTECTED]
web: www.advancedresource.com.au
-



-Original Message-
From: Richard Keene [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 22 February 2001 10:50 AM
To: JBoss-User
Subject: [jBoss-User] Client cant find class



I have a test client I am writing for a simple Hello bean.
When the client runs I get...


Got context
Got reference
Got HelloHome
Trying to get Hello instance handle...
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/system/SecurityAssociation
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.getPrincipal(GenericProxy.java:57)
    at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:217)
    at $Proxy0.create(Unknown Source)
    at HelloClient.main(HelloClient.java:27)


Richard Keene
VP Development
iCentris.com
801-201-0969
[EMAIL PROTECTED]
http://www.icentris.com
  




--
--
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]





Re: [jBoss-User] Re: [jBoss-User]

2001-02-18 Thread Ole Husgaard

Hi,

I probably cannot help you much here,
since I do not use Tomcat. (Well, I
downloaded it yesterday for the first
time.) But you should be adviced that
there still seems to be some JNDI
issues with the latest and greatest
CVS and the new Tomcat service.

However, there are plenty of Tomcat
users here that are probably able to
help, if given the information they
need from you:
- Versions you use of various softwares.
- Precise problem description.
- Server and/or client trace, if it shows
  something that is unusual or indicates
  a problem.
And it often helps to focus at one
problem at a time.

Good luck.


Best Regards,

Ole Husgaard.


faisal wrote:
> 
> Hi Ole Husgaard many thinks for your reply& my apology for the HTML mail!
> just a question to answer  if  u spare time to explain this if possible:
> The Client Servlets and Jsp seems to be unable to call my beans classes on
> jboss-Tomcat integration .I  ve  tried many of the "tricks" I found in  the
> mainling list but still I cloudn ' t do it
> my application hierachy seems to be perfect it runs well on
> other servers such as Orion .I got many exceptions first but when I put the
> whole bean interfaces and bean classes in WEB-INF/classes  dir  of the WAR
> file -now I can see no exception and the whole thing got of my hands to
> figure  it out .I ve just started trying jboss .I was try jboss-Jetty
> integration but I don't think that there is Servlet engine open source-
> project more mature than Tomcat3.2
> thanks for any suggestion
> faisal
> 
> - Original Message -
> From: "Ole Husgaard" <[EMAIL PROTECTED]>
> To: "JBoss-User" <[EMAIL PROTECTED]>
> Sent: Sunday, February 18, 2001 3:10 PM
> Subject: [jBoss-User] Re: [jBoss-User]
> 
> > Hi,
> >
> > I don't like HTML mail, but since you replied
> > in plain text to Juha, here goes:
> >
> > Looks to me like the file is truncated, that
> > would give exactly the problem you see here.
> >
> > I also recall that there was some problem
> > with slow copy on some OS, that made the
> > deployer read the file faster than it was
> > written when copied to the deploy dir.
> > Not sure if this is fixed, as I never saw
> > it myself.
> >
> >
> > Best regards,
> >
> > Ole Husgaard.
> >
> >
> > > faisal wrote:
> > >
> > > Hi
> > > can somebody,please, explain to me why an application can be deployed
> > > in Jboss by simply putting it in deploy dir but when I  try to deploy it
> using thr J2EE deployer I get this:
> > > The MBean [J2EE:service=J2eeDeployer] throws an MBeanException when
> calling [deploy]:
> > > java.io.EOFException: Unexpected end of ZLIB input stream ;
> > > Respect !
> > > faisal
> >
> >
> > --
> > --
> > To subscribe:[EMAIL PROTECTED]
> > To unsubscribe:  [EMAIL PROTECTED]
> > List Help?:  [EMAIL PROTECTED]
> >
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2001-02-18 Thread faisal

Hi Ole Husgaard many thinks for your reply& my apology for the HTML mail!
just a question to answer  if  u spare time to explain this if possible:
The Client Servlets and Jsp seems to be unable to call my beans classes on
jboss-Tomcat integration .I  ve  tried many of the "tricks" I found in  the
mainling list but still I cloudn ' t do it
my application hierachy seems to be perfect it runs well on
other servers such as Orion .I got many exceptions first but when I put the
whole bean interfaces and bean classes in WEB-INF/classes  dir  of the WAR
file -now I can see no exception and the whole thing got of my hands to
figure  it out .I ve just started trying jboss .I was try jboss-Jetty
integration but I don't think that there is Servlet engine open source-
project more mature than Tomcat3.2
thanks for any suggestion
faisal


- Original Message -
From: "Ole Husgaard" <[EMAIL PROTECTED]>
To: "JBoss-User" <[EMAIL PROTECTED]>
Sent: Sunday, February 18, 2001 3:10 PM
Subject: [jBoss-User] Re: [jBoss-User]


> Hi,
>
> I don't like HTML mail, but since you replied
> in plain text to Juha, here goes:
>
> Looks to me like the file is truncated, that
> would give exactly the problem you see here.
>
> I also recall that there was some problem
> with slow copy on some OS, that made the
> deployer read the file faster than it was
> written when copied to the deploy dir.
> Not sure if this is fixed, as I never saw
> it myself.
>
>
> Best regards,
>
> Ole Husgaard.
>
>
> > faisal wrote:
> >
> > Hi
> > can somebody,please, explain to me why an application can be deployed
> > in Jboss by simply putting it in deploy dir but when I  try to deploy it
using thr J2EE deployer I get this:
> > The MBean [J2EE:service=J2eeDeployer] throws an MBeanException when
calling [deploy]:
> > java.io.EOFException: Unexpected end of ZLIB input stream ;
> > Respect !
> > faisal
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-02-18 Thread Ole Husgaard

Hi,

I don't like HTML mail, but since you replied
in plain text to Juha, here goes:

Looks to me like the file is truncated, that
would give exactly the problem you see here.

I also recall that there was some problem
with slow copy on some OS, that made the
deployer read the file faster than it was
written when copied to the deploy dir.
Not sure if this is fixed, as I never saw
it myself.


Best regards,

Ole Husgaard.


> faisal wrote:
> 
> Hi
> can somebody,please, explain to me why an application can be deployed
> in Jboss by simply putting it in deploy dir but when I  try to deploy it using thr 
>J2EE deployer I get this:
> The MBean [J2EE:service=J2eeDeployer] throws an MBeanException when calling [deploy]:
> java.io.EOFException: Unexpected end of ZLIB input stream ;
> Respect !
> faisal


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-02-15 Thread Toby Allsopp

1. Enter a subject for your messages.

2. Read the spec, there are even examples in there.

3. Demanding a prompt response is not polite when people are helping you
   for free.

Toby.

On Thu, Feb 15, 2001 at 03:28:09PM +0600, Indika Fernando wrote:
> I am using BMP using JBOss server and have the following method in my bean.
> 
> public void setEntityContext(EntityContext ctx) throws RemoteException
>  {
>   this.ctx = ctx;
>  env = ctx.getEnvironment();
>  }
> But this is Deprecated:
> Deprecated. Use the JNDI naming context java:comp/env to access enterprise
> bean's environment.
> 
> How should I code it...thanx in advance
> need a quick reply..


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-02-04 Thread Tom Cook

Do you have a wierd encoding?  Or an ejb-jar.xml on your classpath?

Tom

On Sat, 03 Feb 2001, you wrote:
> I am new to jboss.
> I tried to apply some web applications I installed on Orion
> Every time the jboss deployer tells me that the deployment descriptor for
> the  ejb.jar is invalid
> Does anybody,please, knows what is special about jboss ejb.jar .All that I
> know is that the jboss.jar is opional
> Any suggestion please
> thanks for your help
> 
> 
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re: [jBoss-User]Re: [jBoss-User] Problem about CMP? Big Bug withJBoss CMP??

2001-01-12 Thread levels

Hi,everyone
   Do you think if there are some problems as following jboss log?

[OracleORCLPool] Stopping
[OracleORCLPool] XA Connection pool OracleORCLPool removed from JNDI
[OracleORCLPool] XA Connection pool OracleORCLPool shut down
[OracleORCLPool] Error stopping service 
'DefaultDomain:name=OracleORCLPool,service=XADataSource':   
javax.management.RuntimeMBeanException: RuntimeException thrown in operation destroy
[OracleORCLPool] Unable to stop MBean 
'DefaultDomain:name=OracleORCLPool,service=XADataSource'

I don't know if this is cause of the problem.

Please help!
levelsè²æìr¸›z6è²Ë¬zº'–+-ŠäŠx¢¢dèº{.nÇ+‰·£n‹,ºÇ«¡÷åŠËp¢¹"žh‚Ç(˜¸¬´w¥¦:'ŠäŠx¢¢


[jBoss-User] Re: [jBoss-User]

2001-01-08 Thread Christian Riege

On Mon, Jan 08, 2001 at 05:57:06AM -0500, MEENAKSHISUNDARAM Anand wrote:
> CAN ANYONE HELP ME IN HOW TO START THE TOMCAT PROGRAMATICALLY.I DON'T WANT
> TO USE JBOSS

http://jakarta.apache.org/

and please stop screaming.

christian


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-01-08 Thread Rickard Öberg

Hi!

"Andersson, Jan" wrote:
> I've been working my way through the "Beginning EJB programming using jBoss
> (Windows)" and have now started to create some beans by myself. Some
> problems I've come across have had me thinking of the following things found
> in "Beginning ...".
> 
> The structure for the interest bean example:
> 
> com
> web_tomorrow
> interest
> {java source and class files here}
> 
> META-INF
> ejb-jar.xml
> jboss.xml (optional)
> 
> Why is META-INF on top of the package/directory structure, instead of in the
> interest directory? There will probably be lots of beans in a package
> structure. Do the all have to share the same META-INF and, consequently, the
> same ejb-jar.xml?
> 
> The following sentence from step three in "Beginning...":
> 
> "The deployment descriptor must be called ejb-jar.xml and it must be in the
> directory .\META-INF."
> 
> The dot in .\META-INF of course is the reference to the current directory,
> but what is the current directory?

The root, i.e. as you have shown above.

Yes, that means that the info of all beans in the same structure should
be in the same ejb-jar.xml file. That's the whole point: logically
related beans are described as a unit, a.k.a. an EJB JAR file. If you
want one bean per JAR, then you have several completely separate
directory structures.

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2001-01-04 Thread Tobias Frech

Hi!
One .jar could contain and normally does contain multiple beans. All the
information for deployment of these beans goes in just one ejb-jar.xml.
The contents of ejb-jar.xml are specified by the EJB specification from
SUN. Into the same dir (META-INF) goes jboss.xml and jaws.xml. You don't
need them to start. jboss.xml specifies settings which are special to
jBoss. jaws.xml specifies special mappings for storing CMP beans
(container managed persistence) into a database. To start you only need
ejb-jar.xml. JBoss wil use good default settings for everything else.

Good luck,
Tobias

"Andersson, Jan" wrote:
> 
> Hi!
> 
> I've been working my way through the "Beginning EJB programming using jBoss
> (Windows)" and have now started to create some beans by myself. Some
> problems I've come across have had me thinking of the following things found
> in "Beginning ...".
> 
> The structure for the interest bean example:
> 
> com
> web_tomorrow
> interest
> {java source and class files here}
> 
> META-INF
> ejb-jar.xml
> jboss.xml (optional)
> 
> Why is META-INF on top of the package/directory structure, instead of in the
> interest directory? There will probably be lots of beans in a package
> structure. Do the all have to share the same META-INF and, consequently, the
> same ejb-jar.xml?
> 
> The following sentence from step three in "Beginning...":
> 
> "The deployment descriptor must be called ejb-jar.xml and it must be in the
> directory .\META-INF."
> 
> The dot in .\META-INF of course is the reference to the current directory,
> but what is the current directory?
> 
> Regards,
> Jan Andersson
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> List Help?:  [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




Re : [jBoss-User] RE: [jBoss-User] why ejbcreate doesn't insert rows into table?

2000-12-30 Thread levels

Thank you.It's OK.
This is my source.
I want to know what wrong is with my original source.
What difference is between my original source nad new source?

Thank you
levels

_original source__
/*
 *
 * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
 *
 * This software is the proprietary information of Sun Microsystems, Inc.
 * Use is subject to license terms.
 *
 */
package com.sasgz.ejb.account;

import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;

public class AccountEJB implements EntityBean {

private String id;
private String firstName;
private String lastName;
private double balance;
private EntityContext context;
private Connection con;
private String dbName = "java:comp/env/jdbc/AccountDB";

public void debit(double amount)
   throws InsufficientBalanceException {

   if (balance - amount < 0) {
   throw new InsufficientBalanceException();
   }
   balance -= amount;
}

public void credit(double amount) {

   balance += amount;
}

public String getFirstName() {

   return firstName;
}

public String getLastName() {

   return lastName;
}

public double getBalance() {

   return balance;
}

public String ejbCreate(String id, String firstName,
   String lastName, double balance)
   throws CreateException {

   if (balance < 0.00) {
  throw new CreateException
 ("A negative initial balance is not allowed.");
   }

   try {
  insertRow(id, firstName, lastName, balance);
   } catch (Exception ex) {
   throw new EJBException("ejbCreate: " +
  ex.getMessage());
   }

   this.id = id;
   this.firstName = firstName;
   this.lastName = lastName;
   this.balance = balance;

   return id;
}

   public String ejbFindByPrimaryKey(String primaryKey)
  throws FinderException {

  boolean result;

  try {
 result = selectByPrimaryKey(primaryKey);
   } catch (Exception ex) {
   throw new EJBException("ejbFindByPrimaryKey: " +
  ex.getMessage());
   }
  if (result) {
 return primaryKey;
  }
  else {
 throw new ObjectNotFoundException
("Row for id " + primaryKey + " not found.");
  }
   }

   public Collection ejbFindByLastName(String lastName)
  throws FinderException {

  Collection result;

  try {
 result = selectByLastName(lastName);
   } catch (Exception ex) {
   throw new EJBException("ejbFindByLastName " +
  ex.getMessage());
   }

  if (result.isEmpty()) {
 throw new ObjectNotFoundException("No rows found.");
  }
  else {
 return result;
  }
   }

   public Collection ejbFindInRange(double low, double high)
  throws FinderException {

  Collection result;

  try {
 result = selectInRange(low, high);

   } catch (Exception ex) {
   throw new EJBException("ejbFindInRange: " +
  ex.getMessage());
   }
  if (result.isEmpty()) {
 throw new ObjectNotFoundException("No rows found.");
  }
  else {
 return result;
  }
   }

   public void ejbRemove() {

  try {
 deleteRow(id);
   } catch (Exception ex) {
   throw new EJBException("ejbRemove: " +
  ex.getMessage());
   }
   }

   public void setEntityContext(EntityContext context) {

  this.context = context;
  try {
 makeConnection();
  } catch (Exception ex) {
  throw new EJBException("Unable to connect to database. " +
 ex.getMessage());
  }
   }

   public void unsetEntityContext() {

  try {
 con.close();
  } catch (SQLException ex) {
  throw new EJBException("unsetEntityContext: " + ex.getMessage());
  }
   }

   public void ejbActivate() {

  id = (String)context.getPrimaryKey();
   }

   public void ejbPassivate() {

  id = null;
   }

   public void ejbLoad() {

  try {
 loadRow();
   } catch (Exception ex) {
   throw new EJBException("ejbLoad: " +
  ex.getMessage());
   }
   }

   public void ejbStore() {

  try {
 storeRow();
   } catch (Exception ex) {
   throw new EJBException("ejbLoad: " +
  ex.getMessage());
   }
   }


   public void ejbPostCreate(String id, String firstName,
  String lastName, double balance) { }


/*** Database Routines */

   private void makeConnection() throws NamingException, SQLException {

  

Re: [jBoss-User] RE: [jBoss-User] why ejbcreate doesn't insertrows into table?

2000-12-30 Thread Craig Day


you need to re-check your code. The connection you are getting
back from ds.getConnection() is not the same one you are using
in insertRow()

craig


At 20:40 30/12/00, you wrote:
>I modify my program according to your advice.
>But errors occur.
>I don't know what bring the errors.
>
>On jboss server:
>[AccountBean] Connected to Oracle!
>[AccountBean] TRANSACTION ROLLBACK EXCEPTION:ejbCreate: null; nested 
>exception i
>s:
> javax.ejb.EJBException: ejbCreate: null
>[AccountBean] javax.ejb.EJBException: ejbCreate: null
>[AccountBean]   at 
>com.sasgz.ejb.account.AccountEJB.ejbCreate(AccountEJB.java:75
>)
>[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
>[AccountBean]   at 
>org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPP
>ersistenceManager.java:120)
>[AccountBean]   at 
>org.jboss.ejb.EntityContainer.createHome(EntityContainer.java
>:441)
>[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
>[AccountBean]   at 
>org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome
>(EntityContainer.java:639)
>[AccountBean]   at 
>org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
>Home(EntitySynchronizationInterceptor.java:160)
>[AccountBean]   at 
>org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En
>tityInstanceInterceptor.java:86)
>[AccountBean]   at 
>org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
>orCMT.java:135)
>[AccountBean]   at 
>org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
>InterceptorCMT.java:263)
>[AccountBean]   at 
>org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
>orCMT.java:86)
>[AccountBean]   at 
>org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
>Interceptor.java:126)
>[AccountBean]   at 
>org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIntercepto
>r.java:106)
>[AccountBean]   at 
>org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java
>:316)
>[AccountBean]   at 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
>Home(JRMPContainerInvoker.java:143)
>[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
>[AccountBean]   at 
>sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
>a:241)
>[AccountBean]   at sun.rmi.transport.Transport$1.run(Transport.java:142)
>[AccountBean]   at java.security.AccessController.doPrivileged(Native Method)
>[AccountBean]   at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
>[AccountBean]   at 
>sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
>t.java:443)
>[AccountBean]   at 
>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
>ransport.java:643)
>[AccountBean]   at java.lang.Thread.run(Thread.java:484)
>
>on client:
>Caught an exception.
>java.rmi.ServerException: RemoteException occurred in server thread; 
>nested exception is:
> javax.transaction.TransactionRolledbackException: ejbCreate: 
> null; nested exception is:
> javax.ejb.EJBException: ejbCreate: null
>javax.transaction.TransactionRolledbackException: ejbCreate: null; nested 
>exception is:
> javax.ejb.EJBException: ejbCreate: null
>javax.ejb.EJBException: ejbCreate: null
> at 
> 
>sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
> at 
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
> at 
> org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown 
> Source)
> at 
> org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:221)
> at $Proxy0.create(Unknown Source)
> at com.sasgz.ejb.account.AccountClient.main(AccountClient.java:34)
>
>__jboss.conf___
>ARCHIVE="jboss.jar,oracle816jdbc.zip" CODEBASE="../../lib/ext/">
> 
>  VALUE="org.jboss.minerva.xa.XADataSourceImpl">
>
>
>__jboss.jcml
>
>
> name="URL">jdbc:oracle:thin:@localhost:1521:orcl
>120
>scott
>0
>tiger
>false
>false
>false
>true
>12
>180
>false
>false
>1.0
>0
>  
>
>___Ejb class
>/*
>  *
>  * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
>  *
>  * This software is the proprietary information of Sun Microsystems, Inc.
>  * Use is subject to license terms.
>  *
>  */
>package com.sasgz.ejb.account;
>
>import java.sql.*;
>import javax.sql.*;
>import java.util.*;
>import javax.ejb.*;
>import javax.naming.*;
>
>public class AccountEJB implements EntityBean {
>
> private String id;
> private String firstName;
> private String lastName;
> private double balance;
> private EntityContext context;
> private Connection con;
> private String dbName = 

Re: [jBoss-User] RE: [jBoss-User] why ejbcreate doesn't insertrows into table?

2000-12-30 Thread levels

I modify my program according to your advice.
But errors occur.
I don't know what bring the errors.

On jboss server:
[AccountBean] Connected to Oracle!
[AccountBean] TRANSACTION ROLLBACK EXCEPTION:ejbCreate: null; nested exception i
s:
javax.ejb.EJBException: ejbCreate: null
[AccountBean] javax.ejb.EJBException: ejbCreate: null
[AccountBean]   at com.sasgz.ejb.account.AccountEJB.ejbCreate(AccountEJB.java:75
)
[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
[AccountBean]   at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPP
ersistenceManager.java:120)
[AccountBean]   at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java
:441)
[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
[AccountBean]   at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome
(EntityContainer.java:639)
[AccountBean]   at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke
Home(EntitySynchronizationInterceptor.java:160)
[AccountBean]   at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(En
tityInstanceInterceptor.java:86)
[AccountBean]   at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxIntercept
orCMT.java:135)
[AccountBean]   at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(Tx
InterceptorCMT.java:263)
[AccountBean]   at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxIntercept
orCMT.java:86)
[AccountBean]   at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(Security
Interceptor.java:126)
[AccountBean]   at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIntercepto
r.java:106)
[AccountBean]   at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java
:316)
[AccountBean]   at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke
Home(JRMPContainerInvoker.java:143)
[AccountBean]   at java.lang.reflect.Method.invoke(Native Method)
[AccountBean]   at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav
a:241)
[AccountBean]   at sun.rmi.transport.Transport$1.run(Transport.java:142)
[AccountBean]   at java.security.AccessController.doPrivileged(Native Method)
[AccountBean]   at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[AccountBean]   at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor
t.java:443)
[AccountBean]   at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT
ransport.java:643)
[AccountBean]   at java.lang.Thread.run(Thread.java:484)

on client:
Caught an exception.
java.rmi.ServerException: RemoteException occurred in server thread; nested exception 
is:
javax.transaction.TransactionRolledbackException: ejbCreate: null; nested 
exception is:
javax.ejb.EJBException: ejbCreate: null
javax.transaction.TransactionRolledbackException: ejbCreate: null; nested exception 
is:
javax.ejb.EJBException: ejbCreate: null
javax.ejb.EJBException: ejbCreate: null
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:221)
at $Proxy0.create(Unknown Source)
at com.sasgz.ejb.account.AccountClient.main(AccountClient.java:34)

__jboss.conf___





__jboss.jcml

   
   jdbc:oracle:thin:@localhost:1521:orcl
   120
   scott
   0
   tiger
   false
   false
   false
   true
   12
   180
   false
   false
   1.0
   0
 

___Ejb class
/*
 *
 * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
 *
 * This software is the proprietary information of Sun Microsystems, Inc.
 * Use is subject to license terms.
 *
 */
package com.sasgz.ejb.account;

import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;

public class AccountEJB implements EntityBean {

private String id;
private String firstName;
private String lastName;
private double balance;
private EntityContext context;
private Connection con;
private String dbName = "java:comp/env/jdbc/AccountDB";

private DataSource ds = null;

public void debit(double amount)
   throws InsufficientBalanceException {

   if (balance - amount < 0) {
   throw new InsufficientBalanceException();
   }
   balance -= amount;
}

public void credit(double amount) {

   balance += amount;
}

public String getFirstName() {

 

Re: [jBoss-User] RE: [jBoss-User] why ejbcreate doesn't insertrows into table?

2000-12-30 Thread Craig Day


the close doesnt actually close the connection, it returns the connection
to the connection pool behind the datasource. Setup your oracle service
as described in the docco using the latest oracle jdbc driver that supports
the sql extensions.

craig


At 19:41 30/12/00, you wrote:
>I think that when I create a new instance,setEntityContext() will run once 
>in EJBbean.
>In your sample code,you disconnect the database session in ejbCreate().
>If I want to remove the row in the table,I must connect the database again.
>I think that it'll reduce the efficiency of program.
>If I don't disconnect the database session in ejbCreate(),I'll get the 
>same result as before.
>Maybe I misundertand your issue.
>
>Thank you
>levels
>
>
>
>-原始邮件-
>发件人: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]代表 Craig Day
>发送时间: 2000年12月30日 18:49
>收件人: jBoss
>主题: Re: [jBoss-User] 答复: [jBoss-User] why ejbcreate doesn't =
>?gb2312?B?IGluc2VydCByb3dzIGludG8gdGFibGU/?
>
>
>At 18:30 30/12/00, you wrote:
> >Please tell me how to cache the data source.
> >But I don't know why EJB can't delete the row from table account.
> >Thank you.
>
>You can do it in setEntityContext. Heres some sample code:
>
>public class CategoryBean extends CategoryInfo implements EntityBean {
>
>  private transient boolean isDirty = false;
>  private EntityContext context;
>  private DataSource ds = null;
>  private static final String dsName = "java:/craigd";
>
>  /**
>  * Set the entity context for this bean and lookup the DataSource.
>  */
>  public void setEntityContext(final EntityContext context)
>  throws EJBException, RemoteException {
>  log("in setEntityContext()");
>
>  this.context = context;
>  try {
>  InitialContext ic = new InitialContext();
>  ds = (DataSource)ic.lookup(dsName);
>  }
>  catch (Exception e) {
>  throw new EJBException("Unable to get datasource:" +
>e.getMessage());
>  }
>  }
>
>
>and then use it like this:
>
>  public String ejbCreate(String categoryID, String categoryName)
>  throws RemoteException, CreateException {
>
>  Connection conn = null;
>  PreparedStatement pstmt = null;
>
>  log("in ejbCreate()");
>
>  try {
>  conn = ds.getConnection();
>  etc. etc. etc.
>  }
>  catch (SQLException e) {
>  throw new CreateException("ejbCreate: " + e.getMessage());
>  }
>  finally {
>  try { pstmt.close(); } catch (Exception ex) { }
>  try { conn.close(); } catch (Exception ex) { }
>  }
>  }
>
>cheers
>craig
>
>
>
>
> >And I find if I start a session to oracle by scott/tiger through
> >sql*plus,then start the test client,
> >the application will freeze.
> >
> >levels
> >
> >-原始邮件-
> >发件人: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED]]代表 Jay Walters
> >发送时间: 2000年12月30日 2:49
> >收件人: 'jBoss'
> >主题: RE: [jBoss-User] why ejbcreate doesn't insert rows into table?
> >
> >
> >I don't believe you should be allocating a database connection in the
> >ejbActivate.  You can cache the data source so you don't have to do the JNDI
> >lookup everytime.  It sounds like in the end it's doing the right thing,
> >inserting 4 records.  I would try and allocate the connection from within
> >the transaction and close it before the end.  I am guessing this will get
> >things working as you expect.
> >
> >Cheers
> >Jay Walters
> >
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, December 29, 2000 6:23 AM
> >To: [EMAIL PROTECTED]
> >Subject: [jBoss-User] why ejbcreate doesn't insert rows into table?
> >
> >
> > I'm using JBoss 2.0 and oracle8.0.6.I config as BMP.When I use client
> >access EJB,the program just check one inserted row.But in fact,I inert 5
> >rows and remove 1 row.But when I access oracle through sql*net,there is only
> >one row.After I turn off JBoss,I access oracle through
> >sql*net again,and find that there is 4 rows int the table. I don't know how
> >to solve this problem. Please Help me. Thank you.
> >
> >___EJB
> >CLASS___
> >___
> >/*
> >  *
> >  * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
> >  *
> >  * This software is the proprietary information of Sun Microsystems, Inc.
> >  * Use is subject to license terms.
> >  *
> >  */
> >package com.sasgz.ejb.account;
> >
> >import java.sql.*;
> >import javax.sql.*;
> >import java.util.*;
> >import javax.ejb.*;
> >import javax.naming.*;
> >
> >public class AccountEJB implements EntityBean {
> >
> > private String id;
> > private String firstName;
> > private String lastName;
> > private double balance;
> > private EntityContext 

Re: [jBoss-User] RE: [jBoss-User] why ejbcreate doesn't insertrows into table?

2000-12-30 Thread levels

I think that when I create a new instance,setEntityContext() will run once in EJBbean.
In your sample code,you disconnect the database session in ejbCreate().
If I want to remove the row in the table,I must connect the database again.
I think that it'll reduce the efficiency of program.
If I don't disconnect the database session in ejbCreate(),I'll get the same result as 
before.
Maybe I misundertand your issue.

Thank you
levels



-原始邮件-
发件人: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]代表 Craig Day
发送时间: 2000年12月30日 18:49
收件人: jBoss
主题: Re: [jBoss-User] 答复: [jBoss-User] why ejbcreate doesn't =
?gb2312?B?IGluc2VydCByb3dzIGludG8gdGFibGU/?


At 18:30 30/12/00, you wrote:
>Please tell me how to cache the data source.
>But I don't know why EJB can't delete the row from table account.
>Thank you.

You can do it in setEntityContext. Heres some sample code:

public class CategoryBean extends CategoryInfo implements EntityBean {

 private transient boolean isDirty = false;
 private EntityContext context;
 private DataSource ds = null;
 private static final String dsName = "java:/craigd";

 /**
 * Set the entity context for this bean and lookup the DataSource.
 */
 public void setEntityContext(final EntityContext context)
 throws EJBException, RemoteException {
 log("in setEntityContext()");

 this.context = context;
 try {
 InitialContext ic = new InitialContext();
 ds = (DataSource)ic.lookup(dsName);
 }
 catch (Exception e) {
 throw new EJBException("Unable to get datasource:" + 
e.getMessage());
 }
 }


and then use it like this:

 public String ejbCreate(String categoryID, String categoryName)
 throws RemoteException, CreateException {

 Connection conn = null;
 PreparedStatement pstmt = null;

 log("in ejbCreate()");

 try {
 conn = ds.getConnection();
 etc. etc. etc.
 }
 catch (SQLException e) {
 throw new CreateException("ejbCreate: " + e.getMessage());
 }
 finally {
 try { pstmt.close(); } catch (Exception ex) { }
 try { conn.close(); } catch (Exception ex) { }
 }
 }

cheers
craig




>And I find if I start a session to oracle by scott/tiger through 
>sql*plus,then start the test client,
>the application will freeze.
>
>levels
>
>-原始邮件-
>发件人: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]代表 Jay Walters
>发送时间: 2000年12月30日 2:49
>收件人: 'jBoss'
>主题: RE: [jBoss-User] why ejbcreate doesn't insert rows into table?
>
>
>I don't believe you should be allocating a database connection in the
>ejbActivate.  You can cache the data source so you don't have to do the JNDI
>lookup everytime.  It sounds like in the end it's doing the right thing,
>inserting 4 records.  I would try and allocate the connection from within
>the transaction and close it before the end.  I am guessing this will get
>things working as you expect.
>
>Cheers
>Jay Walters
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 29, 2000 6:23 AM
>To: [EMAIL PROTECTED]
>Subject: [jBoss-User] why ejbcreate doesn't insert rows into table?
>
>
> I'm using JBoss 2.0 and oracle8.0.6.I config as BMP.When I use client
>access EJB,the program just check one inserted row.But in fact,I inert 5
>rows and remove 1 row.But when I access oracle through sql*net,there is only
>one row.After I turn off JBoss,I access oracle through
>sql*net again,and find that there is 4 rows int the table. I don't know how
>to solve this problem. Please Help me. Thank you.
>
>___EJB
>CLASS___
>___
>/*
>  *
>  * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
>  *
>  * This software is the proprietary information of Sun Microsystems, Inc.
>  * Use is subject to license terms.
>  *
>  */
>package com.sasgz.ejb.account;
>
>import java.sql.*;
>import javax.sql.*;
>import java.util.*;
>import javax.ejb.*;
>import javax.naming.*;
>
>public class AccountEJB implements EntityBean {
>
> private String id;
> private String firstName;
> private String lastName;
> private double balance;
> private EntityContext context;
> private Connection con;
> private String dbName = "java:comp/env/jdbc/AccountDB";
>
> public void debit(double amount)
>throws InsufficientBalanceException {
>
>if (balance - amount < 0) {
>throw new InsufficientBalanceException();
>}
>balance -= amount;
> }
>
> public void credit(double amount) {
>

Re: [jBoss-User] Re jBoss-User] BMP bean problems with Oracle 8i

2000-12-20 Thread Tim Yates

> tim,
>
> As far as I can see you are doing everything right. Except for one small
> thing.
> you cast the resultSet directly to OracleResultSet, but the object is
> actually org.jboss.minerva.jdbc.ResultSetInPool. Its a cind of warper.
> You can get the OracleResultSet by calling getUnderlyingResultSet().
>
> Put something like the folloing:
>   ResultSetInPool r = (ResultSetInPool)resultSet;
>   oracle.sql.CLOB clob =
> (oracle.sql.CLOB)((OracleResultSet)r.getUnderlyingResultSet()).getClob(1);
>
> This solves the problem.
>
> Raicho.

It certainly does!!!  Thank you SO much!!!

Tim.

PS:  Now we can stop having emergency meetings ;-)



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re jBoss-User] BMP bean problems with Oracle 8i

2000-12-20 Thread Raicho Minev

tim,

As far as I can see you are doing everything right. Except for one small
thing.
you cast the resultSet directly to OracleResultSet, but the object is
actually org.jboss.minerva.jdbc.ResultSetInPool. Its a cind of warper.
You can get the OracleResultSet by calling getUnderlyingResultSet().

Put something like the folloing:
  ResultSetInPool r = (ResultSetInPool)resultSet;
  oracle.sql.CLOB clob =
(oracle.sql.CLOB)((OracleResultSet)r.getUnderlyingResultSet()).getClob(1);

This solves the problem.

Raicho.



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
List Help?:  [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-12-18 Thread Darius Davidavicius

It depends of the transaction atribute of the entity.
If transaction atribute=REQUIRED transaction goes in the same transaction scope.

If transaction atribute=REQUIR NEW new transaction is started

and there are more transaction atributes
so you cad designe as u want.

D&D


On Mon, 18 Dec 2000 14:41:11 +0530, kvrprasad wrote:

>Hello,
>
>entity beans , as i understand, can not  start their own transactions.
>
>what is design reason behind this?
>
>thanks.
>
>
>
>
>--
>--
>To subscribe:[EMAIL PROTECTED]
>To unsubscribe:  [EMAIL PROTECTED]
>Problems?:   [EMAIL PROTECTED]
>





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-12-18 Thread Rickard Öberg

kvrprasad wrote:
> 
> Hello,
> 
> entity beans , as i understand, can not  start their own transactions.
> 
> what is design reason behind this?

They can start their own transactions, although only implicitly. Refer
to EJB-INTEREST mailing list archives for discussions on this topic.

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-12-09 Thread marc fleury

>
|> so the only problem is that the TM doesn't import a tx created somewhere
|> else.
|>
|> but the rest is in, even though the above problem means it won't work :)
|
|I would agree that everything is in as far as JBoss
|is concerned.
|But when it comes to the TM quite a lot is still missing:
|In particular _all_ the network communications needed for
|the distribution aspects are missing. Also transaction
|logging is not yet implemented though it is needed for
|fail-safe operation in case of hardware and communication
|failures.

a transaction passing a proxy around would be an option, each tx started
somewhere leaves the tm (propagation context) with a stub, we can even
optimize that inVM

fail-safe stuff is higher end... not now...

you know I am really interested in hearing about people saying "I need it
*in production now*" rather than... I tried it cause it is there, and I
can't get it to work.

If that is really needed we can provide the basic distributed proxy fairly
straightforwardly

marc

|
|Best Regards,
|
|Ole Husgaard.
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-12-09 Thread Ole Husgaard

Hi,

marc fleury wrote:
> 
> |If jBoss does not support distributed transactions, does that mean that all
> |transactional attributes are lost when a call is made to a bean running on
> |another server?
> |i.e., transaction checks are no longer made on any methods
> |belonging to said
> |bean, or any methods (its own or another bean's) that it uses to complete a
> |method call?
> |is this correct?
> 
> not really , in fact the exception is because we DO propagate the tx... Ole,
> any plans on the TX stuff?
> 
> so the only problem is that the TM doesn't import a tx created somewhere
> else.
> 
> but the rest is in, even though the above problem means it won't work :)

I would agree that everything is in as far as JBoss
is concerned.
But when it comes to the TM quite a lot is still missing:
In particular _all_ the network communications needed for
the distribution aspects are missing. Also transaction
logging is not yet implemented though it is needed for
fail-safe operation in case of hardware and communication
failures.


Best Regards,

Ole Husgaard.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] RE: [jBoss-User]Calculator sample

2000-11-27 Thread Mathew Mathew

Hi,

I am a new JBoss user and I'm hitting a brick wall pretty early.

I am trying to run/deploy the Calcualator example.

I have been able to deploy the server beans OK.

Howerver I get the following exception when trying to run the client. any
ideas?
what is this library ioser12?


D:\jboss_tomcat\jboss-2.0-FINAL\examples\interest>java -classpath .\;..
b\j2ee.jar;..\..\lib\ext\ejb.jar;..\..\Client\jboss-client.jar;. Intere
Got context
Got reference
ERROR! Shared library ioser12 could not be found.
Exception in thread "main" java.lang.UnsatisfiedLinkError: specialLoadC
at com.sun.corba.ee.internal.util.JDKClassLoader.loadClass(JDKC
at com.sun.corba.ee.internal.util.JDKBridge.loadClassM(JDKBridg
at com.sun.corba.ee.internal.util.JDKBridge.loadClass(JDKBridge
at javax.rmi.CORBA.Util.loadClass(Util.java:215)
at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:306
at javax.rmi.CORBA.Util.(Util.java:54)
at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(Por
at javax.rmi.PortableRemoteObject.(PortableRemoteObject
at InterestClient.main(InterestClient.java:48)
D:\jboss_tomcat\jboss-2.0-FINAL\examples\interest>

thanx,

mathew



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-24 Thread Erik Poupaert (Brutele)

Thanks for giving me a point. I think I wasn't very clear in my mail though,
but what you write is indeed what I meant. Anyway, I would like such
solution.

Another smallish thing.

Shouldn't there be a kind of warning, prominently placed in the docs, about
sharing a db with EJB-, but non-CMP managed changes, and about changes
submitted by applications, that are non-EJB altogether? And about how you
should set your config flags, in case you need this anyway?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Lennart Petersson
Sent: vrijdag 24 november 2000 9:36
To: jBoss
Subject: Re: [jBoss-User] Re: [jBoss-User]


Hi Marc! But I think this guy has a point in what he is saying. If jBoss
offers a JAWS solution where it can create tables if not existent during
deploy then I think it was really nice if it could checkout any changes
in the db schema during redeploy of a bean and:
1) Only give warnings about it or
2) Genereate a script that the user may use to update the db manually or
3) Actually make the update of db schema if and only if the user
confirms this after he has seen the db script.

But I also understand your idea of that jBoss will not manage the db
schema but it would be possible to do and i think that many would like
it or...?

/Lennart

marc fleury skrev:
>
> |Can I "just adjust" the schema manually in database, using statements
like
> |"ALTER TABLE ADD COLUMN ..." or does JAWS maintain a number of
assumptions
> |somewhere about what the schema is, that will then become inconsistent?
>
> You need to provide an object that reflects that schema either 1-1 name
> mapping or jaws.xml to specify the mapping.
>
> |Do I have to stop all services for this or is there a way to ask the
"hot"
> |deployment service to look in for a particular "script" in a .jar or .ear
>
> it can be done hot, you just need to 'redeploy' the correct bean.
>
> |file, that is, a class to instantiate, for example "ConvertDb2to3()"
(with
> |the default constructor), prior to installation, and in which I can use
an
> |appropriate set of statements to adjust the schema.
>
> Yes, again, for the 3rd time, we do not manage your schema, we manage
> objects that reflect your schema.
> Redeploy the bean and you are all set.
>
> Only at deployment time, if the table doesn't exist, will we create a
schema
> for you as a *convenience*.  If the schema exists, and you come from the
DB
> world (poor soul), we don't do anything, so just supply the good bean and
> basta.
>
> |If such is the case, I can definitely live without "automatic schema
> |upgrades", which would be a "nice to have", but not a show stopper.
>
> Redeploy the correct bean.
>
> Say you add a entry with "newIntStuff" you need a field with "newIntStuff"
> you don't specify anything else, will work.  but *you* need to specify
that
> new field and new object
>
> DB guys
>
> marc
>
> |
> |
> |--
> |--
> |To subscribe:[EMAIL PROTECTED]
> |To unsubscribe:  [EMAIL PROTECTED]
> |Problems?:   [EMAIL PROTECTED]
> |
> |
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]

--
mailto:[EMAIL PROTECTED]
http://www.benefit.se/english


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-11-24 Thread Lennart Petersson

Hi Marc! But I think this guy has a point in what he is saying. If jBoss
offers a JAWS solution where it can create tables if not existent during
deploy then I think it was really nice if it could checkout any changes
in the db schema during redeploy of a bean and:
1) Only give warnings about it or
2) Genereate a script that the user may use to update the db manually or
3) Actually make the update of db schema if and only if the user
confirms this after he has seen the db script.

But I also understand your idea of that jBoss will not manage the db
schema but it would be possible to do and i think that many would like
it or...?

/Lennart

marc fleury skrev:
> 
> |Can I "just adjust" the schema manually in database, using statements like
> |"ALTER TABLE ADD COLUMN ..." or does JAWS maintain a number of assumptions
> |somewhere about what the schema is, that will then become inconsistent?
> 
> You need to provide an object that reflects that schema either 1-1 name
> mapping or jaws.xml to specify the mapping.
> 
> |Do I have to stop all services for this or is there a way to ask the "hot"
> |deployment service to look in for a particular "script" in a .jar or .ear
> 
> it can be done hot, you just need to 'redeploy' the correct bean.
> 
> |file, that is, a class to instantiate, for example "ConvertDb2to3()" (with
> |the default constructor), prior to installation, and in which I can use an
> |appropriate set of statements to adjust the schema.
> 
> Yes, again, for the 3rd time, we do not manage your schema, we manage
> objects that reflect your schema.
> Redeploy the bean and you are all set.
> 
> Only at deployment time, if the table doesn't exist, will we create a schema
> for you as a *convenience*.  If the schema exists, and you come from the DB
> world (poor soul), we don't do anything, so just supply the good bean and
> basta.
> 
> |If such is the case, I can definitely live without "automatic schema
> |upgrades", which would be a "nice to have", but not a show stopper.
> 
> Redeploy the correct bean.
> 
> Say you add a entry with "newIntStuff" you need a field with "newIntStuff"
> you don't specify anything else, will work.  but *you* need to specify that
> new field and new object
> 
> DB guys
> 
> marc
> 
> |
> |
> |--
> |--
> |To subscribe:[EMAIL PROTECTED]
> |To unsubscribe:  [EMAIL PROTECTED]
> |Problems?:   [EMAIL PROTECTED]
> |
> |
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]

-- 
mailto:[EMAIL PROTECTED]
http://www.benefit.se/english


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread marc fleury

|Can I "just adjust" the schema manually in database, using statements like
|"ALTER TABLE ADD COLUMN ..." or does JAWS maintain a number of assumptions
|somewhere about what the schema is, that will then become inconsistent?

You need to provide an object that reflects that schema either 1-1 name
mapping or jaws.xml to specify the mapping.

|Do I have to stop all services for this or is there a way to ask the "hot"
|deployment service to look in for a particular "script" in a .jar or .ear

it can be done hot, you just need to 'redeploy' the correct bean.

|file, that is, a class to instantiate, for example "ConvertDb2to3()" (with
|the default constructor), prior to installation, and in which I can use an
|appropriate set of statements to adjust the schema.

Yes, again, for the 3rd time, we do not manage your schema, we manage
objects that reflect your schema.
Redeploy the bean and you are all set.

Only at deployment time, if the table doesn't exist, will we create a schema
for you as a *convenience*.  If the schema exists, and you come from the DB
world (poor soul), we don't do anything, so just supply the good bean and
basta.

|If such is the case, I can definitely live without "automatic schema
|upgrades", which would be a "nice to have", but not a show stopper.

Redeploy the correct bean.

Say you add a entry with "newIntStuff" you need a field with "newIntStuff"
you don't specify anything else, will work.  but *you* need to specify that
new field and new object

DB guys

marc



|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread marc fleury

|In the source for the beans cdejb for com.web_tomorrow.cd, I can see a
|number of alarming statements concerning JAWS in notes.txt:

it was written 6 month ago.

Can someone update the documentation before we get more "it's the end of the
world" messages from newbies?

marc


|(By the way, the deployment of this example is rather smooth and requires
|very little tweaking. You just have to adjust the classpath for the
|compilation and for executing the clientapps, which, in my case, made wrong
|assumptions about the location of ejb.jar and jboss-client.jar.)
|
|(1) " if you add a CMP field to a class after it has been deployed, you can
|expect
|problems. Merely restarting the server won't be enough: you may have to
|re-install it. If you are running a number of projects on the same server
|this
|is going to be very inconvient."
|
|(2) "Although hot deployment works well, if an error occurs during
|deployment it is
|possible that you will need to restart the jBoss server. This is
|particularly
|noticeable with `NoClassDefFound' errors; these arise if you package a Bean
|without the supporting classes it needs."
|
|(3) "jBoss CMP does field updating by recording the existing field values,
|deleting
|the row of the database, then writing the new row with the new values. This
|means that if you create an object and set its ten (say) attributes, this
|will
|translate into at least 21 whole-row operations!"
|
|(4) "The jBoss database is persistent, in that its data is retained even
|when the
|server is stopped. However, its persistence is managed in an odd way, by
|writing out a script of SQL commands that will re-build the database. This
|file
|cann become extremely large. It's not obvious that this is a good way to do
|this."
|
|Have these, rather serious issues, already been addressed, or are
|they still
|present in the 2.0-FINAL release?
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread marc fleury

|"JAWS tries to write into  its table all the data it had in its last
|deployment. "
|
|What can I expect JAWS to store somewhere in order to be able to do this?

This sentence doesn't make sense...

|Where ? Storage requirements ? Optimized, compressed, ... ? How does this
|"table loader" work?

We make name assumptions about the table, or you specify it with jaws.xml,
please look at the documentation and slow down...

|
|By the way, there does not seem to be a package org.jboss.jaws or something
|like it.
|I can't find any source code that uses the name JAWS?

You haven't looked really hard have you?

marc

|
|--
|From:  Rickard Öberg[SMTP:[EMAIL PROTECTED]]
|Sent:  jeudi 23 novembre 2000 16:08
|To:    jBoss
|Subject:   [jBoss-User] Re: [jBoss-User]
|
|[EMAIL PROTECTED] wrote:
|> http://www.jboss.org/documentation/jboss_cmp3.html
|>
|> "Note that it can be very difficult to change the number or names of
|columns
|> in the table once there is data in it. jBoss gets very confused by this,
|as
|> you would expect. When a CMP Bean is re-deployed, JAWS tries to
|write into
|> its table all the data it had in its last deployment. If the table has
|> different columns it probably won't be able to do that. This
|means that it
|> is important to get the persistent fields thoroughly correct before
|starting
|> to put real data into the application."
|>
|> >>> "as you would expect"
|>
|> Really?
|>
|> >>> "JAWS tries to write into its table all the data it had in its last
|> deployment."
|>
|> What is that supposed to mean?
|>
|> >>> "... to get the persistent fields thoroughly correct ..."
|>
|> So, we're not supposed to do any maintenance on the application?
|>
|> Can anybody clarify what this paragraph is supposed to mean?
|
|This means that if you do not provide any additional configuration
|metadata the fields will be mapped by name, i.e. CMP field "foo" goes
|into database field "foo". So if you change the CMP field "foo" to be
|called "bar" instead then JAWS will try to write to the "bar" column in
|the database. Now, if you provide a JAWS mapping then you can say that
|the CMP field "bar" should point to "foo" table column. That's all...
|pretty natural I think..
|
|/Rickard
|
|--
|Rickard Öberg
|
|Email: [EMAIL PROTECTED]
|http://www.telkel.com
|http://www.jboss.org
|http://www.dreambean.com
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread Erik Poupaert (Brutele)


> Yes, we do not support automatic schema upgrades. If you change the
> schema you will have to manage the database schema upgrades yourself.

Can I "just adjust" the schema manually in database, using statements like
"ALTER TABLE ADD COLUMN ..." or does JAWS maintain a number of assumptions
somewhere about what the schema is, that will then become inconsistent?

Do I have to stop all services for this or is there a way to ask the "hot"
deployment service to look in for a particular "script" in a .jar or .ear
file, that is, a class to instantiate, for example "ConvertDb2to3()" (with
the default constructor), prior to installation, and in which I can use an
appropriate set of statements to adjust the schema.

If such is the case, I can definitely live without "automatic schema
upgrades", which would be a "nice to have", but not a show stopper.



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread Rickard Öberg

Hi!

[EMAIL PROTECTED] wrote:
> (1) " if you add a CMP field to a class after it has been deployed, you can
> expect
> problems. Merely restarting the server won't be enough: you may have to
> re-install it. If you are running a number of projects on the same server
> this
> is going to be very inconvient."

Yes, we do not support automatic schema upgrades. If you change the
schema you will have to manage the database schema upgrades yourself.

> (2) "Although hot deployment works well, if an error occurs during
> deployment it is
> possible that you will need to restart the jBoss server. This is
> particularly
> noticeable with `NoClassDefFound' errors; these arise if you package a Bean
> without the supporting classes it needs."

I think this is fixed now.

> (3) "jBoss CMP does field updating by recording the existing field values,
> deleting
> the row of the database, then writing the new row with the new values. This
> means that if you create an object and set its ten (say) attributes, this
> will
> translate into at least 21 whole-row operations!"

This is not true.

> (4) "The jBoss database is persistent, in that its data is retained even
> when the
> server is stopped. However, its persistence is managed in an odd way, by
> writing out a script of SQL commands that will re-build the database. This
> file
> cann become extremely large. It's not obvious that this is a good way to do
> this."

This has nothing to do with JBoss, but with Hypersonic SQL which is the
default database and is only intended for development purposes. For real
installations you would typically use another database.

> Have these, rather serious issues, already been addressed, or are they still
> present in the 2.0-FINAL release?

1) is still present, and I'm not sure we even want to do that. 4) is a
Hypersonic thing. Please contact the Hypersonic author
(http://sourceforge.net/projects/hsql) if you have comments on that.

regards,
  Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread ERIK . POUPAERT


In the source for the beans cdejb for com.web_tomorrow.cd, I can see a
number of alarming statements concerning JAWS in notes.txt:

(By the way, the deployment of this example is rather smooth and requires
very little tweaking. You just have to adjust the classpath for the
compilation and for executing the clientapps, which, in my case, made wrong
assumptions about the location of ejb.jar and jboss-client.jar.)

(1) " if you add a CMP field to a class after it has been deployed, you can
expect
problems. Merely restarting the server won't be enough: you may have to
re-install it. If you are running a number of projects on the same server
this
is going to be very inconvient."

(2) "Although hot deployment works well, if an error occurs during
deployment it is
possible that you will need to restart the jBoss server. This is
particularly
noticeable with `NoClassDefFound' errors; these arise if you package a Bean
without the supporting classes it needs."

(3) "jBoss CMP does field updating by recording the existing field values,
deleting
the row of the database, then writing the new row with the new values. This
means that if you create an object and set its ten (say) attributes, this
will
translate into at least 21 whole-row operations!"

(4) "The jBoss database is persistent, in that its data is retained even
when the
server is stopped. However, its persistence is managed in an odd way, by
writing out a script of SQL commands that will re-build the database. This
file
cann become extremely large. It's not obvious that this is a good way to do
this."

Have these, rather serious issues, already been addressed, or are they still
present in the 2.0-FINAL release?


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread Rickard Öberg

Hi!

[EMAIL PROTECTED] wrote:
> "JAWS tries to write into  its table all the data it had in its last
> deployment. "
> 
> What can I expect JAWS to store somewhere in order to be able to do this?
> Where ? Storage requirements ? Optimized, compressed, ... ? How does this
> "table loader" work?

JAWS stores the data in the datasource that you have configured it to
use. The default is to use the java:/DefaultDS datasource, which by
default is a Hypersonic SQL database which by default stores data in
/db/hypersonic. Feel free to change this to whatever database you want.

> By the way, there does not seem to be a package org.jboss.jaws or something
> like it.
> I can't find any source code that uses the name JAWS?

org.jboss.ejb.plugins.jaws.*

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-11-23 Thread ERIK . POUPAERT


"JAWS tries to write into  its table all the data it had in its last
deployment. "

What can I expect JAWS to store somewhere in order to be able to do this?
Where ? Storage requirements ? Optimized, compressed, ... ? How does this
"table loader" work?

By the way, there does not seem to be a package org.jboss.jaws or something
like it. 
I can't find any source code that uses the name JAWS?

--
From:   Rickard Öberg[SMTP:[EMAIL PROTECTED]]
Sent:   jeudi 23 novembre 2000 16:08
To:     jBoss
Subject:    [jBoss-User] Re: [jBoss-User]

[EMAIL PROTECTED] wrote:
> http://www.jboss.org/documentation/jboss_cmp3.html
> 
> "Note that it can be very difficult to change the number or names of
columns
> in the table once there is data in it. jBoss gets very confused by this,
as
> you would expect. When a CMP Bean is re-deployed, JAWS tries to write into
> its table all the data it had in its last deployment. If the table has
> different columns it probably won't be able to do that. This means that it
> is important to get the persistent fields thoroughly correct before
starting
> to put real data into the application."
> 
> >>> "as you would expect"
> 
> Really?
> 
> >>> "JAWS tries to write into its table all the data it had in its last
> deployment."
> 
> What is that supposed to mean?
> 
> >>> "... to get the persistent fields thoroughly correct ..."
> 
> So, we're not supposed to do any maintenance on the application?
> 
> Can anybody clarify what this paragraph is supposed to mean?

This means that if you do not provide any additional configuration
metadata the fields will be mapped by name, i.e. CMP field "foo" goes
into database field "foo". So if you change the CMP field "foo" to be
called "bar" instead then JAWS will try to write to the "bar" column in
the database. Now, if you provide a JAWS mapping then you can say that
the CMP field "bar" should point to "foo" table column. That's all...
pretty natural I think..

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-11-23 Thread Rickard Öberg

[EMAIL PROTECTED] wrote:
> http://www.jboss.org/documentation/jboss_cmp3.html
> 
> "Note that it can be very difficult to change the number or names of columns
> in the table once there is data in it. jBoss gets very confused by this, as
> you would expect. When a CMP Bean is re-deployed, JAWS tries to write into
> its table all the data it had in its last deployment. If the table has
> different columns it probably won't be able to do that. This means that it
> is important to get the persistent fields thoroughly correct before starting
> to put real data into the application."
> 
> >>> "as you would expect"
> 
> Really?
> 
> >>> "JAWS tries to write into its table all the data it had in its last
> deployment."
> 
> What is that supposed to mean?
> 
> >>> "... to get the persistent fields thoroughly correct ..."
> 
> So, we're not supposed to do any maintenance on the application?
> 
> Can anybody clarify what this paragraph is supposed to mean?

This means that if you do not provide any additional configuration
metadata the fields will be mapped by name, i.e. CMP field "foo" goes
into database field "foo". So if you change the CMP field "foo" to be
called "bar" instead then JAWS will try to write to the "bar" column in
the database. Now, if you provide a JAWS mapping then you can say that
the CMP field "bar" should point to "foo" table column. That's all...
pretty natural I think..

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]Aargh .... Tapestry ... Strudel

2000-11-16 Thread Fred

Hi,

Just a quick query ... has anyone used or come across
the Strudel web-management system? It would seem to be
the way to go for ... website management.

http://www.research.att.com/~mff/strudel/doc/sitegraph.genoid_1.htm

(I am just curious at the moment.)
But any thoughts appreciated.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]New website

2000-11-14 Thread marc fleury

I appreciate the insult Dmitri :)

thanks but Andy already fixed the site.  Now I need to put out the biz site

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Dmitri
|Sent: Tuesday, November 14, 2000 2:28 PM
|To: jBoss
|Subject: RE: [jBoss-User] Re: [jBoss-User]New website
|
|
|Marc,
|
|Wouldn't it make more sense for you to work on things where your skillset
|would be more widely used - I did a co of the website module this morning,
|and am happy to fix all the javascript errors on it.
|
|cheers
|dim
|
|> -Original Message-
|> From: [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]]On Behalf Of marc fleury
|> Sent: Wednesday, November 15, 2000 7:05 AM
|> To: jBoss
|> Subject: RE: [jBoss-User] Re: [jBoss-User]New website
|>
|>
|> I see thanks for pointing the bug out I will try to fix it now
|>
|> marc
|>
|>
|> |-Original Message-
|> |From: [EMAIL PROTECTED]
|> |[mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
|> |Sent: Tuesday, November 14, 2000 8:52 AM
|> |To: jBoss
|> |Subject: [jBoss-User] Re: [jBoss-User]New website
|> |
|> |
|> |In jboss-server.htm and others(IE error):
|> |
|> | function init() {
|> |  var i = 0;
|> |  while (firstImage == 0 && i < document.links.length) {//maybe you
|> |think 'images'
|> |   if (document.images[i].src.indexOf("dot") > 0) {//you've got null
|> |obj- no such image
|> |firstImage = i;
|> |   }
|> |   i++;
|> |  }
|> |Regards.
|> |
|> |
|> |
|> |- Original Message -
|> |From: "marc fleury" <[EMAIL PROTECTED]>
|> |To: "jBoss" <[EMAIL PROTECTED]>
|> |Sent: Monday, November 13, 2000 7:55 PM
|> |Subject: RE: [jBoss-User] new website
|> |
|> |
|> |> Thanks yes the stuff is for ads but for now we might make it
|> smaller, too
|> |> many people complain.
|> |> we will put it back when there are real ads.
|> |>
|> |> I will try yellow-ish foreground on menu
|> |>
|> |> thanks
|> |>
|> |> marc
|> |>
|> |> |-Original Message-
|> |> |From: [EMAIL PROTECTED]
|> |> |[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Slatcher
|> |> |Sent: Monday, November 13, 2000 2:04 AM
|> |> |To: 'jBoss'
|> |> |Subject: RE: [jBoss-User] new website
|> |> |
|> |> |
|> |> |Looks nicer.
|> |> |
|> |> |A couple of suggestions though, for when you have got any major
|> |> |problems sorted:
|> |> |
|> |> |1) Turn up the contrast on the second-level menu items.  Black on
|> |> |grey-green is
|> |> |not great.  E.g use a bold font, white/yellow foreground, or
|> |> |change background colour.
|> |> |
|> |> |2) Loose the spec at the top of the page.  It is devoid of content
|> |> |and detracts from
|> |> |the overall design.  (Or is this perhaps a placeholder for ads -
|> |> |in which case
|> |> |ignore this comment.
|> |> |
|> |> |===
|> |> |Steve Slatcher
|> |> |
|> |> |
|> |> |
|> |> |--
|> |> |--
|> |> |To subscribe:[EMAIL PROTECTED]
|> |> |To unsubscribe:  [EMAIL PROTECTED]
|> |> |Problems?:   [EMAIL PROTECTED]
|> |> |
|> |> |
|> |>
|> |>
|> |>
|> |> --
|> |> --
|> |> To subscribe:[EMAIL PROTECTED]
|> |> To unsubscribe:  [EMAIL PROTECTED]
|> |> Problems?:   [EMAIL PROTECTED]
|> |>
|> |>
|> |
|> |
|> |
|> |--
|> |--
|> |To subscribe:[EMAIL PROTECTED]
|> |To unsubscribe:  [EMAIL PROTECTED]
|> |Problems?:   [EMAIL PROTECTED]
|> |
|> |
|>
|>
|>
|> --
|> --
|> To subscribe:[EMAIL PROTECTED]
|> To unsubscribe:  [EMAIL PROTECTED]
|> Problems?:   [EMAIL PROTECTED]
|>
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]New website

2000-11-14 Thread Dmitri

Marc,

Wouldn't it make more sense for you to work on things where your skillset
would be more widely used - I did a co of the website module this morning,
and am happy to fix all the javascript errors on it.

cheers
dim

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of marc fleury
> Sent: Wednesday, November 15, 2000 7:05 AM
> To: jBoss
> Subject: RE: [jBoss-User] Re: [jBoss-User]New website
>
>
> I see thanks for pointing the bug out I will try to fix it now
>
> marc
>
>
> |-Original Message-
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
> |Sent: Tuesday, November 14, 2000 8:52 AM
> |To: jBoss
> |Subject: [jBoss-User] Re: [jBoss-User]New website
> |
> |
> |In jboss-server.htm and others(IE error):
> |
> | function init() {
> |  var i = 0;
> |  while (firstImage == 0 && i < document.links.length) {//maybe you
> |think 'images'
> |   if (document.images[i].src.indexOf("dot") > 0) {//you've got null
> |obj- no such image
> |firstImage = i;
> |   }
> |   i++;
> |  }
> |Regards.
> |
> |
> |
> |- Original Message -
> |From: "marc fleury" <[EMAIL PROTECTED]>
> |To: "jBoss" <[EMAIL PROTECTED]>
> |Sent: Monday, November 13, 2000 7:55 PM
> |Subject: RE: [jBoss-User] new website
> |
> |
> |> Thanks yes the stuff is for ads but for now we might make it
> smaller, too
> |> many people complain.
> |> we will put it back when there are real ads.
> |>
> |> I will try yellow-ish foreground on menu
> |>
> |> thanks
> |>
> |> marc
> |>
> |> |-Original Message-
> |> |From: [EMAIL PROTECTED]
> |> |[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Slatcher
> |> |Sent: Monday, November 13, 2000 2:04 AM
> |> |To: 'jBoss'
> |> |Subject: RE: [jBoss-User] new website
> |> |
> |> |
> |> |Looks nicer.
> |> |
> |> |A couple of suggestions though, for when you have got any major
> |> |problems sorted:
> |> |
> |> |1) Turn up the contrast on the second-level menu items.  Black on
> |> |grey-green is
> |> |not great.  E.g use a bold font, white/yellow foreground, or
> |> |change background colour.
> |> |
> |> |2) Loose the spec at the top of the page.  It is devoid of content
> |> |and detracts from
> |> |the overall design.  (Or is this perhaps a placeholder for ads -
> |> |in which case
> |> |ignore this comment.
> |> |
> |> |===
> |> |Steve Slatcher
> |> |
> |> |
> |> |
> |> |--
> |> |--
> |> |To subscribe:[EMAIL PROTECTED]
> |> |To unsubscribe:  [EMAIL PROTECTED]
> |> |Problems?:   [EMAIL PROTECTED]
> |> |
> |> |
> |>
> |>
> |>
> |> --
> |> --
> |> To subscribe:[EMAIL PROTECTED]
> |> To unsubscribe:  [EMAIL PROTECTED]
> |> Problems?:   [EMAIL PROTECTED]
> |>
> |>
> |
> |
> |
> |--
> |--
> |To subscribe:[EMAIL PROTECTED]
> |To unsubscribe:  [EMAIL PROTECTED]
> |Problems?:   [EMAIL PROTECTED]
> |
> |
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]New website

2000-11-14 Thread marc fleury

already fixed by Mad Andy/Good code thank andy,

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of marc fleury
|Sent: Tuesday, November 14, 2000 12:05 PM
|To: jBoss
|Subject: RE: [jBoss-User] Re: [jBoss-User]New website
|
|
|I see thanks for pointing the bug out I will try to fix it now
|
|marc
|
|
||-Original Message-
||From: [EMAIL PROTECTED]
||[mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
||Sent: Tuesday, November 14, 2000 8:52 AM
||To: jBoss
||Subject: [jBoss-User] Re: [jBoss-User]New website
||
||
||In jboss-server.htm and others(IE error):
||
|| function init() {
||  var i = 0;
||  while (firstImage == 0 && i < document.links.length) {//maybe you
||think 'images'
||   if (document.images[i].src.indexOf("dot") > 0) {//you've got null
||obj- no such image
||firstImage = i;
||   }
||   i++;
||  }
||Regards.
||
||
||
||- Original Message -
||From: "marc fleury" <[EMAIL PROTECTED]>
||To: "jBoss" <[EMAIL PROTECTED]>
||Sent: Monday, November 13, 2000 7:55 PM
||Subject: RE: [jBoss-User] new website
||
||
||> Thanks yes the stuff is for ads but for now we might make it 
|smaller, too
||> many people complain.
||> we will put it back when there are real ads.
||>
||> I will try yellow-ish foreground on menu
||>
||> thanks
||>
||> marc
||>
||> |-Original Message-
||> |From: [EMAIL PROTECTED]
||> |[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Slatcher
||> |Sent: Monday, November 13, 2000 2:04 AM
||> |To: 'jBoss'
||> |Subject: RE: [jBoss-User] new website
||> |
||> |
||> |Looks nicer.
||> |
||> |A couple of suggestions though, for when you have got any major
||> |problems sorted:
||> |
||> |1) Turn up the contrast on the second-level menu items.  Black on
||> |grey-green is
||> |not great.  E.g use a bold font, white/yellow foreground, or
||> |change background colour.
||> |
||> |2) Loose the spec at the top of the page.  It is devoid of content
||> |and detracts from
||> |the overall design.  (Or is this perhaps a placeholder for ads -
||> |in which case
||> |ignore this comment.
||> |
||> |===
||> |Steve Slatcher
||> |
||> |
||> |
||> |--
||> |--
||> |To subscribe:[EMAIL PROTECTED]
||> |To unsubscribe:  [EMAIL PROTECTED]
||> |Problems?:   [EMAIL PROTECTED]
||> |
||> |
||>
||>
||>
||> --
||> --
||> To subscribe:[EMAIL PROTECTED]
||> To unsubscribe:  [EMAIL PROTECTED]
||> Problems?:   [EMAIL PROTECTED]
||>
||>
||
||
||
||--
||--
||To subscribe:[EMAIL PROTECTED]
||To unsubscribe:  [EMAIL PROTECTED]
||Problems?:   [EMAIL PROTECTED]
||
||
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]New website

2000-11-14 Thread marc fleury

I see thanks for pointing the bug out I will try to fix it now

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
|Sent: Tuesday, November 14, 2000 8:52 AM
|To: jBoss
|Subject: [jBoss-User] Re: [jBoss-User]New website
|
|
|In jboss-server.htm and others(IE error):
|
| function init() {
|  var i = 0;
|  while (firstImage == 0 && i < document.links.length) {//maybe you
|think 'images'
|   if (document.images[i].src.indexOf("dot") > 0) {//you've got null
|obj- no such image
|firstImage = i;
|   }
|   i++;
|  }
|Regards.
|
|
|
|- Original Message -
|From: "marc fleury" <[EMAIL PROTECTED]>
|To: "jBoss" <[EMAIL PROTECTED]>
|Sent: Monday, November 13, 2000 7:55 PM
|Subject: RE: [jBoss-User] new website
|
|
|> Thanks yes the stuff is for ads but for now we might make it smaller, too
|> many people complain.
|> we will put it back when there are real ads.
|>
|> I will try yellow-ish foreground on menu
|>
|> thanks
|>
|> marc
|>
|> |-Original Message-
|> |From: [EMAIL PROTECTED]
|> |[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Slatcher
|> |Sent: Monday, November 13, 2000 2:04 AM
|> |To: 'jBoss'
|> |Subject: RE: [jBoss-User] new website
|> |
|> |
|> |Looks nicer.
|> |
|> |A couple of suggestions though, for when you have got any major
|> |problems sorted:
|> |
|> |1) Turn up the contrast on the second-level menu items.  Black on
|> |grey-green is
|> |not great.  E.g use a bold font, white/yellow foreground, or
|> |change background colour.
|> |
|> |2) Loose the spec at the top of the page.  It is devoid of content
|> |and detracts from
|> |the overall design.  (Or is this perhaps a placeholder for ads -
|> |in which case
|> |ignore this comment.
|> |
|> |===
|> |Steve Slatcher
|> |
|> |
|> |
|> |--
|> |--
|> |To subscribe:[EMAIL PROTECTED]
|> |To unsubscribe:  [EMAIL PROTECTED]
|> |Problems?:   [EMAIL PROTECTED]
|> |
|> |
|>
|>
|>
|> --
|> --
|> To subscribe:[EMAIL PROTECTED]
|> To unsubscribe:  [EMAIL PROTECTED]
|> Problems?:   [EMAIL PROTECTED]
|>
|>
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]New website

2000-11-14 Thread Andrew

In jboss-server.htm and others(IE error):

 function init() {
  var i = 0;
  while (firstImage == 0 && i < document.links.length) {//maybe you
think 'images'
   if (document.images[i].src.indexOf("dot") > 0) {//you've got null
obj- no such image
firstImage = i;
   }
   i++;
  }
Regards.



- Original Message -
From: "marc fleury" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Monday, November 13, 2000 7:55 PM
Subject: RE: [jBoss-User] new website


> Thanks yes the stuff is for ads but for now we might make it smaller, too
> many people complain.
> we will put it back when there are real ads.
>
> I will try yellow-ish foreground on menu
>
> thanks
>
> marc
>
> |-Original Message-
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On Behalf Of Steve Slatcher
> |Sent: Monday, November 13, 2000 2:04 AM
> |To: 'jBoss'
> |Subject: RE: [jBoss-User] new website
> |
> |
> |Looks nicer.
> |
> |A couple of suggestions though, for when you have got any major
> |problems sorted:
> |
> |1) Turn up the contrast on the second-level menu items.  Black on
> |grey-green is
> |not great.  E.g use a bold font, white/yellow foreground, or
> |change background colour.
> |
> |2) Loose the spec at the top of the page.  It is devoid of content
> |and detracts from
> |the overall design.  (Or is this perhaps a placeholder for ads -
> |in which case
> |ignore this comment.
> |
> |===
> |Steve Slatcher
> |
> |
> |
> |--
> |--
> |To subscribe:[EMAIL PROTECTED]
> |To unsubscribe:  [EMAIL PROTECTED]
> |Problems?:   [EMAIL PROTECTED]
> |
> |
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
>
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] RE:[jBoss-User][jBoss-User]Error:connection!!!javax/rmi/PortableRemoteObject

2000-11-03 Thread marc fleury

Pedro

you have to stop sending messages with just "I got exception:
no-worko@@@Exception"  it is really tough.

Also I don't know of an exception that "" in it's messages

"HereIsAStackTraceYouMothaFucka!!!Exception().getMessage()"

please post a stack

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Pedro
|Sent: Friday, November 03, 2000 12:48 PM
|To: jBoss
|Subject: Re:
|[jBoss-User][jBoss-User]Error:connection!!!javax/rmi/PortableRemoteObjec
|t
|
|
|
| Thanks Marc !
| i get another error :
|
|Got context
|Got Reference
|Erro :connection !!!specialLoadClass
|
|what's happing ?
|what i do to solve it ?
|Thanks in advance,
|Pedro
|
|
|
|
|> afaik it is due to j2ee RI being present in your classpath.
|>
|> Remove it from your classpath
|>
|> marc
|>
|>
|> |-Original Message-
|> |From: [EMAIL PROTECTED]
|> |[mailto:[EMAIL PROTECTED]]On Behalf Of Pedro
|> |Sent: Friday, November 03, 2000 11:01 AM
|> |To: jBoss
|> |Subject: [jBoss-User] [jBoss-User]Error
|> |:connection!!!javax/rmi/PortableRemoteObject
|> |
|> |
|> |when i run the client InterestClient (servlet) from a browser
|> |get the error :
|> |
|> |Got context
|> |Got Reference
|> |connection !!!javax/rmi/PortableRemoteObject
|> |
|> |what's happing ?
|> | what i do to solve it ?
|> |
|> |Thanks in advance,
|> |Pedro
|> |
|> |
|> |
|> |
|> |
|> |
|> |
|> |--
|> |--
|> |To subscribe:[EMAIL PROTECTED]
|> |To unsubscribe:  [EMAIL PROTECTED]
|> |Problems?:   [EMAIL PROTECTED]
|> |
|> |
|>
|>
|> --
|> --
|> To subscribe:[EMAIL PROTECTED]
|> To unsubscribe:  [EMAIL PROTECTED]
|> Problems?:   [EMAIL PROTECTED]
|>
|>
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]java.lang.NoClassDefFoundError:javax/naming/InitialContext

2000-10-27 Thread Rickard Öberg

Hi!

Pedro wrote:
> > > this error hap when i run the InterestClient and not when i compile !
> > > what's the classpath do in this case ?
> >
> > I never said anything about compile time, did I. Just do as I say: add
> > jndi.jar to your clients classpath.
> >
>   sorry but don't work !

You still get the same exception?

>  obs :  i can't stay seting classpath for each  remote client !

Never said you should either. I said "add it to your clients classpath",
but how you do that is up to you. If your client is packaged as a JAR
file you could simply add "Class-Path: jndi.jar" to your JAR's manifest
file. That's a much better way to handle classpaths.

regards,
  Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-26 Thread Paolo Biondi

Hi,
Thanks for the suggestion!!
You are right!

I solved the problem

Paolo.


- Original Message -
From: "Rickard Öberg" <[EMAIL PROTECTED]>
To: "jBoss" <[EMAIL PROTECTED]>
Sent: Wednesday, October 25, 2000 11:43 PM
Subject: [jBoss-User] Re: [jBoss-User]


> Hi!
>
> The behaviour you see is probably due to the use of transactions. It
> works just fine (i.e. other clients will be blocked until the
> transaction finishes), but if you're really paranoid you can use the
> transaction setting REQUIRES_NEW instead of REQUIRED. This will cause
> each method call to be in a new transaction. Not necessarily good from a
> performance point of view (and again, not needed because of transaction
> semantics), but it would accomplish what you ask for.
>
> regards,
>   Rickard
>
> --
> Rickard Öberg
>
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-26 Thread marc fleury

yep same prognosis here

set your tx properly :)

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Rickard Öberg
|Sent: Wednesday, October 25, 2000 10:43 PM
|To: jBoss
|Subject: [jBoss-User] Re: [jBoss-User]
|
|
|Hi!
|
|The behaviour you see is probably due to the use of transactions. It
|works just fine (i.e. other clients will be blocked until the
|transaction finishes), but if you're really paranoid you can use the
|transaction setting REQUIRES_NEW instead of REQUIRED. This will cause
|each method call to be in a new transaction. Not necessarily good from a
|performance point of view (and again, not needed because of transaction
|semantics), but it would accomplish what you ask for.
|
|regards,
|  Rickard
|
|--
|Rickard Öberg
|
|Email: [EMAIL PROTECTED]
|http://www.telkel.com
|http://www.jboss.org
|http://www.dreambean.com
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-10-25 Thread Rickard Öberg

Hi!

The behaviour you see is probably due to the use of transactions. It
works just fine (i.e. other clients will be blocked until the
transaction finishes), but if you're really paranoid you can use the
transaction setting REQUIRES_NEW instead of REQUIRED. This will cause
each method call to be in a new transaction. Not necessarily good from a
performance point of view (and again, not needed because of transaction
semantics), but it would accomplish what you ask for.

regards,
  Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-20 Thread Rickard Oberg

Hi!


> > so you can look at the implementations of some of those for ideas.  This
> > is a big task, though, so you may be better served by just executing a
> > query against your DB to retrieve the next key (for example, "select
> > sequence.nextval from dual" on Oracle).  That is, you may want to just
do
> > that in your EJB. The MBean approach would be more generic (it could
work
> > for a number of EJBs with independent key sequences), but more complex
> > too.
>
> I'm sorry to hear that it turns out to be a big task... the JMX spec gives
> the idea that it's suppossed to be quite easy for a Java class / component
> to be an MBean.

"Quite easy" is an understatement. It is trivial.

/Rickard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-20 Thread Kyle Cordes

> so you can look at the implementations of some of those for ideas.  This
> is a big task, though, so you may be better served by just executing a
> query against your DB to retrieve the next key (for example, "select
> sequence.nextval from dual" on Oracle).  That is, you may want to just do
> that in your EJB. The MBean approach would be more generic (it could work
> for a number of EJBs with independent key sequences), but more complex
> too.

I'm sorry to hear that it turns out to be a big task... the JMX spec gives
the idea that it's suppossed to be quite easy for a Java class / component
to be an MBean.

Kyle Cordes
[EMAIL PROTECTED]
www.kylecordes.com





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-19 Thread Jay Walters

In case this hasn't already been said, the correct logic is 

UPDATE jboss_keygen_sequence SET value = value+1 where identifier=1;
SELECT value FROM jboss_keygen_sequence WHERE identifier=1;
COMMIT;

You always update first to ensure the row gets locked properly.

Cheers

-Original Message-
From: Tom Cook [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 18, 2000 10:24 PM
To: jBoss
Subject: RE: [jBoss-User] Re: [jBoss-User]


Aaron Mulder writes:
 >  Well... we could certainly do that, but...
 >
 >  The most reasonable way would be to use the DB-specific key
 > generation, but that only works for DBs that support it (Oracle and
 > PostgreSQL, that I'm aware of), and would require user configuration (to
 > pick a DB).  I suppose we could make a "generic" setting that just uses a
 > normal DB table, but it would have to just keep issuing SQL like "update
 > foo set counter = (value+1) where counter=(value)" until one went
through,
 > to avoid clashing with other instances.

Hmmm? That seems a bit inefficient, if I understand you correctly.
Why 'until one went through'? Why not have a table:

CREATE TABLE JBOSS_KEYGEN_SEQUENCE
(
IDENTIFIER INT4 NOT NULL PRIMARY KEY,
VALUEINT8 NOT NULL
)

INSERT INTO JBOSS_KEYGEN_SEQUENCE VALUES ( 1, 0 );

Then whenever you want a new key:

COMMIT; (or however your db begins a tx)
SELECT value FROM jboss_keygen_sequence WHERE identifier=1;
UPDATE jboss_keygen_sequence SET value = value+1 where identifier=1;
COMMIT;

Also, if you only use the db to generate half of a 128 bit key then
you only need to hit the database once in every 2^64 keys.

 >  Anyway, if you want me to go ahead and put such a thing together,
 > say the word - any let me know if you can see a way to do it other than
 > involving the DB.

As I said in a different post I have a key generator mbean, but it
uses Oracle sequences.  Such a thing is not hard to put together,
though; it took me two hours, and that was including working out how
MBeans work.

Tom


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

Rickard Oberg writes:
 > > A primary key service *is* appropriate for the container but it is *not*
 > > appropriate for the container manufacturer.  Such a decision is very
 > > application and domain specific.
 > 
 > I agree. So, having an idgen "example, but hey it works" in the jbosstest
 > module should be a decent compromise :-)

Goodness, what made you think of that? ;-)

Tom


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Rickard Oberg

> I fully support the notion of people writing database specific mbeans (or
> whatever) to provide this functionality but think it would be a Bad
> Idea(tm) to provide it in the distribution. Encourage people to build
> appropriate solutions for different problems rather than a
> one-solution-fits-all in the distribution.  Then provide a FAQ reference
> so people can fetch the Postgre or Oracle, integer or long, standalone or
> clustered, A or B, this or that version of the mbean as is
> appropriate.
>
> A primary key service *is* appropriate for the container but it is *not*
> appropriate for the container manufacturer.  Such a decision is very
> application and domain specific.

I agree. So, having an idgen "example, but hey it works" in the jbosstest
module should be a decent compromise :-)

/Rickard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Rickard Oberg

Hi!


> On Wed, 18 Oct 2000, Rickard Oberg wrote:
> > > 3) How do we avoid clashing with keys generated by the DB itself or
other
> > > software?
> >
> > By allowing the initial counter to be given. If you already have a bunch
of
> > keys in the db then simply set the initial one to a number higher than
> > what's already created.
>
> I disagree.  I don't think we should assume that jBoss is the only
> user of the database.  In general, I think we have to assume that other
> apps may be updating at the same time, and even triggers within the DB and
> so on.

I am not assuming that jBoss will be the only user of the DB. In fact, by
saying that we should use commit option c it
s quite the contrary.

> Now, with a compliant DB, we can fetch a number of values all in a
> row instead of one at a time as requests come in, but I don't think that
> really buys you anything.  In that case, we're not getting a range, just
> calling "nextval" 10 times in a row.

No I am not suggesting that. Please see the idgen beans in the jbosstest
module.

> Ah - perhaps you were just talking about the non-compliant DB,
> where we have to fake it by writing our own table or something.  In that
> case, then you could certainly grab a bunch of IDs at once by just upping
> the "last value" by 10.

Yes, a table with basically two columns: bean name and last used id. Each
batch use will up the id field by 10 or 100 or something.

> I think it would be better to do this as an MBean instead of an
> EJB, though - it's really a service of the server, not a co-existing app
> which has security and transaction settings and so on.

Well, using a table to do it would need transactionality. It's not that much
of an overhead all in all. Using an MBean would be worse I think since you
would have to use RMI to talk to it through a connector. EJB talk we can
optimize.

> And I kind of
> liked the suggestion that you just look in JNDI under "system/nextID" or
> whatever and get back the next ID directly...  Saves you from dealing with
> all that factory crap... :)

That can easily be hidden away in a JavaBean that does the idgen
interaction. That is precisely one of the reasons they chose a naming system
that can easily be accessed without having the bean "give" the naming to the
underlying libraries. A library can always do new
InitialContext().lookup("java:comp/env") and get the conf stuff.

/Rickard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

Dan OConnor writes:
 > On 18 Oct 00, at 15:26, [EMAIL PROTECTED] wrote:
[snip]
 > (1) An EJB-component based solution as Rickard has advocated 
 > (and for which he has provided a prototype). 
 > 
 > (2) A persistence-manager based solution for container-managed 
 > persistence. This solution would, of course, be database-specific. 
 > Here I like the role that an MBean can play. In other words, the 
 > persistence manager could look for a database-specific MBean to 
 > which it could delegate the sequential primary key management.
 > 
 > I'm very sure that #1 is a good idea. I would like to provide support 
 > in the persistence manager for CMP entities with sequential keys, 
 > so I think that #2 might also be a good idea. But I haven't 
 > prototyped it, nor have I spent more time thinking about it than it 
 > took me to type it. So I'd love to hear some feedback.

Mmm, I'm not convinced.  Consider somebody constructing an EJB app
around some legacy system.  Now, with #2, CMP becomes more or less
unusable because we want to stick with some primary key scheme from
our legacy app.  With #1 at least you have the option of not using
it, but I'm still not convinced it's a Good Thing.  People should
think about data consistency, not just assume that some service they
heard about once will take care of it...

Tom
-- 
Tom Cook - Software Operations

"We rarely find that people have good sense unless they agree
 with us."
- Francois, Duc de la Rochefoucauld

LISAsoft Pty Ltd - www.lisa.com.au

--
38 Greenhill Rd.  Level 3, 228 Pitt Street
Wayville, SA, 5034Sydney, NSW, 2000

Phone:   +61 8 8272 1555  Phone:   +61 2 9283 0877
Fax: +61 8 8271 1199  Fax: +61 2 9283 0866
--


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

[EMAIL PROTECTED] writes:
 > On Oct 18, Aaron Mulder quoth:
[snip]
 > I would implore anyone interested in this topic to go back and read the
 > back and forth Tom White and I had on this very issue a couple of weeks
 > ago.  Offering a default ID service in jboss isn't a simple "yeah we
 > should have that" type decision.  There is no "right" answer to this
 > question and by providing a solution in the distribution you will be
 > endorsing a specific solution that will be used without the developer
 > considering it's applicability.

Cook.  Tom Cook.

 > I fully support the notion of people writing database specific mbeans (or
 > whatever) to provide this functionality but think it would be a Bad
 > Idea(tm) to provide it in the distribution. Encourage people to build
 > appropriate solutions for different problems rather than a
 > one-solution-fits-all in the distribution.  Then provide a FAQ reference
 > so people can fetch the Postgre or Oracle, integer or long, standalone or
 > clustered, A or B, this or that version of the mbean as is
 > appropriate.

Agree with you there.

 > A primary key service *is* appropriate for the container but it is *not*
 > appropriate for the container manufacturer.  Such a decision is very
 > application and domain specific.

Also if you make jboss provide the keys for _all_ applications then
you loose the association between the data and the mechanism which
ensures it's consistency.  Now a non-ejb app can't use the same
mechanism.  People should design key generators for their apps.

Tom


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

Aaron Mulder writes:
 > On Wed, 18 Oct 2000, Rickard Oberg wrote:
 > > > 3) How do we avoid clashing with keys generated by the DB itself or other
 > > > software?
 > > 
 > > By allowing the initial counter to be given. If you already have a bunch of
 > > keys in the db then simply set the initial one to a number higher than
 > > what's already created.
 > 
 >  I disagree.  I don't think we should assume that jBoss is the only
 > user of the database.  In general, I think we have to assume that other
 > apps may be updating at the same time, and even triggers within the DB and
 > so on.
 >  Now, with a compliant DB, we can fetch a number of values all in a
 > row instead of one at a time as requests come in, but I don't think that
 > really buys you anything.  In that case, we're not getting a range, just
 > calling "nextval" 10 times in a row.
 >  Ah - perhaps you were just talking about the non-compliant DB,
 > where we have to fake it by writing our own table or something.  In that
 > case, then you could certainly grab a bunch of IDs at once by just upping
 > the "last value" by 10.

But why not just use the DB value for half of the key?  True, as
Rickard pointed out, you lose some of your key space on server stop,
but that is not so drastic...

Tom
-- 
Tom Cook - Software Operations

"We rarely find that people have good sense unless they agree
 with us."
- Francois, Duc de la Rochefoucauld

LISAsoft Pty Ltd - www.lisa.com.au

--
38 Greenhill Rd.  Level 3, 228 Pitt Street
Wayville, SA, 5034Sydney, NSW, 2000

Phone:   +61 8 8272 1555  Phone:   +61 2 9283 0877
Fax: +61 8 8271 1199  Fax: +61 2 9283 0866
--


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

[EMAIL PROTECTED] writes:
 > You could avoid clashing with keys generated by the db by using a string 
 > type key with a prefix or suffix specific to jBoss, and avoid the 
 > clustering problem by using an additional prefix/suffix with a server 
 > identifer (hashed hostname, ip, whatever)

*sigh* haven't we had this flamewar? ;-)

That sort of key is never guaranteed to be unique, and is relatively
likely to be non-unique in certain situations (multi-threaded, high
load etc).

Tom

 > 
 > Aaron Mulder <[EMAIL PROTECTED]>
 > 10/18/2000 01:44 PM
 > Please respond to jBoss
 > 
 >  
 > To: jBoss <[EMAIL PROTECTED]>
 >         cc: 
 > Subject:RE: [jBoss-User] Re: [jBoss-User]
 > 
 >  Well... we could certainly do that, but...
 > 
 > 1) What data type?  I would think Int and String would be the most common.
 > 2) How do we prevent ourselves from generating keys that have already been
 > used?  Especially when we move to a clustered environment, where each
 > server would have the key generator service (unless handled carefully).
 > 3) How do we avoid clashing with keys generated by the DB itself or other
 > software?
 > 
 >  The most reasonable way would be to use the DB-specific 
 > key
 > generation, but that only works for DBs that support it (Oracle and
 > PostgreSQL, that I'm aware of), and would require user configuration (to
 > pick a DB).  I suppose we could make a "generic" setting that just uses a
 > normal DB table, but it would have to just keep issuing SQL like "update
 > foo set counter = (value+1) where counter=(value)" until one went through,
 > to avoid clashing with other instances.
 >  Anyway, if you want me to go ahead and put such a thing 
 > together,
 > say the word - any let me know if you can see a way to do it other than
 > involving the DB.
 > 
 > Aaron


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

Aaron Mulder writes:
 >  Well... we could certainly do that, but...
 >
 >  The most reasonable way would be to use the DB-specific key
 > generation, but that only works for DBs that support it (Oracle and
 > PostgreSQL, that I'm aware of), and would require user configuration (to
 > pick a DB).  I suppose we could make a "generic" setting that just uses a
 > normal DB table, but it would have to just keep issuing SQL like "update
 > foo set counter = (value+1) where counter=(value)" until one went through,
 > to avoid clashing with other instances.

Hmmm? That seems a bit inefficient, if I understand you correctly.
Why 'until one went through'? Why not have a table:

CREATE TABLE JBOSS_KEYGEN_SEQUENCE
(
IDENTIFIER INT4 NOT NULL PRIMARY KEY,
VALUEINT8 NOT NULL
)

INSERT INTO JBOSS_KEYGEN_SEQUENCE VALUES ( 1, 0 );

Then whenever you want a new key:

COMMIT; (or however your db begins a tx)
SELECT value FROM jboss_keygen_sequence WHERE identifier=1;
UPDATE jboss_keygen_sequence SET value = value+1 where identifier=1;
COMMIT;

Also, if you only use the db to generate half of a 128 bit key then
you only need to hit the database once in every 2^64 keys.

 >  Anyway, if you want me to go ahead and put such a thing together,
 > say the word - any let me know if you can see a way to do it other than
 > involving the DB.

As I said in a different post I have a key generator mbean, but it
uses Oracle sequences.  Such a thing is not hard to put together,
though; it took me two hours, and that was including working out how
MBeans work.

Tom


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tom Cook

marc fleury writes:
 > why don't *we* provide the damn counter MBean (off by default) as a standard
 > service of our platform (once and for all, gaddamit)
 > 
 > I don't remember the thread so flame if you wish

Ok...

The problem with a counter MBean is that you need to use your database
backend to generate at least some of the key to maintain data
consistency.  Different databases use defferent sequence mechanisms.
So which is supported by default?  Or should one be included for every
known sequence implementation?  Not every DMBS has a sequence;
postgres and oracle are the two I know of.  And they have different
syntax for accessing them:

Postgres:
CREATE SEQUENCE a_sequence MIN x MAX y START z;
SELECT NEXTVAL( "a_sequence" );

Oracle:
CREATE SEQUENCE a_sequence;
SELECT a_sequence.nextval FROM dual;

Tom
-- 
Tom Cook - Software Operations

"We rarely find that people have good sense unless they agree
 with us."
- Francois, Duc de la Rochefoucauld

LISAsoft Pty Ltd - www.lisa.com.au

--
38 Greenhill Rd.  Level 3, 228 Pitt Street
Wayville, SA, 5034Sydney, NSW, 2000

Phone:   +61 8 8272 1555  Phone:   +61 2 9283 0877
Fax: +61 8 8271 1199  Fax: +61 2 9283 0866
--


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Dan OConnor

On 18 Oct 00, at 15:26, [EMAIL PROTECTED] wrote:
> 
> A primary key service *is* appropriate for the container but it is *not*
> appropriate for the container manufacturer.  Such a decision is very
> application and domain specific.

One argument in favor of providing in the jBoss distribution an 
MBean that provides a primary key service is "customer lock-in." 
Since people who use this service will be taking advantage of a 
feature that is not in the J2EE standard, we will force them to keep 
using our container. So the upgrades and support revenue will keep 
rolling in. We'll all be rich.

Just kidding. In general, I agree with the argument that this is not 
an appropriate service for us to provide directly to EJB 
components. There are two alternatives that I like:

(1) An EJB-component based solution as Rickard has advocated 
(and for which he has provided a prototype). 

(2) A persistence-manager based solution for container-managed 
persistence. This solution would, of course, be database-specific. 
Here I like the role that an MBean can play. In other words, the 
persistence manager could look for a database-specific MBean to 
which it could delegate the sequential primary key management.

I'm very sure that #1 is a good idea. I would like to provide support 
in the persistence manager for CMP entities with sequential keys, 
so I think that #2 might also be a good idea. But I haven't 
prototyped it, nor have I spent more time thinking about it than it 
took me to type it. So I'd love to hear some feedback.

-Dan




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread caskey-lists-jboss

On Oct 18, Aaron Mulder quoth:

> On Wed, 18 Oct 2000, Rickard Oberg wrote:
> > > 3) How do we avoid clashing with keys generated by the DB itself or other
> > > software?
> > 
> > By allowing the initial counter to be given. If you already have a bunch of
> > keys in the db then simply set the initial one to a number higher than
> > what's already created.
> 
>   I disagree.  I don't think we should assume that jBoss is the only
> user of the database.  In general, I think we have to assume that other
> apps may be updating at the same time, and even triggers within the DB and
> so on.
>   Now, with a compliant DB, we can fetch a number of values all in a
> row instead of one at a time as requests come in, but I don't think that
> really buys you anything.  In that case, we're not getting a range, just
> calling "nextval" 10 times in a row.
>   Ah - perhaps you were just talking about the non-compliant DB,
> where we have to fake it by writing our own table or something.  In that
> case, then you could certainly grab a bunch of IDs at once by just upping
> the "last value" by 10.
>   I think it would be better to do this as an MBean instead of an
> EJB, though - it's really a service of the server, not a co-existing app
> which has security and transaction settings and so on.  And I kind of
> liked the suggestion that you just look in JNDI under "system/nextID" or
> whatever and get back the next ID directly...  Saves you from dealing with
> all that factory crap... :)

I would implore anyone interested in this topic to go back and read the
back and forth Tom White and I had on this very issue a couple of weeks
ago.  Offering a default ID service in jboss isn't a simple "yeah we
should have that" type decision.  There is no "right" answer to this
question and by providing a solution in the distribution you will be
endorsing a specific solution that will be used without the developer
considering it's applicability.

I fully support the notion of people writing database specific mbeans (or
whatever) to provide this functionality but think it would be a Bad
Idea(tm) to provide it in the distribution. Encourage people to build
appropriate solutions for different problems rather than a
one-solution-fits-all in the distribution.  Then provide a FAQ reference
so people can fetch the Postgre or Oracle, integer or long, standalone or
clustered, A or B, this or that version of the mbean as is
appropriate.

A primary key service *is* appropriate for the container but it is *not*
appropriate for the container manufacturer.  Such a decision is very
application and domain specific.

C=)

--
The fact that no one understands you doesn't mean you're an artist.
--
Caskey///   TechnoCage Inc.
--
   Oh no! Space monkeys are attacking! -- eddie izzard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Aaron Mulder

On Wed, 18 Oct 2000, Rickard Oberg wrote:
> > 3) How do we avoid clashing with keys generated by the DB itself or other
> > software?
> 
> By allowing the initial counter to be given. If you already have a bunch of
> keys in the db then simply set the initial one to a number higher than
> what's already created.

I disagree.  I don't think we should assume that jBoss is the only
user of the database.  In general, I think we have to assume that other
apps may be updating at the same time, and even triggers within the DB and
so on.
Now, with a compliant DB, we can fetch a number of values all in a
row instead of one at a time as requests come in, but I don't think that
really buys you anything.  In that case, we're not getting a range, just
calling "nextval" 10 times in a row.
Ah - perhaps you were just talking about the non-compliant DB,
where we have to fake it by writing our own table or something.  In that
case, then you could certainly grab a bunch of IDs at once by just upping
the "last value" by 10.
I think it would be better to do this as an MBean instead of an
EJB, though - it's really a service of the server, not a co-existing app
which has security and transaction settings and so on.  And I kind of
liked the suggestion that you just look in JNDI under "system/nextID" or
whatever and get back the next ID directly...  Saves you from dealing with
all that factory crap... :)

Aaron



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Rickard Oberg




  You could avoid clashing with keys 
  generated by the db by using a string type key with a prefix or suffix 
  specific to jBoss, and avoid the clustering problem by using an additional 
  prefix/suffix with a server identifer (hashed hostname, ip, whatever) 
  
Yes, that could work but it is not necessary. Using a tx'ed non-cached 
entity with batched id's will work better I think. The only drawback is if you 
really really want all numbers in the sequence to be used (which will not be 
guaranteed as any id's left in the current batch will be lost on server 
stop).
 
/Rickard


Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Rickard Oberg

Hi!


> Well... we could certainly do that, but...
>
> 1) What data type?  I would think Int and String would be the most common.

Use long, and then let the user stringify if necessary.

> 2) How do we prevent ourselves from generating keys that have already been
> used?  Especially when we move to a clustered environment, where each
> server would have the key generator service (unless handled carefully).

This can be done quite easily by using an entitybean with option c caching
and a session bean that batch reads sequences of keys from the entity. Look
at the idgen in jbosstest for base implementation.

> 3) How do we avoid clashing with keys generated by the DB itself or other
> software?

By allowing the initial counter to be given. If you already have a bunch of
keys in the db then simply set the initial one to a number higher than
what's already created.

> The most reasonable way would be to use the DB-specific key
> generation, but that only works for DBs that support it (Oracle and
> PostgreSQL, that I'm aware of), and would require user configuration (to
> pick a DB).  I suppose we could make a "generic" setting that just uses a
> normal DB table, but it would have to just keep issuing SQL like "update
> foo set counter = (value+1) where counter=(value)" until one went through,
> to avoid clashing with other instances.

Nah, a batched one would work just fine. Go see the discussion on this topic
on theserverside.com for inspiration.

> Anyway, if you want me to go ahead and put such a thing together,
> say the word - any let me know if you can see a way to do it other than
> involving the DB.

Db, yes, but a little more clever than having to update on each frickin
key...

/Rickard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread VASQUEZ_JASON

You could avoid clashing with keys generated by the db by using a string type key with a prefix or suffix specific to jBoss, and avoid the clustering problem by using an additional prefix/suffix with a server identifer (hashed hostname, ip, whatever)








Aaron Mulder <[EMAIL PROTECTED]>
10/18/2000 01:44 PM
Please respond to jBoss

        
        To:        jBoss <[EMAIL PROTECTED]>
        cc:        
        Subject:        RE: [jBoss-User] Re: [jBoss-User]

                 Well... we could certainly do that, but...

1) What data type?  I would think Int and String would be the most common.
2) How do we prevent ourselves from generating keys that have already been
used?  Especially when we move to a clustered environment, where each
server would have the key generator service (unless handled carefully).
3) How do we avoid clashing with keys generated by the DB itself or other
software?

                 The most reasonable way would be to use the DB-specific key
generation, but that only works for DBs that support it (Oracle and
PostgreSQL, that I'm aware of), and would require user configuration (to
pick a DB).  I suppose we could make a "generic" setting that just uses a
normal DB table, but it would have to just keep issuing SQL like "update
foo set counter = (value+1) where counter=(value)" until one went through,
to avoid clashing with other instances.
                 Anyway, if you want me to go ahead and put such a thing together,
say the word - any let me know if you can see a way to do it other than
involving the DB.

Aaron

On Wed, 18 Oct 2000, marc fleury wrote:
> why don't *we* provide the damn counter MBean (off by default) as a standard
> service of our platform (once and for all, gaddamit)
> 
> I don't remember the thread so flame if you wish
> 
> marc
> 
> 
> |-Original Message-
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Mulder
> |Sent: Wednesday, October 18, 2000 8:26 AM
> |To: jBoss
> |Subject: Re: [jBoss-User] Re: [jBoss-User]
> |
> |
> |                 A Managed Bean.  It's a JMX (Java Management eXtensions)
> |construct.  Everything you load in the conf/jboss.conf file is an MBean,
> |so you can look at the implementations of some of those for ideas.  This
> |is a big task, though, so you may be better served by just executing a
> |query against your DB to retrieve the next key (for example, "select
> |sequence.nextval from dual" on Oracle).  That is, you may want to just do
> |that in your EJB. The MBean approach would be more generic (it could work
> |for a number of EJBs with independent key sequences), but more complex
> |too.
> |
> |Aaron
> |
> |On Wed, 18 Oct 2000, Bjarne Olsen wrote:
> |> Thanks for your answer, but what is an MBean ? (or just a typing
> |mistake?)
> |
> |
> |
> |--
> |--
> |To subscribe:        [EMAIL PROTECTED]
> |To unsubscribe:      [EMAIL PROTECTED]
> |Problems?:           [EMAIL PROTECTED]
> |
> |
> 
> 
> 
> --
> --
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 



--
--
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]





Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Rickard Oberg

> why don't *we* provide the damn counter MBean (off by default) as a
standard
> service of our platform (once and for all, gaddamit)

MBean is overkill IMHO. It is possible to do a generic counter with only
EJB's and I have put a first version into jbosstest under "idgen" package.
Something like that should work well: a session and an entity working
together producing batched enumerated numbers.

/Rickard




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Aaron Mulder

Well... we could certainly do that, but...

1) What data type?  I would think Int and String would be the most common.
2) How do we prevent ourselves from generating keys that have already been
used?  Especially when we move to a clustered environment, where each
server would have the key generator service (unless handled carefully).
3) How do we avoid clashing with keys generated by the DB itself or other
software?

The most reasonable way would be to use the DB-specific key
generation, but that only works for DBs that support it (Oracle and
PostgreSQL, that I'm aware of), and would require user configuration (to
pick a DB).  I suppose we could make a "generic" setting that just uses a
normal DB table, but it would have to just keep issuing SQL like "update
foo set counter = (value+1) where counter=(value)" until one went through,
to avoid clashing with other instances.
Anyway, if you want me to go ahead and put such a thing together,
say the word - any let me know if you can see a way to do it other than
involving the DB.

Aaron

On Wed, 18 Oct 2000, marc fleury wrote:
> why don't *we* provide the damn counter MBean (off by default) as a standard
> service of our platform (once and for all, gaddamit)
> 
> I don't remember the thread so flame if you wish
> 
> marc
> 
> 
> |-Original Message-
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Mulder
> |Sent: Wednesday, October 18, 2000 8:26 AM
> |To: jBoss
> |Subject: Re: [jBoss-User] Re: [jBoss-User]
> |
> |
> | A Managed Bean.  It's a JMX (Java Management eXtensions)
> |construct.  Everything you load in the conf/jboss.conf file is an MBean,
> |so you can look at the implementations of some of those for ideas.  This
> |is a big task, though, so you may be better served by just executing a
> |query against your DB to retrieve the next key (for example, "select
> |sequence.nextval from dual" on Oracle).  That is, you may want to just do
> |that in your EJB. The MBean approach would be more generic (it could work
> |for a number of EJBs with independent key sequences), but more complex
> |too.
> |
> |Aaron
> |
> |On Wed, 18 Oct 2000, Bjarne Olsen wrote:
> |> Thanks for your answer, but what is an MBean ? (or just a typing
> |mistake?)
> |
> |
> |
> |--
> |--
> |To subscribe:[EMAIL PROTECTED]
> |To unsubscribe:  [EMAIL PROTECTED]
> |Problems?:   [EMAIL PROTECTED]
> |
> |
> 
> 
> 
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
> 



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Tim White

marc fleury wrote:
> 
> why don't *we* provide the damn counter MBean (off by default) as a standard
> service of our platform (once and for all, gaddamit)

I'd be happy with that. :)

Thanks,

Tim


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread marc fleury

why don't *we* provide the damn counter MBean (off by default) as a standard
service of our platform (once and for all, gaddamit)

I don't remember the thread so flame if you wish

marc


|-Original Message-
|From: [EMAIL PROTECTED]
|[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Mulder
|Sent: Wednesday, October 18, 2000 8:26 AM
|To: jBoss
|Subject: Re: [jBoss-User] Re: [jBoss-User]
|
|
|   A Managed Bean.  It's a JMX (Java Management eXtensions)
|construct.  Everything you load in the conf/jboss.conf file is an MBean,
|so you can look at the implementations of some of those for ideas.  This
|is a big task, though, so you may be better served by just executing a
|query against your DB to retrieve the next key (for example, "select
|sequence.nextval from dual" on Oracle).  That is, you may want to just do
|that in your EJB. The MBean approach would be more generic (it could work
|for a number of EJBs with independent key sequences), but more complex
|too.
|
|Aaron
|
|On Wed, 18 Oct 2000, Bjarne Olsen wrote:
|> Thanks for your answer, but what is an MBean ? (or just a typing
|mistake?)
|
|
|
|--
|--
|To subscribe:[EMAIL PROTECTED]
|To unsubscribe:  [EMAIL PROTECTED]
|Problems?:   [EMAIL PROTECTED]
|
|



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Bjarne Olsen

I think I'm gonna try the easy way ;-)

-- 
Sent through GMX FreeMail - http://www.gmx.net



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Aaron Mulder

A Managed Bean.  It's a JMX (Java Management eXtensions)
construct.  Everything you load in the conf/jboss.conf file is an MBean,
so you can look at the implementations of some of those for ideas.  This
is a big task, though, so you may be better served by just executing a
query against your DB to retrieve the next key (for example, "select
sequence.nextval from dual" on Oracle).  That is, you may want to just do
that in your EJB. The MBean approach would be more generic (it could work
for a number of EJBs with independent key sequences), but more complex
too.

Aaron

On Wed, 18 Oct 2000, Bjarne Olsen wrote:
> Thanks for your answer, but what is an MBean ? (or just a typing mistake?)



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-10-18 Thread Bjarne Olsen

Thanks for your answer, but what is an MBean ? (or just a typing mistake?)

-- 
Sent through GMX FreeMail - http://www.gmx.net



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User][jBoss-User] Re:[jBoss-User] java.lang.ClassCastException:java.rmi.MarshalledObject

2000-09-25 Thread Brandon Campbell

I update my version of jboss from cvs and it now works.


>>> [EMAIL PROTECTED] 09/25/00 04:00PM >>>
Some additional Information.  I can call the setters but not the getters.  They return 
a String.

>>> [EMAIL PROTECTED] 09/25/00 03:56PM >>>
I have a simple entity bean that I connect to, and create a new entity,  But when I 
get the remote interface and attempt to call a business method I get the following 
Exception.

java.lang.ClassCastException: java.rmi.MarshalledObject
at $Proxy1.getAddress(Unknown Source)
at com.trainseek.email.ejb.entity.EMailClient2.(EMailClient2.java:34)
at com.trainseek.email.ejb.entity.EMailClient2.main(EMailClient2.java:59)
Exception in thread "main" 

Can anyone help?

Brandon
[EMAIL PROTECTED] 




--
--
To subscribe:[EMAIL PROTECTED] 
To unsubscribe:  [EMAIL PROTECTED] 
Problems?:   [EMAIL PROTECTED] 




--
--
To subscribe:[EMAIL PROTECTED] 
To unsubscribe:  [EMAIL PROTECTED] 
Problems?:   [EMAIL PROTECTED] 




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re:[jBoss-User] java.lang.ClassCastException:java.rmi.MarshalledObject

2000-09-25 Thread Brandon Campbell

Some additional Information.  I can call the setters but not the getters.  They return 
a String.

>>> [EMAIL PROTECTED] 09/25/00 03:56PM >>>
I have a simple entity bean that I connect to, and create a new entity,  But when I 
get the remote interface and attempt to call a business method I get the following 
Exception.

java.lang.ClassCastException: java.rmi.MarshalledObject
at $Proxy1.getAddress(Unknown Source)
at com.trainseek.email.ejb.entity.EMailClient2.(EMailClient2.java:34)
at com.trainseek.email.ejb.entity.EMailClient2.main(EMailClient2.java:59)
Exception in thread "main" 

Can anyone help?

Brandon
[EMAIL PROTECTED] 




--
--
To subscribe:[EMAIL PROTECTED] 
To unsubscribe:  [EMAIL PROTECTED] 
Problems?:   [EMAIL PROTECTED] 




--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




RE: [jBoss-User]Re:[jBoss-User][Containerfactory]java.lang.ClassNotFoundException

2000-09-19 Thread Jon Finanger

> Jon: I missed your mail last friday. Sorry.

No problem! I never expect to get an immidiate answer on a question. Anyhow,
you are doing a GREAT job helping on this list. Thats crusial to the
project!
Hats off! :)

> This java.lang.ClassNotFoundException is cosmetic and stems from
> the way the container looks for a default datasource.
> See
> http://www.mail-archive.com/jboss->
[EMAIL PROTECTED]/msg01891.html

Hmmm...then i assume its not only me getting this exception. Well, if its a
trivial problem i do not bother.

/Jon



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re:[jBoss-User][Containerfactory]java.lang.ClassNotFoundException

2000-09-19 Thread Ole Husgaard

Hi,

Jon: I missed your mail last friday. Sorry.

Jon Finanger wrote:
> 
> >   Could you post a more detailed stack trace?  It's hard to tell
> > what could be wrong when you just say it's a NoSuchMethodException.  In
> > fact, why don't you just post the entire server output...
> 
> Yes, why dont I? :-)
> Here it is:
> --
> 
> [Console logging] Logging started
> [Classpath] Added directory:file:/C:/jboss/log/
> [Classpath] Added directory:file:/C:/jboss/tmp/
> [Classpath] Added directory:file:/C:/jboss/db/
> [Info] Java version: 1.3.0,Sun Microsystems Inc.
> [Info] Java VM: Java HotSpot(TM) Client VM 1.3.0-C,Sun Microsystems Inc.
> [Info] System: Windows NT 4.0,x86
>[cut]
> [Container factory] Binding an EJBReference ejb/myEJBRef
> [Container factory] Binding ejb/myEJBRef to internal JNDI source:
> nextgen.Statel
> essSession
> [Container factory] java.lang.ClassNotFoundException: class
> org.jboss.security.E
> JBSecurityManagerDefaultImpl
> [Container factory] Using default DataSource:Hypersonic
>[cut]

This java.lang.ClassNotFoundException is cosmetic and stems from
the way the container looks for a default datasource.
See http://www.mail-archive.com/[email protected]/msg01891.html


Best Regards,

Ole Husgaard.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-09-18 Thread VASQUEZ_JASON

Thanks...that was it exactly!

-Jason






Aaron Mulder <[EMAIL PROTECTED]>
09/18/00 11:17 AM
Please respond to jBoss

 
To: jBoss <[EMAIL PROTECTED]>
cc: 
Subject:Re: [jBoss-User]



Try using a javax.sql.Date, Time, or Timestamp instead of a
java.util.Date.  JDBC isn't aware of "java.util.Date" per se, so you
should use one of the javax.sql subclasses instead.

Aaron

On Sun, 17 Sep 2000 [EMAIL PROTECTED] wrote:
> Hi,
>
> While exercising the baseline functionality of CMP, I'm running into a
> problem with retrieving dates.  I'm attempting to deploy with no 
jaws.xml
> or jboss.xml (using the server defaults, which I believe should be
> deploying to Hypersonic).
>
> I have a test client which creates an instance of my bean in the db, 
then
> performs a findAll on that type of bean.  This part works ok, and I can 
get
> an iterator with the beans.  I can even cast each item to the bean type 
ok.
> But, as soon as I call a method on the bean, I get this error:
>
> java.sql.SQLException:  Unable to load a ResultSet column into a 
variable
> of type 'java.util.Date': java.io.StreamCorruptedException: InputStream
> does not contain a serialized object
>
> I get this error whether I'm actually attempting to retrieve a date or 
not
> (I assume the container probably retrieves all the fields on the first
> call, so this would make sense, I guess).
>
> Any ideas as to what might be happening here?  My next step would be to 
put
> together a jaws.xml and jboss.xml, but I had read previously on this 
list,
> that for basic setups, the defaults should work ok..
>
> -Jason
>
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]





--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re: [jBoss-User]

2000-07-31 Thread Ken Jenks

"Josh Zeidner" <[EMAIL PROTECTED]> asked:

>I am trying to run the InterestClient example and Im getting this message:
>
>javax.naming.NoInitialContextException: Cannot instantiate class: 
>org.jnp.interfaces.NamingContextFactory [Root exception is 
>java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
>
>does anyone know what the problem is?

Yes. The problem is that jBoss doesn't use the same JNDI naming conventions 
as the InterestClient example assumes. Take a look at my altered clients -- 
and my altered TravelAgentBean -- at .

(Note: My solution isn't optimal. I'm still trying to figure out how to do 
this with jus a jboss.xml and no modification to the client code. Stay tuned.)

-- Ken Jenks, http://abiblion.com/

Tools for reading.


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re:[jBoss-User]jndiContext.lookup("java:comp/env/Cabin")Question?

2000-07-18 Thread Rickard Öberg

Hi!

Ken Jenks wrote:
> org.jboss.ejb.plugins.jrmp13.interfaces.HomeProxy (no security manager
> : RMI class loader disabled)

You are missing the jBoss specific classes. Either
1. set a security manager and use dynamic classloading
(System.setSecurityManager(new SecurityManager()))
2. add /client/jboss-client.jar to your clients classpath

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




[jBoss-User] Re:[jBoss-User]jndiContext.lookup("java:comp/env/Cabin")Question?

2000-07-16 Thread Rickard Öberg

Hi!

pranab wrote:
>From a long discussion on the JNDI Namespace on JBOSS I came to
> understand
>   there are two faces of it.
>   1) The view within the jboss server.

One/bean, yes.

>   2) the view from outside.

The global namespace, yes, which is also visible to the beans.

>The view within:-
>This view is only for the objects/EJBS deployed on the server to find
> information
>about other EJB's ,environment variables and references.So you can
> use
>"java:comp/env" prefix or context to get a listing of other
> beans,env. vars. and refs.
>Another way of putting it is it is available to clients of a deployed
> EJB which
>itself is a deployed EJB.

It is available to all EJB components, yes.

>The view from outside:
>This view id for all clients which run separately from the jboss
> server.Here one will
>see listed in the default root context the database jndi refs,EJBHome
> refs,JMX ref,Transaction Manager ref.,data base connection pool ref and
> any sub contexts
>  which is totally decided by the by virtue of their naming style.e.g.
>  (Context) [root]-+
>   |
>   +- (Context) jdbc -+
>   |  |
>   |  +- OracleDB
>   +- (Object Ref) Transaction Manager

Correct.

>  Sample list
> 
>  Object:Hypersonic: org.jboss.jdbc.DataSourceImpl
>  Object:jmx: org.jboss.jmx.server.JMXAdaptorImpl
>  Object:TravelAgentBean: $Proxy0
>  Object:Cabin: $Proxy1
>  Object:jdbc: org.jnp.interfaces.NamingContext
>  Object:xa.postgresqlPool: org.jboss.minerva.datasource.XAPoolDataSource
>  Object:InstantDB: org.jboss.jdbc.DataSourceImpl
>  Object:TransactionManager: class org.jboss.tm.TxManager
>  initial context :javax.naming.InitialContext@b66cc
>  Object:jdbc/postgresql: org.jboss.jdbc.DataSourceImpl
> 
>  The only difference being that you dont have to user the
> "java:comp/env" prefix to
>  do the lookup.Somehow I feel that this is what the designers of jnp had
> in mind.

This is incorrect. On the surface the difference might seem small, but
when you drill down to why it works the way it does it is much more than
that. If this was the only difference, then why add the java:-namespace?
It wouldn't add much, would it?

The idea is to make it easy to do reusable components that can be used
in a variety of contexts in different applications. Without a layer of
indirection that you can use to glue together loosely coupled
components, this would not be possible, or at least significantly
harder.

>  As per EJB1.1 spec. you tend to think that using "java:comp/env" will
> work for
>  external EJB clients.

And as of J2EE 1.2 this should indeed work. We need to add this
capability.

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-06-14 Thread Rickard Öberg

Hi!

coco Cambol wrote:
> 
> Thanks for the reply. Sorry for the long unclear question that I brough out
> in last mail.
> 
> Actually what I want to ask is why the client program throw the "ABCHome"
> not bound exception when it try to lookup the "ABCHome". What I can see
> buring the JBoss start up is, everything is fine and it even shown that
> "ABCHome" bounded. But I just can't lookup the object that I want to. I
> event changed my code which try to lookup the Account, Customer, Bank and so
> on which that EJBBeans came with the JBoss 2.0. It doesn't work. All
> thrown me the same exception said that object not bound.


I have already answered this. Read my last reply. If you don't see the
answer; read it again...and again..

/Rickard

ps. .. or what am I missing???

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-06-14 Thread coco Cambol

Thanks for the reply. Sorry for the long unclear question that I brough out 
in last mail.

Actually what I want to ask is why the client program throw the "ABCHome" 
not bound exception when it try to lookup the "ABCHome". What I can see 
buring the JBoss start up is, everything is fine and it even shown that 
"ABCHome" bounded. But I just can't lookup the object that I want to. I 
event changed my code which try to lookup the Account, Customer, Bank and so 
on which that EJBBeans came with the JBoss 2.0. It doesn't work. All 
thrown me the same exception said that object not bound.

Please help me how to get it work and I feel like crazy as I totaly have no 
ideal how to get it work. I beleaved some one out there did faced the same 
problem before and able to solve the problem. Please help up

Thanks...

Coco


>From: Rickard Öberg <[EMAIL PROTECTED]>
>Reply-To: "jBoss" <[EMAIL PROTECTED]>
>To: jBoss <[EMAIL PROTECTED]>
>Subject: [jBoss-User] Re: [jBoss-User]
>Date: Wed, 14 Jun 2000 10:34:50 +0200
>
>Hi!
>
>coco Cambol wrote:
> > I'm a new to JBoss (not really)and been try to use it since a month 
>ago.
> > But still can't get it works for me. The very first problem that I faced 
>was
> > I got the wrong version of JDK to run JBoss. It suppose to use JDK1.3 
>but I
> > use JDK1.2.2 . Anyway, now the server is working I mean JBoss is working
> > once I swich to JDK1.3 beta(Linux).
>
>You can use JDK 1.2.2 but you must make sure that you configure your
>beans to use the JDK 1.2.2 containerinvoker plugin and not the 1.3 one.
>
> > Now I got another problem which is I can't get the client connect to the
> > JBoss. May be it's connected but I get the error exception said that the
> > HomeObject I lookuped was not found...
> >
> > Actuall message :
> >
> > javax.naming.NameNotFoundException: ABCHome not bound
>
>It's in the details. "ABCHome" is not bound.
>
> > [Container factory] Bound ABCBean to ABCBean
>
>But "ABCBean" is. ABCHome != ABCBean. Make sure you look up the same
>name you bind to.
>
> > Below is the code of my client program
> >
> > try {
> > Properties prop = /*System.getProperties();//*/new Properties();
> > 
>prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
>
>This isn't necessary. Put this in jndi.properties, and make that file
>available through JNDI.
>
> > try {
> > ctx = new InitialContext(prop);
> > System.out.println("Got context");
> > } catch (NamingException nme) {
> > System.out.println("Can't get context...");
> > nme.printStackTrace();
> > }
> >
> > try {
> > System.out.println("Find home");
> > //  home = (ConverterHome)
> > javax.rmi.PortableRemoteObject.narrow(ctx.lookup("ConverterBean"));
> > home = (ConverterHome)  ctx.lookup("ConverterHome");
> > System.out.println("Found home");
> > } catch (Exception e) {
> > System.out.println("Can't lookup ConverterHome...");
> > e.printStackTrace();
> > }
> >
> > As you see from the code, I event try to lookup the "ABCHome" by using 
>the
> > rmi.lookup method. But it doesn't work.
>
>You're not looking up "ABCHome" at all. You're looking for
>"ConverterHome". What are you talking about???
>
> > Please help me and  I also wondering about the JBoss which I have to 
>run
> > the clinet program at the director where JNDI.properties (and those 
>files in
> > the /conf) located. If I don't run the client in the directory which has
> > those files I get the error exception said that
> >
> > Actuall message :
> >
> > javax.naming.ServiceUnavailableException: rmi.  Root exception is
> > java.net.UnknownHostException: rmi
> > at java.net.InetAddress.getAllByName0(InetAddress.java:571)
> > at java.net.InetAddress.getAllByName0(InetAddress.java:540)
> > at java.net.InetAddress.getByName(InetAddress.java:449)
> > at java.net.Socket.(Socket.java:100)
> > at 
>org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:503)
> > at 
>org.jnp.interfaces.NamingContext.lookup(NamingContext.java:159)
> > at 
>org.jnp.interfaces.NamingContext.lookup(NamingContext.java:152)
> > at javax.naming.InitialContext.l

RE: [jBoss-User] Re: [jBoss-User]

2000-06-14 Thread marc fleury

> Yes, there are lots of reading to do these days :-) EJB 2.0 is a goddamn
> pleasure to read though. Excellent work (besides that IIOP c*p of course
> ;-)

F*&*&##*# @@* the #@#@!!DC#@#@ on *D*#*#@@@#$ RMI-IIOP !!!

man I'm looping

marc

>
> /Rickard
>
> --
> Rickard Öberg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]
>
>



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-06-14 Thread Rickard Öberg

Hey

Geoff Hill wrote:
> and my JNDI spec is buried on my desk under the 500 page EJB2 one :-) (they are all 
>buried
> under that one)

Yes, there are lots of reading to do these days :-) EJB 2.0 is a goddamn
pleasure to read though. Excellent work (besides that IIOP c*p of course
;-)

/Rickard

-- 
Rickard Öberg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com


--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




Re: [jBoss-User] Re: [jBoss-User]

2000-06-14 Thread Geoff Hill

Thanks,

and my JNDI spec is buried on my desk under the 500 page EJB2 one :-) (they are all 
buried
under that one)

Rickard Öberg wrote:

> Hi!
>
> Geoff Hill wrote:
> > > This isn't necessary. Put this in jndi.properties, and make that file
> > > available through JNDI.
>
> (should've been "available through classpath")
>
> > can you clear up how to "make that file available through JNDI" without having 
>some other
> > set of JNDI properties floating around.  It may be a dumb question, but all work 
>and no
> > sleep makes jack a dumb boy sometimes :-)
>
> My mistake. Put it in root classpath, as stated/described in the JNDI
> spec.
>
> /Rickard
>
> --
> Rickard Öberg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
> --
> --
> To subscribe:[EMAIL PROTECTED]
> To unsubscribe:  [EMAIL PROTECTED]
> Problems?:   [EMAIL PROTECTED]



--
--
To subscribe:[EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:   [EMAIL PROTECTED]




  1   2   >