RE: [JBoss-user] Http Session Clustering, JGStore debugging

2003-04-02 Thread Aleksandr Shneyderman


  I have reported a problem with JGstore a couple of weeks ago
 that is still
  unanswered. I would like to get my hands dirty and debug it myself.
 
  But I would like to get some tips on the way to do it. Is there a way I
  can use a kind of debugger to find out whats wrong? Should I
 rely only at
  increasing log level?
  I have no ideia if one can run jboss on top of debugguer (is
 there a java
  debuger, something similar to gdb but in java world?)

 Enable JPDA on your VM (look thru run.bat/run.sh to see how to enable it)

 Certain IDEs will let you connect to the port that JPDA is listening on
 and debug.

Sorry, forgot to mention a few:
Forte, Eclipse, never tried but I am sure they alos do JBuilder, JDeveloper
etc.


 I am not sure of gdb kind of debugger ... I think there is
 jdb in the bin directory of your JSDK.

 Alex.




---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] How to cjeckout JBoss 3.2 RC4

2003-04-01 Thread Aleksandr Shneyderman
I wanted to get a CVS copy of RC4

I do the checkout of jboss-3.2 module
with the tag of JBoss_3_2_0_RC4

Is it the right way to do it?

If it is why do I get an error building
from the source? Here is the partial build.log:


configure:
 [echo] groups:  default
 [echo] modules:
common,jmx,system,j2ee,naming,transaction,server,security,messaging,connecto
r,cluster,jetty,varia,jboss.net,iiop,management,catalina

init:

_buildmagic:modules:most:
[execmodules]
==
==  Executing 'most' in module 'common'...
==

_buildmagic:init:

configure:

init:

compile-mbean-sources:
[mkdir] Created dir: C:\projects\jboss\jboss320RC4\common\output\gen-src
[execmodules] (XDocletMain.start   45  ) Running
mbeaninterface/
[execmodules] (TemplateSubTask.engineStarted   788 ) Generating output
for 'org.jboss.util.property.jmx.SystemPropertyClassValue' using template
file
'jar:file:C:\projects\jboss\jboss320RC4\thirdparty\xdoclet\xdoclet\lib\xdocl
et-jmx-module-jb3.jar!/xdoclet/modules/jmx/resources/mbean.xdt'.
[execmodules] INFO:Some classes refer to other classes that were not
found among the sources or on the classpath.
[execmodules]  (Perhaps the referred class doesn't exist? Hasn't
been generated yet?)
[execmodules]  The referring classes do not import any fully
qualified classes matching these classes.
[execmodules]  However, since no packages are imported, xjavadoc has
assumed that the referred classes
[execmodules]  belong to the same package as the referring class.
The classes are:
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\net\protocol\URLList
erBase.java -- URLFilter qualified to org.jboss.net.protocol.URLFilter
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\property\jmx\Sy
stemPropertyClassValue.java -- SystemPropertyClassValueMBean qualified to
org.jboss.util.property.jmx.SystemPropertyClassValueMBean

compile-classes:
[mkdir] Created dir: C:\projects\jboss\jboss320RC4\common\output\classes
[javac] Compiling 192 source files to
C:\projects\jboss\jboss320RC4\common\output\classes
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:9: package javax.management does not exist
[execmodules] import javax.management.DynamicMBean;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:10: package javax.management does not exist
[execmodules] import javax.management.AttributeNotFoundException;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:11: package javax.management does not exist
[execmodules] import javax.management.MBeanException;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:12: package javax.management does not exist
[execmodules] import javax.management.ReflectionException;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:13: package javax.management does not exist
[execmodules] import javax.management.Attribute;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:14: package javax.management does not exist
[execmodules] import javax.management.InvalidAttributeValueException;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:15: package javax.management does not exist
[execmodules] import javax.management.AttributeList;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:16: package javax.management does not exist
[execmodules] import javax.management.MBeanInfo;
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:22: cannot resolve symbol
[execmodules] symbol  : class DynamicMBean
[execmodules] location: class org.jboss.util.jmx.DynamicMBeanSupport
[execmodules] public class DynamicMBeanSupport implements DynamicMBean
[execmodules] ^
[execmodules]
C:\projects\jboss\jboss320RC4\common\src\main\org\jboss\util\jmx\DynamicMBea
nSupport.java:25: cannot resolve symbol
[execmodules] symbol  : class AttributeNotFoundException
[execmodules] location: class org.jboss.util.jmx.DynamicMBeanSupport
[execmodules]   throws AttributeNotFoundException, MBeanException,
ReflectionException
[execmodules]  ^
[execmodules]

RE: [JBoss-user] Re: Hibernate or ejb

2003-03-14 Thread Aleksandr Shneyderman
I do not mean to anger the public here by being off-topic,
just could not keep my mouth shut.

 The first thing we came across is the problem of lazy instantiation. Let's
 say you have
 object A that has a relation to obect B. But you only want to load A and B
 later when
 it is used. Hibernate cannot handle this (this is an open bug but maybe
 fixed in the new
 2.0 beta). We have found a way around this but it is not very nice.

Hmm, it works for me. But then again I work with 2.0. It actually
pretty neat how hibernate does things in respect of lazy collections.
You only initialize them when you need them, and I think Gavin is in
process of adding a method call called isInitialized () for a lazy
collection. You can do even more you can disconnect your session and
initialize lazy collection when you need it. Then of course you need
to reconnect with the same Session. The problem with collections is
that it is fairly  difficult to configure them and there just a gazillion
options and way to do it. You just need to experiment.

 Another thing is definitely the caching in hibernate. You never know when
 hibernate
 actually saves the data to your DB.

I think you are worng here too. First of all if you use a persistence
tool then you should not worry about when it saves the stuff to the DB.
Second of all if you do not want Hibernate to save your stuff call on
session session.setFlushMode (FlushMode.NEVER) will let you control
when you want to do the actual flushing. Then of course you need to
call session.flush () yourself. I usually do not trust my saves to
anyone :-) so the manual flush works for me.

 The last thing that kept us busy was the fact the (assume the schema as
 above)
 when you save B then A does not get updated. This means you have to take
 care of updating A manually when you change B. It took some time to figure
 this
 one out.

Not sure of this point but cascade=save-update or cascade=all setting
in the descriptor work just fine. What is true is that there is a problem
when updating the children. If you changed the child and want to somehow
update the parent at the same time you will need to do some Interceptor
coding but this is doable. For more see the hibernate forum.

 So, I have to go back to my project and get some more experience with
 hibernate.

looks like you are right :-)

Anyway hibernate is very usefull, just do not jump to the conclusions
before giving it enough time.

Alex.





---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] offtopic - generating abstract get/set

2003-03-14 Thread Aleksandr Shneyderman
actually I saw an open source product called
middlegen that would generate the entities 
for you based on your db schema, so you
would just need to point to the db and it will
create the entities for you.

google to it, I am not sure what their web site.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Felipe
 Oliveira
 Sent: Friday, March 14, 2003 12:27 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] offtopic - generating abstract get/set
 
 
 have you tried xdoclet?
 
 costin wrote:
 
   Hello!
 
   Just wondering. I`m using Eclipse but haven`t found any plugin for
   generating the abstract get/set fields in the beans. When working
   with a very complex database writing a lot of dummy methods by hand
   drives one insane.
 
   Just wondering, isn`t there a tool to make this a LOT easier?
 
 --
 Thanks,
  costin  
 
 
 
 ---
 This SF.net email is sponsored by:Crypto Challenge is now open! 
 Get cracking and register here for some mind boggling fun and 
 the chance of winning an Apple iPod:
 http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
   
 
 
 
 
 
 ---
 This SF.net email is sponsored by:Crypto Challenge is now open! 
 Get cracking and register here for some mind boggling fun and 
 the chance of winning an Apple iPod:
 http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


---
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] available cvs tags? BRANCH_3_0 ?

2003-03-05 Thread Aleksandr Shneyderman
I think it is Branch_3_0

As for the list of the branches, I use the CVS web client
of sourceforge. There is a dropdown with all the
Branches and Tags listed.


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Joao Pedro
 Clemente
 Sent: Wednesday, March 05, 2003 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] available cvs tags? BRANCH_3_0 ?



 Hi. I think this is not a configuration problem from my side...
 I've tryed to access cvs to retrieve BRANCH_3_0 cvs tree...

 My ssh clients tell me there is no such tag. I'm almost sure this was the
 one I used at the end of the year... So maybe it has changed?

 And btw... how can one know wich tags there is? Is there a cvs command for
 it, or it must be known?

 Thank you

 --
   Joao Pedro Clemente
   jpcl @ rnl.ist.utl.pt
   (when not working out)
   (when not sleeping)
   (when not surfing)
   (when not ... ;)



 ---
 This SF.net email is sponsored by: Etnus, makers of TotalView,
 The debugger
 for complex code. Debugging C/C++ programs can leave you feeling lost and
 disoriented. TotalView can help you find your way. Available on
 major UNIX
 and Linux platforms. Try it free. www.etnus.com
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] EntityBean findAll() method

2003-02-26 Thread Aleksandr Shneyderman
I think the reason (or maybe just one of them) for the 
query sent is the assumption that you might not read all 
the records all the time but only a few at a time, you 
might even stop reading them in the middle of your 
processing:

Collection c = yourBeanHome.findAll ();
// Suppose this returns 2000 records after executing 
// SQL with no where (id = ?) or (id = ?)
Iterator i = c.iterator ();
int counter = 0;
while (i.hasNext ()) { 
   YourBean yb = (YourBean) i.next ();
   if (counter  5) { break; }
   counter ++;
}

So in the scenario above you actually retireved only 
five records. If you were not to have that strange
where statement in your SQL, you would waste creation
of exactly 1995 records. But since you did have it 
you only wasted the retrieval of your ids and 
page-size - 5 records. JBoss lets you manage this 
situation thru that where and the settings in the 
jbosscmp-jdbc.xml

read-ahead
strategyon-load/strategy
  page-size1000/page-size
  eager-load-group*/eager-load-group
/read-ahead

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Rafal
 Kedziorski
 Sent: Wednesday, February 26, 2003 6:57 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] EntityBean findAll() method
 
 
 Hi,
 
 my every entity beas has findAll() method defined in ejb-jar.xml 
 as follow:
 
 query
   query-method
 method-namefindAll/method-name
   method-params/
   /query-method
   ejb-ql![CDATA[SELECT OBJECT(o) FROM firm o]]/ejb-ql
 /query
 
 Could be this done better by other mechanism? JBoss are generating this 
 query for PostgreSQL:
 
 // get all id's
 LOG:  query: SELECT t0_o.firm_id FROM firm t0_o
 
 // call for every id
 LOG:  query:
 SELECT firm_id,name FROM firm WHERE (firm_id=1) OR (firm_id=2) OR 
 (firm_id=1046258766552575) OR (firm_id=1046258766812847) OR 
 (firm_id=1046258766781998) OR (firm_id=1046258766823725) OR (
 firm_id=1046258766815290) OR (firm_id=1046258766821931) OR 
 (firm_id=1046258766808355) OR (firm_id=1046258766805899) OR 
 (firm_id=1046258766840567) OR (firm_id=1046258766818653) OR 
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)
 
 ...
 
 LOG:  query: SELECT firm_id,name FROM firm WHERE 
 (firm_id=1046258766821931) OR (firm_id=1046258766808355) OR 
 (firm_id=1046258766805899) OR (firm_id=1046258766840567) OR 
 (firm_id=1046258766818653) OR (
 firm_id=1046258766857549) OR (firm_id=1046258766870043)
 
 ...
 
 LOG:  query: SELECT firm_id,name FROM firm WHERE 
 (firm_id=1046258766818653) OR (firm_id=1046258766857549) OR 
 (firm_id=1046258766870043)
 
 ...
 
 LOG:  query: SELECT firm_id,name FROM firm WHERE 
 (firm_id=1046258766857549) OR (firm_id=1046258766870043)
 
 ...
 
 // last sql query
 LOG:  query: SELECT firm_id,name FROM firm WHERE 
 (firm_id=1046258766870043)
 
 
 why are sending JBoss not for every firm_id one query?
 
 I have other tables, where are stored much more values. which generate 
 than longer query.
 
 
 Best Regards,
 Rafal
 
 
 
 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman
First of the names of the beans should match in your
ejb-jar.xml (HandlerBean) and jbosscmp-jdbc.xml (you have TestBean)

Second of all I am not sure if you can deploy your app in
a single war. My suspision is that you would nedd to break
it up on war [put your web stuff in here] and ejb.jar [put
your ejbs in here] then merge them together into ear.

Basically the structure should look something like the following:

your-ejb.jar
  test/
 YourEjb.class
  META-INF/
 jbosscmp-jdbc.xml
 jboss.xml
 ejb-jar.xml

your-app.war
  index.jsp
  WEB-INF/
 web.xml
 jbossweb.xml
 lib/
ejb-client.jar

app.ear
  your-app.war
  your-ejb.jar
  MEAT-INF/
 application.xml

and you only copy app.ear into deploy directory

you basically have anywhere from 3 to 6 xml descriptors
to figure out :-)

  ejb-jar.xml [required]
  web.xml [required]
  application.xml [required]

  jbosscmp-jdbc.xml [optional]
  jboss.xml [optional]
  jbossweb.xml  [optional]

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of costin
 Sent: Wednesday, February 26, 2003 7:33 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] help with bounding entity bean


   Hi!

   I know that there are responses on the list for this kind of
   problem but there is no archive...yet.

   I am new to JBoss after moving from Resin EE and I am trying to get
   the hand of it - especially in the deployment area.

   I have read a lot of tutorials based on ant (includind the official
   doc) but I can`t make the entity bean bound.

   I have been banging my head agains the wall for the last day and it`s
   starting to hurt really bad so any help will be greatly appreciated.


   Okay, before giving the details here is the behaviour:

   the war is deployed okay and I can see the index.html page. The bean
   classes are very simple - I have listed them at the end of the
   message. The problem is that when I am accessing the jsp I cannot
   get the entity bean reference:

 snip from the log - the extra logging is from the jsp

 14:11:10,217 INFO  [jbossweb] Started
 WebApplicationContext[/bs,file:/usr/local/jboss-3.0.6/server/defau
 lt/deploy/bs.war/]
 14:11:10,394 INFO  [jbossweb] successfully deployed
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.war/ to /bs
 14:11:10,394 INFO  [MainDeployer] Deployed package:
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.war/
 14:11:31,375 INFO  [jbossweb] Registered
 jboss.web:Jetty=0,HttpContext=0,context=/
 14:11:31,389 INFO  [jbossweb] Registered
 jboss.web:Jetty=0,HttpContext=0,context=/,RootNotFoundHandler=0
 14:11:31,390 INFO  [jbossweb] Started HttpContext[/]
 14:11:44,567 INFO  [jbossweb] Got context
 14:11:44,644 WARN  [jbossweb] WARNING: Naming Exception 1046261504621
 javax.naming.NameNotFoundException: HandlerBean not bound
 at org.apache.jsp.test$jsp.jspInit(test$jsp.java:52)
 at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:90)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspSer
 vlet.java:142)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNeces
 sary(JspServlet.java:178)
 at
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
 Servlet.java:188)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
 at
 org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplic
 ationHandler.java:280)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
 at
 org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicat
 ionContext.java:549)
 at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
 at org.mortbay.http.HttpServer.service(HttpServer.java:862)
 at org.jboss.jetty.Jetty.service(Jetty.java:497)
 at
 org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
 at
 org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
 at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
 at
 org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
 at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
 at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)

 14:11:44,645 INFO  [jbossweb] Naming Exception 1046261504621:
 javax.naming.NameNotFoundException: HandlerBean not bound

 /snip

   Here`s is my configuration:

   jboss-3.0.6 on RH 7.3

 $ java -version
 java version 1.4.1_01
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
 Java HotSpot(TM) Client VM (build 

RE: Re: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman
nope you just drop the ear and it will be deployed
or just copy the directory with the structure of 
the archive and name it in a way that that will end 
with .ear

The main point is taht you need to deploy your ejb 
and war in separate pieces

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of costin
 Sent: Wednesday, February 26, 2003 8:32 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Re: [JBoss-user] help with bounding entity bean
 
 
 Hello!
 
 If you deployed the directory shown I'm surprised anything at 
 all deployed.
 
 You need to package ejbs separately from jsp/servlets.  If you want one
 deployment unit use and .ear
 
 david jencks
 
 Maybe I am missing something here but I am using hot deployment. I
 don`t pack/jar or archive in away the files.
 
 Is there a different strucure I need to use when hot-deploying...?
 
 -- 
  costin  
 
 
 
 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] EntityBean findAll() method

2003-02-26 Thread Aleksandr Shneyderman
 But I want read alle entries. And I have the problem with the query 
 which is created by JBoss. I need all entries to generate for every a 

I am not sure what is the problem though if you need all entries just
go thru all the elements of your collection that you get after findAll 
and you will get all of your entries.

 but I don't want use SQL code in my application.
 
 while calling findAll() JBoss are sending first query to get all id's. 
 now comes n queries. and why is JBoss not sending for each id one query?
 JBoss sends in the fist call all id's linked by 'or' operator. in the 
 secodn there are n-1 id's and so long.

You look at it as if you are the only one who has a problem to solve. 
JBoss looks at the worst case scenario and the best case scenario and 
try to find a solution that is optimal. That might not be neccesarily 
an optimal solution in each individual case. 



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: Re[2]: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman
 P.S. btw, except the payed docs can you recommend something else?

You would need for pay docs because they will just save you time
for not browsing the DTDs. Those have lots of comments inside.

Read forums. I know it is very slow but can be usefull. Slow down
in order to accelerate :-)

Well then there is always Sun shining at us ;-) Those are free
you would not need to wait for the money to come.

 P.P.S how important are the payed docs? (on a scale from 1 to 10)?

99; 

Theoretically you would not need a document :-), since there is
source but in practice docs will save you time.

The CMP handbook is usefull but do not trust everything that is 
written in it. I mean get the concepts from it but read DTDs for 
the detailed syntax. It is full of syntax errors [well at least 
the last version I bought]


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: Re[4]: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman
you need to declare ejb-ref in web.xml:
ejb-ref
descriptionHandlerBean/description
ejb-ref-nameHandlerBean/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
hometest.HandlerHome/home
remotetest.Handler/remote
/ejb-ref

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of costin
 Sent: Wednesday, February 26, 2003 10:43 AM
 To: Aleksandr Shneyderman
 Subject: Re[4]: [JBoss-user] help with bounding entity bean
 
 
 Okay, thanks for the tips.
 
 I have deployed the apps to the destination but still I can`t get the
 reference to the bean.
 
 Again, here is the directory list:
 
 bs.ear
 |-- META-INF
 |   `-- application.xml
 |-- bs-ejb.jar
 |   |-- META-INF
 |   |   `-- ejb-jar.xml
 |   `-- test
 |   |-- Handler.class
 |   |-- HandlerBean.class
 |   `-- HandlerHome.class
 |-- bs-web.war
 |   |-- WEB-INF
 |   |   `-- web.xml
 |   |-- index.html
 |   `-- test.jsp
 `-- lib
 `-- test - ../bs-ejb.jar/test
 #
 
 and here is a snip from the logs:
 
 [MainDeployer] Starting deployment of package: 
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
 [EARDeployer] Init J2EE application: 
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
 [EjbModule] Creating
 [EjbModule] Deploying HandlerBean
 [EjbModule] Created
 [EjbModule] Starting
 [HandlerBean] Table 'HANDLERBEAN' already exists
 [EjbModule] Started
 [Manager] cloning Manager: [EMAIL PROTECTED]
 [JBossWebApplicationContext] setDistributableSessionManager 
 [EMAIL PROTECTED]
 [jbossweb] Registered 
 jboss.web:Jetty=0,JBossWebApplicationContext=2,context=/bs
 [jbossweb] Started 
 WebApplicationContext[/bs,file:/usr/local/jboss-3.0.6/server/defau
lt/deploy/bs.ear/bs-web.war/]
 [jbossweb] successfully deployed 
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/bs-web.wa
 r/ to /bs
 [MainDeployer] Deployed package: 
 file:/usr/local/jboss-3.0.6/server/default/deploy/bs.ear/
 
 
 So, the bean is finally deploying.
 However the jsp can`t see it:
 
 
 
 %
 HandlerHome home;
 
 try
 {
 
 InitialContext initial = new InitialContext();
 getServletContext().log(Got context);
 
 home = (HandlerHome) initial.lookup(HandlerBean);
getServletContext().log(Got reference);
 } 
 catch (NamingException e)
 {
 getServletContext().log(Naming Exception 
 +System.currentTimeMillis(),
 
 e.fillInStackTrace());
 }
 
 %
 #
 
 
 I didn`t post the dtds because the logs is pretty obvious. As you can
 see there is no jboss*.xml so the mapping should be straight forward -
 however the seeking doesn`t work.
 
 Where`s the glitch?
 
 --
 Thanks,
  costinmailto:[EMAIL PROTECTED]
 
 
 
 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: Re[3]: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman
 
 Btw, how can I use the general context search, i.e.
 java:/comp/env/...

 
use ejb-ref or ejb-local-ref in your web.xml





---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: Re[5]: [JBoss-user] help with bounding entity bean

2003-02-26 Thread Aleksandr Shneyderman

 Just to see that I am sure(please correct me and ofc any explanation
 is appreciated).

 the ejb-ref and ejb-local-ref work also with local/HandlerBean
 meaning I still a re-map from local/HandlerBean to something else.

 The ejb-ref and friends as far as I know is used together with the
 session bean. In my case I could access the bean without using the
 ejb-ref (I found it`s name from the jmx-console). (can anyone shed
 some light in this area?).

Okay, each component [application, web context, ejb, ] you deply
will have its own Context. It will be located at java:/comp/env.

Now if you are looking for something that is bound to java:/comp/env
from with a servlet you have to put it there. You would put it there
thru ejb-ref in your web.xml

If you used java:/comp/env from within an EJB then you would need
references in the ejb-jar.xml

That is all true about local context. JBoss however has a global context.
Where it binds your objects. I am not sure exactly what convention is
when you do not provide those three optional xmls that I was talking
about in my earlier post, but those are basically needed to provide
connections.

So jboss.xml will bind your ejbs into the global context so that other
components [apps] can reference it (in their local java:/comp/env;
jbossweb.xml will do similar job for your web app.


Okay just to give you some example, suppose we have a bean Facade:

ejb-jar.xml

  session 
description![CDATA[Facade Bean]]/description
ejb-nameFacade/ejb-name
homeedu.columbia.law.tas.ejb.FacadeHome/home
remoteedu.columbia.law.tas.ejb.Facade/remote
ejb-classedu.columbia.law.tas.ejb.FacadeEJB/ejb-class
session-typeStateful/session-type
transaction-typeContainer/transaction-type
  /session

jboss.xml

  session
ejb-nameFacade/ejb-name
!-- note this is your global name for FacadeHome
watch it referenced in jbossweb.xml --
jndi-nameejb/tas/FacadeHome/jndi-name
  /session

web.xml
  !-- this is the declaration that will bind FacadeHome into the
   local context of your web application so that you can do

   InitialContext initialContext = new InitialContext();
   try {
 java.lang.Object objRef =
initialContext.lookup(java:/comp/env/ejb/Facade);
 return (edu.columbia.law.tas.ejb.FacadeHome)
  PortableRemoteObject.narrow(
objRef,
edu.columbia.law.tas.ejb.FacadeHome.class);
   } finally {
 initialContext.close();
   }
 --
  ejb-ref
ejb-ref-nameejb/Facade/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homeedu.columbia.law.tas.ejb.FacadeHome/home
remoteedu.columbia.law.tas.ejb.Facade/remote
ejb-linkFacade/ejb-link
  /ejb-ref

jbossweb.xml
   !-- finally this is where you connect your ejb/Facade to
the global home --
   ejb-ref
 ejb-ref-nameejb/Facade/ejb-ref-name   !-- local name fo it --
 jndi-nameejb/tas/FacadeHome/jndi-name !-- global context look at
jboss.xml  --
   /ejb-ref

That is about it. The only thing that I can not find in jmx-console
is how do I see the env context of my web context it has to have
one, but it might be Jetty hidden. So I have not found a way to browse it.

Alex.



---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] TOP like functionality for jboss

2003-02-24 Thread Aleksandr Shneyderman
There is also JDJ article in Feb. 2003 Vol 8, Issue 2
on profiling.

It seems from the article that the code will be platform
dependent, cause you would need to write some C/C++
libs.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 3:36 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] TOP like functionality for jboss



 måndagen den 24 februari 2003 kl 20.56 skrev Bill Burke:

  That WOULD be cool.  Write it! Write it!  But is it even possible to
  write
  in Java?

 Maybe this could be a good starting point :
 http://www.yoda.arachsys.com/java/jbench/docs/cputimer.html
 I also recall Stefan-A had some thoughts here ...


 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Recursive Tables (Trees) and CMP in JBoss

2003-02-20 Thread Aleksandr Shneyderman
 my problem is to represent this structure in cmp ejb. 
 any ideas?

The only pecky part of your schema is that self 
referenced EJB (tree). As to others relations
they are straight forward, just relate :-).

I am attaching zipped sample code that has the 
following relation coded:

 +---+
 | participant   |
 +---+  *
 | idinteger pk  | --+
 | name  varchar ||
 | manager   integer | ---+
 | ...   |  1   
 +---+ 

it is xdocleted code (and will not compile as is, since it 
references couple of other classes that you do not have, 
and has omissions from the original) but see the descriptors 
that it generates (I only have the relevant parts in there). 
The table created is the one shown above or very close to that.

 is it possible to access these objects
 over SOAP webservices?   

do not know.


recursiveEJB.zip
Description: Zip compressed data


RE: [JBoss-user] How to prevent auto table creation?

2003-02-17 Thread Aleksandr Shneyderman
try jbosscmp-jdbc.xml that you deploy with your beans
or chnange the default standardjbosscmp-jdbc.xml in your
server/[config]/conf directory

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Joern Ohmen
 Sent: Monday, February 17, 2003 8:50 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] How to prevent auto table creation?


 Hi,

 I use jboss 3.0.4 and if I try to deploy my bean, my table is always
 created. I have a datasource OracleDS, there I defined no table
 creation... Where I have to set this param? Why it is ignored? Can
 sombody help please?


 jbosscmp-jdbc

defaults
   datasourcejava:/OracleDS/datasource
   datasource-mappingOracle 9i/datasource-mapping

   create-tablefalse/create-table.
 .
 .
 .

 If the tabel already exists i get an exception from oracle:
 14:38:09,912 ERROR [JDBCCommand] Exception caught executing SQL
 java.sql.SQLException: ORA-00955: name is already used by an existing
 object
 Thanks a lot!


 Jörn Ohmen 





 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] deploying to JBoss from Eclipse

2003-02-11 Thread Aleksandr Shneyderman
 I found the JBoss-IDE plugin for Eclipse and installed that.  It starts
 and stops the server, other than that it doesn't do much that the EASIE
 plugin from Genuitec doesn't do.

It also has xdoclet code assist. Which is pretty nifty stuff.

 1) Make the eclipse project within the JBoss folder and set the
 output path
 to be inside the server/deploy dir

Well if you use ant to build your project (which you probably
should since xdoclet assist feature only makes sense if you use
ant) then just add another task say jboss_deploy and copy your
jars, ear, wars to the server deploy.

I think the problem is not in making the JBoss run within Eclipse.
I just do not see any need for it. Run it separately and remote
debug your stuff if you must.

What would be really cool if there where some tools to create an
EJB, configure your deploymnet descriptors (ejb-jar, jboss,
jboss-cmp etc.). I mean XDoclet is nice but it is so entrenched
in your code that you really have to know what you are looking
to find it. And even then it is easy to miss it.

Some console that shows the structure of your running JBoss
instance or cluster (jndi tree, ejbs deployed, topics, queues,
resource adapters, datasources etc.) would be nice.

Also while I type my code I would really like to have XDoclet
to create files while I type, otherwise I can not use code assist
in eclipse for the classes that will only be generated after the
build.

Oh and by the way you can take a look at Lomboz plugin at
www.objectlearn.com.
Looks cool, I just was not able to make it work with JB 3.2 :-(

Alex.



---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] a question for JBoss-User group

2002-01-18 Thread Aleksandr Shneyderman



It 
might be that jboss can't find where the MBeans are.
So if 
you set jboss.home to the parent directory of the 
run.jar file system property before you make a 
call
it 
might help.

Alex.

  Has anyone tried starting JBOss from within 
  another Java application by calling org.jboss.Main.main(args) ?
  
  I am trying to do this and I get this 
  exception
  
  javax.management.servicenotfoundexception for the 
  URL for the MLet being null.
  
  Any comments/pointers ?
  =


RE: [JBoss-user] cache

2001-06-20 Thread Aleksandr Shneyderman

You can also script it. like the following:

response.setDateHeader (Expires, 0);
response.setHeader (Pragma, no-cahce);
if (request.getProtocol ().equals (HTTP/1.1)) {
  response.setHeader (Cache-Control, no-cache);
}

this piece of code is in Kolb and Fields' book Web Development with
JavaServer Pages
page 92 (ISBN 1-884777-99-6)


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
 Hoolehan
 Sent: Wednesday, June 20, 2001 4:01 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] cache


 That's a browser issue.  If you're on IE or Netscape, you can change the
 settings to always compare documents to cached versions.  This should fix
 the problem.  Also, if you're on Netscape, you can just hold down
 shift and
 click the reload button.  This will force a non-cached reload.
 Mike

 On (20/06/01 12:14), Richard Bottoms wrote:
  Okay, I got hello working. Now, I made a minor change to the
 servlet code,
  going to black bgcolor in the body tag. After deployment the old cached
  version is displayed in the browser.
 
  Is there any way to force clearing a cached servlet response?
 
 
  thanks,
  r.b.

 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Informix connection

2001-04-30 Thread Aleksandr Shneyderman

Can you send one to me directly:
[EMAIL PROTECTED]

I have tried it for such a long time (I even lost my patience)
and still could not set up XA dirver to work. Also can you
specify what drivers you used, because I was able to connect
with minerva's driver but not with informix' XA drivers.

Thanks,
Alex.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Jennifer
 Labit
 Sent: Monday, April 30, 2001 11:43 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Informix connection


 All,

 I have Informix set up and working with jBoss2.2.  It would be nice to see
 the website updated with this information as it took quite a bit of trial
 and error to get everything tweaked and working.  Where should I send the
 config information?

 Jenn


 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Unsubscribe?

2001-04-30 Thread Aleksandr Shneyderman

you can request it by pressing one of the buttons at sourceforge
site, the link to which you already have from the previous postings. 
They send it to your e-mail address.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Jay Craig
 Sent: Monday, April 30, 2001 4:49 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Unsubscribe?
 
 
 The problem is that you need your password to unsubscribe. If you've
 trashed it by accident, ther's no way out.
 
  [EMAIL PROTECTED] 04/30/01 01:47PM 
 * Steve Swing ([EMAIL PROTECTED]) [010430 15:30]:
  Unsubscribe?Go here:
 http://lists.sourceforge.net/lists/listinfo/jboss-user 
  
  JBoss-user Subscribers section toward the bottom of the page (last
 form
  field on the page).
  
  From: White, Joshua
  To: '[EMAIL PROTECTED]' 
  Sent: Monday, April 30, 2001 2:08 pm
  Subject: [JBoss-user] Unsubscribe?
  
  
  Does anybody know how to unsubscribe?
 
 (Didn't we go through this recently?)
 
 Every email you get from any Sourceforge-managed list has the
 following headers (apologies for icky wrapping...):
 
 =
 List-Help: 
 mailto:[EMAIL PROTECTED]?subject=help
 List-Post:
 mailto:[EMAIL PROTECTED]
 List-Subscribe:
 http://lists.sourceforge.net/lists/listinfo/jboss-user, 
 mailto:[EMAIL PROTECTED]?subject=subscribe
 List-Id: The JBoss User main mailing list 
 jboss-user.lists.sourceforge.net
 List-Unsubscribe:
 http://lists.sourceforge.net/lists/listinfo/jboss-user,
 mailto:[EMAIL PROTECTED]?subject=unsubscribe
 List-Archive: 
 http://lists.sourceforge.net/archives//jboss-user/
 =
 
 
 Neat-o -- self-documenting mailing list messages! :-)
 
 Chris
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED] 
 http://lists.sourceforge.net/lists/listinfo/jboss-user
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user
 

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user