Re: CMP Mapping of String type for Sybase

2000-11-06 Thread Mikko Kurki-Suonio

On Mon, 6 Nov 2000, David Ekholm wrote:

> I wonder why the Java String type is mapped to a char(255) for Sybase in
> $ORION/config/database-schemas ?

The real reason?

I recently did a little testing for various databases with Orion.
The results were... baffling.

NONE of the published database schemas I tested were 100% correct.
Including the Hypersonic one (half a dozen errors -- now corrected). The
errors were childish, to the extent of making one wonder whether whoever
wrote the schemas ever even glimpsed at the documentation for the
databases in question.

The catch being that the incorrect mapping errors don't manifest until you
actually use the datatype in question... so the less used ones
like "short" tend to be wrong.

Not strictly an error, but it would be nice to note in the schema, if some
particular feature doesn't work with that DB (blob support being the most
prominent case, and extreme values of 64-bit numbers).

If they can't even iron out downright BUGS, how could you expect the
schemas to be optimized?

P.S. Now that Orionsupport is down, where should one send new/corrected
schemas? Bugzilla?

//Mikko






URGENT: talking with other app server?

2000-11-06 Thread James Ho

Hi everyone.

Is it possible for a servlet deployed in orion talk to other app server
to access its beans?  if so, how? what is the requirement?


I have got Orion using JNDI to use another Orion's bean, my main concern
is the fact that when initiating the JNDI context, I would have to
setthe property:
Properties props = new Properties();
props.put("java.naming.factory.initial",
"com.evermind.server.rmi.RMIInitialContextFactory");
props.put("java.naming.provider.url", provider.getPath());
props.put("java.naming.security.principal",
provider.getRemoteLogin());
props.put("java.naming.security.credentials",
provider.getRemotePasswd());
props.put("dedicated.connection","true");
props.put("classLoader",StampHome.class.getClassLoader());
context = new InitialContext(props);

What if talking with weblogic?  I would have to change the
ContextFactory..can I download any impl from weblogic and use it (for
free) ?

If you can help, please reply Asap, thanks a million!

James.




mapping a user to a group using DataSourceUserManager

2000-11-06 Thread Russ White

I have spent the morning looking through the archives and not really found what
I am looking for.

I found that I can grab username and password from the DataSourceUserManager
just fine, but I have to map the user to a group manually still with
priciples.xml.

If this is the only way to do this then it is a real drag, and really makes it
almost useless in my book.

Is there any way for me to grab a user's group from DataSourceUserManager?
If so what is the property name?
If not what are my other options?

Thanks,
Russ





Re: REPOST: Help with Finder query

2000-11-06 Thread Vidur Dhanda

But there is no cmp-field called username in that bean!  username is a cmp-field in the
source bean.  And source is an entity-ref  in the bean where the finder query is being
defined.

I'm sure I'm missing some basic syntax, but haven't been able to figure it out.  Is 
there
anybody else who has done something similar?  It seems like a fairly routine problem 
-- an
entity bean has a ref to another entity bean and the enclosing entity bean's finder 
query
needs to access the enclosed bean's field.


Vidur

Sven van 't Veer wrote:

> Vidur Dhanda wrote:
>
> > 
>
> > file:/C:/dev/lib/: Unable to process query: source was not a
> > property/field mapped field (invalid '.' use) at column 16 in query
> > '?source.username = ?1'
> >
> in the finder-method tag, use the cmp-field-name you defined in your
> bean e.i.:
> 
>   public String username;
>
> 
>
> sven
>
> --
> 
>==
> Sven E. van 't Veer
> http://www.cachoeiro.net
> Java Developer  
>[EMAIL PROTECTED]
> 





Re: Please Help ! (2nd Post)

2000-11-06 Thread Dan DiCesare

Not sure if this is your problem but hope this helps. It looks like you are 
extending "AbstractSession". Make sure that this gets packaged with your 
session jar file.

-Danno

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.





Re: Orion System Requirements

2000-11-06 Thread mark

Hi Unico:

Suspect the answer will depend a bit on your server OS, etc.  I think many of us would agree that Linux seems to be a bit more resource-friendly than NT, for instance.

Kevin Duffey posted the following Orion performance tests to this list on 10/19, perhaps this will help you.  You'll note that the box in his tests is a bit larger than yours; in particular it has a lot of RAM.

Hope this helps!

--Mark

Kevin's post of 10/19:

Hi all,

Well, using a pretty nifty (and very expensive) testing tool, I was able to
do some "minor" testing on a login process of our site. Using Orion, Oracle
8i database, and e-load test suite, here are some numbers that I got:

25 users  - 15 connections in the pool

pages per second  - 43
pages per day       - 3.75 million
transactions per second  - 14.5
transactions per day       - 1.26 million

25 users  - 30 connections in the pool

pages per second    - 26.4
pages per day         - 2.28 million
transactions per second - 8.81
transactions per day      - 761333

25 users - 5 connections in the pool

pages per second     -  51.95
pages per day          -  4.48 million
transactions per second  - 17.32
transactions per day    - 1.49 million

The test is simple. It uses the browser built into the e-test suite software
and "automates" the login process of our site. I ran the test on a PIII650,
with 512MB RAM. The database is running on a SUN E450 serve with 512MB RAM.
The test simply sends a post submitted form with the login name and password
to a controller servlet that then hits the database using a connection via
the pool, and logs in the user. All logins were valid, I did not test
invalid login names/passwords.

Just thought I would share these numbers. Next week I will be setting up a
two-server farm, using the load-balancer software that Orion includes in
their download. Each server will be dual PIII550 with 512MB RAM and SCSI III
RAID hd setup (Actually, they are IBM NetFinitiy 4000R units). The load
balancer will run on a slow PII300 workstation with 128MB RAM (I hope this
is good enough). They will be failed over and load-balanced, and I will test
the performance on those and post the results here.

The only thing I am not sure of is if different testing software performs
about the same..or are there dramatically different results.

If anyone wants me to attempt to test their site, I'll give it a go from
here..but its over a T1 connection, where as my test is done locally on a
LAN, so I am sure the results are more skewed.









Unico Hommes <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
11/06/00 05:12 AM
Please respond to Orion-Interest

        
        To:        Orion-Interest <[EMAIL PROTECTED]>
        cc:        
        Subject:        Orion System Requirements


I was wondering what are the recommended and/or minimum system requirements
for running Orion Server. I have a 100 Mhz Pentium - 24 Mb memory linux box
which I want to use for testing and developing web apps with Orion server.
Will this work ? I didn't find this info anywhere in the faq etc. on the
Orion website.

Regards,
Unico






Re: writing to application.log from EJB

2000-11-06 Thread Mark

Thank you Porfiriev.

In my real-world use, though, redirecting sysout and syserr isn't going
to give me the behavior I'm looking for -- not without a lot of
additional work, anyway.  What I'm doing is writing a "Logger" EJB which
is the central log manager for a fairly rich, distributed application
environment.  The Logger can write to console (sysout, syserr), or to
the application log file, or to a back-end RDBMS, depending on what it's
being asked to log, how it's configured, etc.; and apps anywhere in the
enterprise can use it as a central service.  So I need to keep console
output and persistent file output separate from each other.  Simplest
way I can think of is to use the same log writer which the
ServletContext uses -- you'd think that would be straightforward.
Haven't succeeded yet though!

Thanks again for the suggestion,

--Mark

===

Hello Mark,

Sunday, November 05, 2000, 1:38:08 AM, you wrote:

M> Folks:

M> How do you write to the default-application.log from an EJB?
M> From a servlet you call getServletContext().log().  Can find anything

M> analogous in EJB-Land.
M> Thanks for your help!  (Sorry if this is documented somewhere --
M> couldn't find it, if it is.)
M> --Mark

if you run orion like
 java -jar orion.jar 1>log/orion.log 2>log/orion.err

you can use
 System.out.println("DEBUG:...");
 System.err.println("Error:...");

to write to this logs

--
Best regards,
 Porfiriev







Orion System Requirements

2000-11-06 Thread Unico Hommes


I was wondering what are the recommended and/or minimum system requirements
for running Orion Server. I have a 100 Mhz Pentium - 24 Mb memory linux box
which I want to use for testing and developing web apps with Orion server.
Will this work ? I didn't find this info anywhere in the faq etc. on the
Orion website.

Regards,
Unico




Re: jsp problem

2000-11-06 Thread Hani Suleiman

I've seen a similar problem, which only seems to happen when using the
KDE2.0 Konquerer browser in my case though.

On Mon, 6 Nov 2000, Lars Hoss wrote:

> hi all!
> 
> i wrote a very simple http servlet that overrides the doGet method.
> this method simply tries to obtain a PrintWriter object through
> response.getWriter().
> the problem is that the servlet failes with an "UnsupportedEncodingException"?
> the exception says that the encoding "iso8859-1;q=1.0" is not
> supported by the Sun JVM.
> 
> what can i do?
> thanks for your help in advance.
> 
> yours,
> lars
> 
> 





Re: newsgroup forum

2000-11-06 Thread Brian Beaulieu

I second the digest idea.  I miss a lot of posts because I can't
read them all as they come in and am reluctant to go back.

On Mon, Nov 06, 2000 at 12:47:12PM -0800, Duffey, Kevin wrote:
> I agree! Using a newsgroup is a grand idea! Sure would make the threads alot
> easier to navigate.
> 
> 
> > -Original Message-
> > From: James Hays [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 06, 2000 11:21 AM
> > To: Orion-Interest
> > Subject: newsgroup forum
> > 
> > 
> > Would it be possible or in enough peoples interest to put 
> > this list serv in
> > a newsgroup forum.  For new people coming on with Orion, and 
> > others just
> > wanting to search through the information, this method has become very
> > exhaustive and message threads utilized by newsgroups would 
> > help eliminate
> > this.  Is there any other interest in moving this information 
> > to a newsgroup
> > forum?  Scott, is this possible or feasible?
> > 
> > James 
> > 

-- 
Capital Internet
http://www.capital-internet.net
Voice: (414) 291-3500 x1004




Re: sessions, inheritance and authorization

2000-11-06 Thread Daniel G. Koulomzin


I would have to admit that the weak support for inheritence in EJB 1.1
is definately a big problem.  What you generally have to do is create
parallel class hierarchies: one for the EJBObject interfaces, and one for
the SessionBean/EntityBean classes.  Both allow normal Java inheritence. 
Then, map the EJBObjects to the appropriate SessionBean classes in the
Deployment Descriptor, and you have created a sort of inheritence.
The problem with EJB inheritence is really in the EJBHome objects. 
You generally have to create distinct EJBHomes for every Bean, and as far
as I can see, its not a good idea for one EJBHome to inherit from another. 
The problem is in the create() methods.  In your case, SessionManagerHome's
create() method returns a SessionManager.  However, if you create
a PatientSessionManagerHome that extends SessionManagerHome, you can't
have the create() method return something different without a different
set of args (this problem with method overriding for factory methods is
generally avoided in conventional Java by the use of constructors, which
are NEVER inherited).   If you make a different set of args,
then you're still left with a create() method that returns an obect which
is NOT the EJBObject for PatientSessionManagerHome, and most containers
will not know how to implement it.  So basically, the inheritence
method I suggested above is really a kluge.  There is no good solution
for create methods, but one possiblity for EntityBean finder methods is
to really take advantage of the ambiguity of Collection and Enumeration
return values in finder methods.   Have all of your finders return
Collection of Enumeration, and you get around the problem of different
return values in the subclass's method.  However, this won't work
for findByPrimaryKey(), which MUST return a distint instance of the EJBObject
interface.  Also, its a generally ugly solution for many OO reasons
(type security, and you're essentially narrowing the scope of allowable
return values).
Anyway, this is all just my opinion.  I'd love to hear it if anyone
has figured something out that has escaped me.
-Dan
Adam Winter wrote:
Thanks for your reply. In answer to your question...
> > Second, does inheritance of Session Beans, work the same as other
> > inheritance in Java? The answer is probably yes, but I've
> > never seen this
> > covered. Every EJB I've seen has extended EjbObject. Can I still
have
> > abstract super classes?
>
>Certainly you can derive from your own abstract base classes, as long
as
>they derive from EJBObject.  Out of curiosity, why do you want
to do
>this?
In our web-based application all users see a common log-on screen, and
after their authentication, based on their user role, we redirect them
to
the appropriate user interface. To represent that I envisioned having
a
"SessionManager" Statefull Session bean, which would govern what was
possible based on that user's role. It would encapsulate other entity
beans, representing the other people and application objects that the
logged in user is allowed to participate with. In accordance with what
I
think is good OO designed, I pictured having "SessionManager" as abstract,
and deriving sub-classes based on user roles. In the case of my domain,
health care, there might be a PatientSessionManager, a
PhycisianSessionManager, and ClericalSessionManager. By doing this
I can
store the commonality (of which there are a few) in the super class.
I
think the case for inheritance amongst business logic is pretty strong.
-adamw

-- 
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134
 


Form based login

2000-11-06 Thread Jim Crossley

According to a message posted here recently by Ray Harrison, one must
change the values of the  and 
elements in the web app deployment descriptor (web.xml) contained in the
Petstore 1.1 sample app from Sun.

Why is that necessary?  Is it a bug in Orion that those elements must
not contain url-mapping's?

Thanks.




RE: newsgroup forum

2000-11-06 Thread Kemp Randy-W18971

Another option is to offer a daily digest, like they do with Python, Jboss, Opera, etc.

-Original Message-
From: James Hays [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 06, 2000 1:21 PM
To: Orion-Interest
Subject: newsgroup forum


Would it be possible or in enough peoples interest to put this list serv in
a newsgroup forum.  For new people coming on with Orion, and others just
wanting to search through the information, this method has become very
exhaustive and message threads utilized by newsgroups would help eliminate
this.  Is there any other interest in moving this information to a newsgroup
forum?  Scott, is this possible or feasible?

James 




calling servlet from jsp

2000-11-06 Thread Derek Akers



 
    I have a feeling that the answer 
is right under my nose, but for all my searching and head-scratching, I can't 
seem to figure it out...  I want to call a servlet from a JSP page, and 
assign its output to a Styring variable  I assume that this could be 
done from a javabean or EJB as well, but I have not been able to find any 
documentation or examples of this procedure anywhere.  Can anyone lend a 
hand or point me in the direction of some resources on this?
 
Thanks,
 
Derek AkersInternet application 
DeveloperEldan Softwarewww.eldan.com


RE: Orion and Windows 2000 Professional

2000-11-06 Thread Amir Peivandi



I have 
the same environment and I don't have any problem running Orion! So look at some 
environment issues like classpath and VM. Maybe you are using Microsoft VM or 
maybe you have wrong security settings.
 
Amir
 

  -Original Message-From: Jan Tye 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, November 06, 2000 1:11 
  PMTo: Orion-InterestCc: 
  [EMAIL PROTECTED]Subject: Orion and Windows 2000 
  Professional
  I have an application which runs fine under Windows 98, Orion 1.3.8 and 
  JDK1.3 
  When the same application is run under Windows 2000 Professional (SP1) I 
  get the access violation shown below during database connection. 
  D:\orion>java -jar orion.jar 
  Orion/1.3.8 initialized 
  Database connect failed.. 
  # 
  # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code 
  outside the VM. 
  # Program counter=0x77fca8ef 
  # 
  # Problematic Thread: prio=9 tid=0x9d7f60 nid=0x424 runnable 
  # 
  The application uses the standard JDBC connection code shown below. 
         String url = "jdbc:odbc:dbname"; 
         Connection myCon=null; 
  
      
      try 
      
      { 
  
      
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 
     
     
      myCon = 
  DriverManager.getConnection(url, "user", "password"); 
      
      } 
  


orion-web env-entry-mapping

2000-11-06 Thread Dave Ford

I added the following entry to web.xml:

 
  firstName
  Dave
  java.lang.String
 

This worked OK. Then I wanted to override the value so I added the following
to orion-web.xml:

Joe

After doing this, Orion took it upon it's self to modify my  by
switching the order of value and type from
"env-entry-name,env-entry-value,env-entry-type" (as specified in the servlet
spec) to "env-entry-name,env-entry-type,env-entry-value".

This in-turn cause a fatal error because I have validateXML turned on. All
of this in addition to the fact the my overridden value was never actually
made available to the jsp.

Am i doing something wrong or is this a bug?

Dave Ford





RE: Beginner: Step by step tutorial?

2000-11-06 Thread Kemp Randy-W18971

Winnie:
   Teach yourself Java in 21 days is a very excellent book and I have it myself.  You 
could also use a search engine like www.northernlight.com and search for something 
like Java Tutorials.
Randy

-Original Message-
From: Winnie Leung [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 04, 2000 2:49 AM
To: Orion-Interest
Subject: RE: Beginner: Step by step tutorial?


Thanks Randy, but I dont like that website at all! It is probably for people
who are into Java already. I am an ASP and Cold Fusion programmer, and I
have just completed my first "Teach yourself Java in 21 days". I believe I
am ready for JSP now.

Thanks anyway,
Winnie.



 |  -Original Message-
 |  From: On Behalf Of Kemp  Randy-W18971
 |  Sent: Saturday, November 04, 2000 3:06 AM
 |  To: Orion-Interest
 |  Subject: RE: Beginner: Step by step tutorial?
 |
 |
 |  I found an excellent resource recently at
 |  http://www.execpc.com/~gopalan/java/ejb.html.  I recommend it
 |  to everyone.
 |



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.198 / Virus Database: 95 - Release Date: 04-Oct-00





RE: newsgroup forum

2000-11-06 Thread Duffey, Kevin

I agree! Using a newsgroup is a grand idea! Sure would make the threads alot
easier to navigate.


> -Original Message-
> From: James Hays [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 06, 2000 11:21 AM
> To: Orion-Interest
> Subject: newsgroup forum
> 
> 
> Would it be possible or in enough peoples interest to put 
> this list serv in
> a newsgroup forum.  For new people coming on with Orion, and 
> others just
> wanting to search through the information, this method has become very
> exhaustive and message threads utilized by newsgroups would 
> help eliminate
> this.  Is there any other interest in moving this information 
> to a newsgroup
> forum?  Scott, is this possible or feasible?
> 
> James 
> 




JavaMail from a Session Bean

2000-11-06 Thread Nathan Phelps
Title: RE: sql trace



I have a session 
bean which services all e-mail requests for my application.  All works 
great unless the target SMTP server requires authentication.  I can't 
figure out how to get authenticated!
 
I have tried 
sub-classing javax.mail.Authenticator and over-riding the method 
"getPasswordAuthentication()" which I have simply returning "new 
PasswordAuthentication("myusername", "mypassword")"  I still receive an 
Exception though.  I have looked all over for the answer.  Any 
hints?
 
Thanks,
 
Nathan 
Phelps


CMP Mapping of String type for Sybase

2000-11-06 Thread David Ekholm



I wonder why the 
Java String type is mapped to a char(255) for Sybase in 
$ORION/config/database-schemas ?
I would prefer to 
have the default mapping as varchar(30) or varchar(255). These are the 
reasons:
* A varchar is of 
variable length and thus often consumes far less than the char type which always 
stores the maximum amount of chars (space padded).
* A varchar can be 
allowed to have null values.
 
A varchar field only 
adds one byte overhead to accomodate the length of the string. Furthermore 
varchars are only slightly slower than char fields when used in indexed 
lookups.
 
Anyway I have 
modified my sybase.xml to use varchar(30) for String fields (makes for 
nice column width when displaying table data using console utilities) and I 
am happy with it so far. Any Ideas why char(255) should be 
used?
/David
 


RE: BMP vs CMP with Orion

2000-11-06 Thread Cory Adams

Are you using the command or business object pattern?

At 08:49 AM 11/6/00 +0100, Frank Eggink wrote:
>I'm using Swing instead of JSP.
>
>On Sunday, November 05, 2000 9:04 PM, Cory Adams
[SMTP:[EMAIL PROTECTED]] wrote:
>> Thanks for that update.
>> 
>> Do you or does anyone else know of the MVC (model - view - control) pattern
>> used with JSP - Servlets and EJB?  I have read that a single servlet
>> becomes that controlling mechanism to the EJBs.  I wondering how that is
>> done?  
>> 
>> Cory
>> 
>> At 10:23 PM 11/5/00 +0100, Frank Eggink wrote:
>> >My personal trade off was:
>> >
>> >Why not CMP 2.0 style:
>> >- Too scared to use it for real as it is not even officially there ...
>> >
>> >Why choose for CMP 1.1? 
>> >- CMP is more portable (across db's).
>> >- Working already towards EJB2.0.
>> >- The claim is CMP can be optimized better (I would be happy to know more
>> details about that, until that time it is a bit
>> >of a bet on a blackhorse for me).
>> >
>> >Why choose for BMP?
>> >- I do not know yet whether I'll run into trouble with complex and highly
>> flexible queries requirements
>> >for Query By Example forms. The requirement for extra flexibility could
>> become an argument.
>> >
>> >I would say if you can spend the time learning enough about CMP 1.1 I
>> would go for that as a first option. The EJB1.1
>> >specs are even written so that you can sub class a CMP bean to create a
>> BMP bean.
>> >
>> >
>> >One of the biggest disadavantages of EJB's is the tremendous amount of
>> redundant code you have to write. Add for
>> >instance a field to a bean. You'll have to change three files minimum and
>> don't make mistakes as that will cost you time.
>> >This disadavantage applies to both CMP and BMP and will apply to EJB2.0 as
>> well.
>> >
>> >
>> >What I'm doing is using EJB1.1 CMP and generate beans and stuff using a
>> slightly more advanced bean
>> >generator then the standard ones. Based on a datamodel (Entity-Relation)
>> it generates a set of beans for
>> >your application (including the remote and home interfaces and the *.xml
>> files of course). The generated
>> >beans include the fields, the finder queries, the additional methods to
>> retrieve related beans etc.
>> >
>> >As an additional bonus the beans include a more abstract way to access the
>> properties (myBean.getProperty(int index))
>> >as the client side of orion does not allow reflection. I use that to
>> generate forms and tables on the client.
>> >
>> >The generator adds a tremendous flexibility (I can switch to BMP / EJB2.0
>> easily), makes CMP 1.1 managable and
>> >keeps me away from EJB2.0 while it is still too early for me. For the
>> rest: Im a notoruios mifftyper and am able to
>> >spend tons of time debug typos in 2638 lines of very closely resembling
>> code. That problem is solved as well :-)
>> >
>> >
>> >Frank
>> >
>> >On Saturday, November 04, 2000 12:10 AM, Cory Adams
>> [SMTP:[EMAIL PROTECTED]] wrote:
>> >> At 11:44 PM 11/3/00 +0100, Robert Krueger wrote:
>> >> >At 11:23 03.11.00 , you wrote:
>> >> >>I have looked through the 2.0 spec and find the chapters regarding
CMP to
>> >> >>be daunting.  It appears as though the complexity of writing my own
>> SQL in
>> >> >>BMP has to be balanced against learning an entire new way of managin
>> >> >>persistence within the XML deployment descriptors which seems to be no
>> less
>> >> >>or perhaps even more complicated than BMP
>> >> >>
>> >> >>Or am I missing something with regard to CMP being easier?
>> >> >
>> >> >yes, two things:
>> >> >
>> >> >1. your code including the queries is guaranteed to be portable between
>> ejb 
>> >> >servers and databases (that's the theory)
>> >> >2. you cannot possibly make optimizations using BMP that the container
>> can 
>> >> >make using CMP
>> >> >
>> >> >why do you have to use ejb2.0 CMP? you didn't mention 1.1 cmp as an 
>> >> >alternative?
>> >> >
>> >> 
>> >> Hmmm.  I can find even less regarding 1.1 CMP.  I have the
ORielly book
>> >> as well as the Mastering EJB books.  The 2.0 spec is what I'm using
because
>> >> I would think (perhaps wrongly) that EJB 2.0 would maybe be easier
and or
>> >> offer more functionality???  Chapters 9 and 10 are over 100 pages which
>> >> have to do with CMP.  The last thing I need to do is learn another query
>> >> language which is what some of the 2.0 spec seemed to indicate I
would need
>> >> to do
>> >> 
>> >> I also understand points 1 and 2 above but they do not address my
original
>> >> question of the relative complexity between BMP and CMP.  Basically 1
and 2
>> >> are irrelevant to me if I can not implement CMP and can not practically
>> >> compare the relative complexity between the two because I just don't
>> >> understand CMP so I will keep digging through examples and utilize
the post
>> >> that has been helpful that somebody posted earlier today :
>> >> http://www.execpc.com/~gopalan/java/entity.html . 
>> >> 
>> >> Thanks,
>> >> 
>> >> Cory
>> >> 
>> >> 
>> >> 

RE: Orion and Windows 2000 Professional

2000-11-06 Thread Victor A. Salaman
Title: 



Don't 
use that jdbc bridge crap

  -Original Message-From: Jan Tye 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, November 06, 2000 2:11 
  PMTo: Orion-InterestCc: 
  [EMAIL PROTECTED]Subject: Orion and Windows 2000 
  Professional
  I have an application which runs fine under Windows 98, Orion 1.3.8 and 
  JDK1.3 
  When the same application is run under Windows 2000 Professional (SP1) I 
  get the access violation shown below during database connection. 
  D:\orion>java -jar orion.jar 
  Orion/1.3.8 initialized 
  Database connect failed.. 
  # 
  # An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code 
  outside the VM. 
  # Program counter=0x77fca8ef 
  # 
  # Problematic Thread: prio=9 tid=0x9d7f60 nid=0x424 runnable 
  # 
  The application uses the standard JDBC connection code shown below. 
         String url = "jdbc:odbc:dbname"; 
         Connection myCon=null; 
  
      
      try 
      
      { 
  
      
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); 
     
     
      myCon = 
  DriverManager.getConnection(url, "user", "password"); 
      
      } 
  


SV: Getting Orion to run as a service under Windows 2000 using JNT

2000-11-06 Thread Klaus . Myrseth

Thanks for the howto :)))

Here is a service installation that enables logging to files, and optionally
kill the -console tag to prevent the GUI popup of the server.
Hope its something you can use...(we're using this setup atm at Telenor
Mobile AS).

@echo off
echo * Orion: Installing service
SET ORIONMINMEM=512m
SET ORIONMAXMEM=1024m
SET ORION_HOME=e:\orion
jnt "/InstallAsService:Orion Server" "/SD%ORION_HOME%" -mx%ORIONMAXMEM%
-ms%ORIONMINMEM% -jar orion.jar -console -out orion.out -err orion.err
echo * Orion: done.
@echo on

Klaus Myrseth
Senior consultant
Exense ASA
eConsulting



>  -Opprinnelig melding-
> Fra:  Kimberley Scott [mailto:[EMAIL PROTECTED]] 
> Sendt:6. november 2000 04:42
> Til:  Orion-Interest
> Emne: Getting Orion to run as a service under Windows 2000 using JNT
> 
> Hiya,
> 
> Thought I'd contribute rather than just sponging off all the bright minds
> in this list.
> 
> Might be worth adding to the FAQ if it can be reproduced by someone else. 
> 
> When you install JDK1.3, you get a "jre" runtime directory installed
> within the JDK directory. If you have ever installed a runtime prior you
> will have a c:\program files\JavaSoft\JRE directory also. This is a tree:
> 
> c:\program files
>   \JavaSoft
>   \JRE
>   \1.3
>   \bin
>   \hotspot
>   \lib
> 
> One of the problems I had getting Orion to run as a service was that it
> would just start and immediately stop. So I experimented at the command
> line with the -verbose option and the -X option. This is an example of the
> result:
> 
> C:\usr\apps\orion\Jnt101b>jnt -X
> Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 
> Error loading: C:\Program Files\JavaSoft\JRE\1.3\bin\classic\jvm.dll
> 11/06/00 13:59:05 -
> -
> Now starting Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 11/06/00 13:59:05 - Executing JVM Command: jnt -X
> 11/06/00 13:59:05 - Shutting down service...
> 11/06/00 13:59:05 -
> -
> 
> Notice the "error loading" message. Oi! There isn't a "classic" directory
> in my installed JRE. So I copied said directory from the "jre" directory
> in the JDK installation to that spot and tried it. No go. You get this:
> 
> Now starting Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 11/06/00 13:58:10 - Executing JVM Command: jnt -verbose
> /InstallAsService:Orion /SDc:\usr\apps\orion -jar orion.jar
> pps\orion\config\server.xml
> Could not create the Java virtual machine.
> 11/06/00 13:58:10 - Shutting down service...
> 11/06/00 13:58:10 -
> -
> 
> What? Hmm I thought and simply renaming the existing JRE directory to
> JRE_Hmm and copied the "jre" directory from my JDK directory to the same
> spot, taking care to add the "1.3" directory to the subtree. Then I ran:
> 
> C:\usr\apps\orion\Jnt101b>jnt "/InstallAsService:Orion"
> "/SDc:\usr\apps\orion" -verbose -jar orion.jar
> Java Service Launcher V1.0.1 beta
> Copyright (C) 2000 by eWorkSmart, LLC
> 
> 11/06/00 14:04:30 - Installing as service "Orion" (Orion).
> 11/06/00 14:04:31 -
> This has been installed as "Orion".
> This service is set to automatically start when the
> system boots.  To start the service now, use the "Services"
> icon found in the control panel.
> 11/06/00 14:04:31 -
> 
> NT Service options:
> Use /InstallAsService:ServiceName[:dependent1,dependent2,...] to
> install.
> Use /RemoveAsService:ServiceName to remove (uninstall) as a service.
> Use /SetServiceParams:ServiceName to change the startup parameters for
> this service.
> Note: Any additional parameters on the command line will be setup
>   as the startup parameters for the service when using
>   the /InstallAsService or /SetServiceParams options.
> 
> Then I went to "services" under "manage" for "My Computer" and started the
> service. Then I tried to go to http://kscott/JAdmin (my test suite) and it
> worked. I checked the services and it's still working. I then went to the
> Orion directory and viewed the JNT.log. Everything kool. Ok. Now go to my
> source directory and "ant" a build. Once this was complete, I went to the
> Orion logs directory and check out the server.log and lo and behold, the
> auto-deploy messages are there. Looking good! I then opened the Event
> Viewer and went to the Application Log. Three events logged; 
> 
> 1) Startup parameters for the service have been set to:
> /SDc:\usr\apps\orion
> -verbose
> -jar
> orion.jar
> 
> 2) The Orion service was installed. 
> 
> 3) The service was started. 
> 
> I then logged out of my machine and back in again. Checked the service and
> it's still running. Cool. Next step: reboot; After reboot went to browse
> the test site and voila. It works.
> 
> So. All appears to be working.  Hope this helps

Please Help ! (2nd Post)

2000-11-06 Thread michel_climber

Greetings !

I have  been migrating my ejb from Voyager to Orion, in Orion and I'am using
a simple directory structure without jar my classes, and I have gotten an
mistake that I can't understand.
The error is:
IIdBeanHome_StatefulSessionHomeWrapper5.java:127:Exception
java.rmi.RemoteException must be caught,
or it must be declared in the throws clause of this method.
return new kynesoft.ecom.subastar.ejb.ids.IdBean();

Here  is my code ejb:

/**
  * File: IIdBean.java
  * Package: reto.ejb.ids
  * interface name: IIdBean
  * Descripción: Interfaz remota para el bean de usuarios (IdBean)
  * @author  Luciano Salvatorelli
  * @author  Salvador Velasco
  * @version %I%, %U%
  * @see javax.ejb.*
  * Fecha de ultima modificacion: 16/03/2000
*/
package kynesoft.ecom.subastar.ejb.ids;

import java.rmi.RemoteException;

import java.lang.Exception;

import java.sql.ResultSet;
import java.sql.SQLException;

import java.util.Vector;
import java.util.Enumeration;

import javax.ejb.EJBObject;
import javax.ejb.EntityBean;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import javax.ejb.FinderException;

import shared.helpers.*;
import shared.error.*;

public interface IIdBean extends EJBObject
{
public int generateId (String table, String field) throws
RemoteException, AppException;
}


/**
  * file: IIdBeanHome
  * Package: reto.ejb.ids.java
  * Interface name: IIdBeanHome
  * Description: Interfaz home para el bean de usuarios
  * @author  Luis Da Costa
  * @author  Patricia T. Núñez Rojas Berti
  * @version %I%, %U%
  * @see javax.ejb.*
  * Fecha de ultima modificacion: 05/11/1999
*/
package kynesoft.ecom.subastar.ejb.ids;

import java.rmi.RemoteException;
import java.util.Enumeration;
import javax.ejb.EJBHome;
import javax.ejb.CreateException;
import javax.ejb.FinderException;


public interface IIdBeanHome extends EJBHome
{
IIdBean create() throws CreateException, RemoteException;
}


/**
  * file: IdBean.java
  * Package: reto.ejb.ids
  * class name: IdBean
  * Descripción: Bean para los usuarios
  * @author  Luis Da Costa
  * @author  Luciano Salvatorelli
  * @author  Patricia T. Núñez Rojas Berti
  * @version %I%, %U%
  * @see javax.ejb.*
  * Fecha de ultima modificacion: 05/11/1999
*/
package kynesoft.ecom.subastar.ejb.ids;

import java.rmi.RemoteException;

import java.sql.ResultSet;
import java.sql.SQLException;

import java.util.Vector;
import java.util.Enumeration;

import java.lang.NoSuchFieldException;

import javax.ejb.EntityBean;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import javax.ejb.FinderException;

import shared.helpers.*;
import shared.error.*;
import shared.util.*;

import kynesoft.error.subastar.*;
import kynesoft.ecom.subastar.Parameters;
import kynesoft.ecom.subastar.ejb.TableFields;

/* = */
/**
  * Bean para el manejo de los clientes de la BD
  * @author  Luis Da Costa
  * @author  Luciano Salvatorelli
  * @author  Salvador Velasco
  * @version %I%, %U%
  * @see javax.ejb.*
  * Fecha de ultima modificacion: 15/03/2000
*/

public class IdBean extends AbstractSession
{
// maximo numero de cifras que tiene el # total de registros por tablas
private static int COD_LENGTH = 9;

/* =
*/
/**
 *  Constructor de la clase.
 *  Observaciones:  Las tareas a realizar por el constructor son:
 *  (1) Seleccionar la base de datos a leer: RetoDB
 *  (2) Inicializar la estructura interna para guardar los
 *  de Mem Secundaria
*/
public IdBean() throws RemoteException
{
try
{
// Indicar que la BD a utilizar es la de SubastarDB
this.setDBHelperDatasourceUrl(new
kynesoft.ecom.subastar.Parameters().getDatasourceUrl());
}
catch(Exception e)
{
e.printStackTrace(System.out);
}
}


/* = */
/**
 *  Funcion de creacion del bean (segun los estandares EJB).
 *  Ver especificaciones EJB para entender tipos de
 *  excepciones levantadas, y valor retornado.
 *  Esta funcion se encuentra en la interfaz home con el
 *  nombre create()
 *  @throws RemoteException en caso de error remoto (conexion,envio,...)
 *  @throws CreateException si no se puede crear el objeto.
*/

public void ejbCreate() throws CreateException, RemoteException
{
}

/* === */
/**
 *  Primera funcion que se ejecuta despues del ejbCreate()
 *  (Ver especificaciones EJB).
 *  (tiene exactamente la misma firma que ejbCreate())
*/

public void ejbPostCreate()
{
}


/* = */
/**
 *  Genera un id.
 *
 *  @param  tableName   (e) Nombre de la tabla
 *  @p

Entity beans never changed back to the pool.

2000-11-06 Thread Lopez Esteban

Hello, I plan to use Orion-Server for a big Database-Application with Java-
and Web-Clients.
I'm using Orion version 1.4.0. After serveral tests we noticed, that once a
Entity-Bean was instanced and used, it never changed back to the pool. The
number of usered instances grows and grows until I manually flush the cache
in the Console-Utility.
With this strategy, the Server will run out of memory after some time. Is it
possible to limit the number of used and pooled Entity-Bean instances ? I
can't find any parameter in the xml-Files.
Best regards 
Esteban





newsgroup forum

2000-11-06 Thread James Hays

Would it be possible or in enough peoples interest to put this list serv in
a newsgroup forum.  For new people coming on with Orion, and others just
wanting to search through the information, this method has become very
exhaustive and message threads utilized by newsgroups would help eliminate
this.  Is there any other interest in moving this information to a newsgroup
forum?  Scott, is this possible or feasible?

James 




Orion and Windows 2000 Professional

2000-11-06 Thread Jan Tye
I have an application which runs fine under Windows 98, Orion 1.3.8 and JDK1.3

When the same application is run under Windows 2000 Professional (SP1) I get the access violation shown below during database connection.

D:\orion>java -jar orion.jar
Orion/1.3.8 initialized
Database connect failed..
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outside the VM.
# Program counter=0x77fca8ef
#
# Problematic Thread: prio=9 tid=0x9d7f60 nid=0x424 runnable
#


The application uses the standard JDBC connection code shown below.
	 String url = "jdbc:odbc:dbname";
Connection myCon=null;
try
		{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
myCon = DriverManager.getConnection(url, "user", "password");
}








RE: sql trace

2000-11-06 Thread Andrej Gabara
Title: RE: sql trace






What we have done is to write a JDBC driver which wraps the
Oracle driver. This driver not only captures SQL sent, but also
parameters to prepared statements and timings. 


To implemented it you need to write wrapper classes for to java.sql.Driver,
Statement, PreparedStatement, and CallableStatement. 


-Andrej



> -Original Message-
> From: Tommy Essebo [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 06, 2000 4:29 AM
> To: Orion-Interest
> Subject: sql trace
> 
> 
> Is it possible to get a trace of the Orion-generated  SQL statements?
> 
> I have tried the jdbc way: DriverManager.setLogWriter() but 
> this doesn't 
> work for the Oracle Thin jdbc-driver (it works for other jdbc-drivers)
> 
> /tommy
> 
> 





Re: writing to application.log from EJB

2000-11-06 Thread Porfiriev Sergey

Hello Mark,

Sunday, November 05, 2000, 1:38:08 AM, you wrote:

M> Folks:

M> How do you write to the default-application.log from an EJB?
M> From a servlet you call getServletContext().log().  Can find anything
M> analogous in EJB-Land.
M> Thanks for your help!  (Sorry if this is documented somewhere --
M> couldn't find it, if it is.)
M> --Mark

if you run orion like
 java -jar orion.jar 1>log/orion.log 2>log/orion.err

you can use
 System.out.println("DEBUG:...");
 System.err.println("Error:...");

to write to this logs

-- 
Best regards,
 Porfirievmailto:[EMAIL PROTECTED]






RE: load-on-startup doesn't work

2000-11-06 Thread Patrik Andersson
Title: RE: load-on-startup doesn't work





Hi,


Problems might be:
    - init does not take an instance of ServletContext, it takes ServletConfig, but maybee you misstyped in the mail.

    - The servlet won't load if it has compiletime errors or throws an exception in init (I think).


-Original Message-
From: Aleksi Kallio [mailto:[EMAIL PROTECTED]]
Sent: den 6 november 2000 11:25
To: Orion-Interest
Subject: load-on-startup doesn't work



I have a servlet that starts up my application when Orion (1.0.3 - yes, a very old one) is started. The problem is that nothing happens - init(ServletContext) doesn't get called. I have this in global-web-application.xml:


    Software
    Software
    foo.bar.Software
    1
    
    application-directory
    applications/software
    
   


What could be the problem? Any suggestions how to debug this? I don't have any clues...






sql trace

2000-11-06 Thread Tommy Essebo

Is it possible to get a trace of the Orion-generated  SQL statements?

I have tried the jdbc way: DriverManager.setLogWriter() but this doesn't 
work for the Oracle Thin jdbc-driver (it works for other jdbc-drivers)

/tommy





website down??

2000-11-06 Thread Robert Krueger


(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





how to specify an inter-application ejb-ref?

2000-11-06 Thread Robert Krueger


hi,

I just checked the archives but didn't find anything on the mechanisms to 
map an ejb-ref to an ejb that is deployed in a different application.

does orion allow that and if so, what do I have to do? is there a special 
jndi location for that?

TIA

robert


(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





SV: Name of application

2000-11-06 Thread David Ekholm

Thank you Christian. That was the one I was looking for. I couldn't find it
previously because I was using a too-old version of the J2EE spec that was
included with JBuilder3.5. Generally don't use the latest Sun J2EE spec as
JBuilder's EJB verifier produces a load of warnings then. To bad one has to
pay around $1000 just to upgrade JBuilder3.5 Enterprise in order to easily
generate EJB compliant code :-(
/David

-Ursprungligt meddelande-
Från: Christian Sell [mailto:[EMAIL PROTECTED]]
Skickat: den 3 november 2000 20:10
Till: Orion-Interest
Ämne: Re: Name of application


what do you mean by "name of the current web application"? You can get at
the context path via HttpServletRequest.getContextPath(), which is the part
of the URL which distinguishes the app in the context of a domain/server:

public java.lang.String getContextPath()
Returns the portion of the request URI that indicates the context of the
request. The context path always comes first in a request URI. The path
starts with a "/" character but does not end with a "/" character. For
servlets in the default (root) context, this method returns "".
Returns:
a String specifying the portion of the request URI that indicates the
context of the request


-Original Message-
From: David Ekholm <[EMAIL PROTECTED]>
To: Orion-Interest <[EMAIL PROTECTED]>
Date: Freitag, 3. November 2000 15:10
Subject: Name of application


>Simple question: How do I retrieve the name of the current web application
>from a servlet?
>
>/David
>





Re: REPOST: Help with Finder query

2000-11-06 Thread Sven van 't Veer



Vidur Dhanda wrote:

> 

> file:/C:/dev/lib/: Unable to process query: source was not a
> property/field mapped field (invalid '.' use) at column 16 in query
> '?source.username = ?1'
> 
in the finder-method tag, use the cmp-field-name you defined in your
bean e.i.:

  public String username;



sven

-- 
==
Sven E. van 't Veer  
http://www.cachoeiro.net
Java Developer  [EMAIL PROTECTED]
==




EJB.remove(pk-string) and relationship problem

2000-11-06 Thread Truong Di Ly

Hello EJB profis,


I have this relationship-removing problem:

A:EJB 1->* B:EJB 1->* C:EJB

calling c.remove(pk-string) in ... (e.g. parseRequest.jsp),

where c (is a C EJB ) is in a collection of b (is a B EJB),

does not remove c from the collection, but it does remove

b from the database.

Thanks,
Di




Re: Specifying different datasources per application

2000-11-06 Thread Robert Krueger

At 11:45 06.11.00 , you wrote:
>Hello,
>
>I'm trying to setup different datasource locations for different
>applications, but can't get it to work for some reason. Can someone give me
>a clue?
>
>Orio does not complain when deploying. As far as I can understand the
>datasources.xml file in /config is ok (contains a tag for TestDS).
>
>Regards,
>Frank

frank,

i wouldn't use the default-datasource for that because that only writes the 
appropriate stuff in your deployment files on first deployment (i.e. 
location attribute for entities). IMHO it's best to use an 
application-local data-sources.xml which uses datasource aliases to the 
data-sources you specified in your global data-sources.xml.

here's a description I sent kurt:

here's some snippets from the configs.

server.xml:



here's the directory layout in the 
/home/krueger/devel/projekte/s7procurement-deployment/devel/

./ejb/META-INF/ejb-jar.xml
./web/WEB-INF/web.xml
./orion/ejb/orion-ejb-jar.xml
./orion/procurement-web/orion-web.xml
./orion/data-sources.xml
./orion/orion-application.xml
./orion/principals.xml
./META-INF/application.xml

orion-application.xml:


















data-sources.xml:





where jdbc/ShopEJBDS is the location used in all the resource-ref-mappings 
and entity-deployments

jdbc/ProcurementRefEJBDS is configured with driver url username password etc.

HTH

robert


>Here is my orion-application.xml file, which is generated by Orion. I only
>added the  - default-data-source="jdbc/TestDS" -  tag:
>
>
>runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">
>
>default-data-source="jdbc/TestDS">
> 
> 
>  auto-start="false"
>/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de





poking around the internals (was: Name of application)

2000-11-06 Thread Mike Cannon-Brookes

Someone was asking a while back about how to get the name of the current
application, here's how.

(please bear in mind this stuff is all completely proprietary to Orion and
will probably change just as often as they refactor the internals)

Try this as a JSP:

<%@ page import="javax.naming.*, com.evermind.server.administration.*" %>
<%
Context ctx = new InitialContext();
ApplicationAdministrator admin =
(ApplicationAdministrator)ctx.lookup("java:comp/Administrator");
%>
Application name: <%= admin.getDisplayName() %>

Poking around there is also a fun statistics object to get stats on your
app, ie:

<%
Map stats = admin.getStatistics();

Date uptime = new Date(((Long)stats.get("uptime")).longValue());
Date startTime = new Date(((Long)stats.get("starTime")).longValue())
%>

stats.get("logEvents") returns an object that I can't cast properly, but
this may lie at the heart of the logging matter mentioned previously.

As I mentioned before, reverse engineering / hacking your app server can
have harse consequences, only try it if you're as dumb as me ;)

Mike

PS Any tips from the Orion peopl always appreciated ;)





Specifying different datasources per application

2000-11-06 Thread Frank Eggink

Hello,

I'm trying to setup different datasource locations for different 
applications, but can't get it to work for some reason. Can someone give me 
a clue?

Orio does not complain when deploying. As far as I can understand the 
datasources.xml file in /config is ok (contains a tag for TestDS).

Regards,
Frank

Here is my orion-application.xml file, which is generated by Orion. I only 
added the  - default-data-source="jdbc/TestDS" -  tag:


http://www.orionserver.com/dtds/orion-application.dtd">































load-on-startup doesn't work

2000-11-06 Thread Aleksi Kallio

I have a servlet that starts up my application when Orion (1.0.3 - yes, a very old 
one) is started. The problem is that nothing happens - init(ServletContext) doesn't 
get called. I have this in global-web-application.xml:


Software
Software
foo.bar.Software
1

application-directory
applications/software

   

What could be the problem? Any suggestions how to debug this? I don't have any clues...






jsp problem

2000-11-06 Thread Lars Hoss

hi all!

i wrote a very simple http servlet that overrides the doGet method.
this method simply tries to obtain a PrintWriter object through
response.getWriter().
the problem is that the servlet failes with an "UnsupportedEncodingException"?
the exception says that the encoding "iso8859-1;q=1.0" is not
supported by the Sun JVM.

what can i do?
thanks for your help in advance.

yours,
lars




Serializing problem

2000-11-06 Thread Lars Hoss

hi all!

i have an entity bean that wants to serialize a Handle of another entity bean
into the database by using BMP.
the serialization works fine. the deserialization, however, finds with
a "NoClassFound" exception, saying that the primary key object
that belongs to the serialized entity bean cannot be found?
it seems that the ClassLoader in the entity bean context does
not know anything about the class files in the ejb.jar file, because
when i put the ejb.jar file into the orion/lib directory, everything
works fine.
but i guess that this workaround will produce other problems?

yours,
lars





EJB.remove(pk-string) and relationship problem

2000-11-06 Thread Truong Di Ly

Hello EJB profis,


I have this relationship-removing problem:

A:EJB 1->* B:EJB 1->* C:EJB

calling c.remove(pk-string) in ... (e.g. parseRequest.jsp),

where c (is a C EJB ) is in a collection of b (is a B EJB),

does not remove c from the collection, but it does remove

b from the database.

Thanks,
Di




RE: BMP vs CMP with Orion

2000-11-06 Thread Frank Eggink

I'm using Swing instead of JSP.

On Sunday, November 05, 2000 9:04 PM, Cory Adams [SMTP:[EMAIL PROTECTED]] wrote:
> Thanks for that update.
> 
> Do you or does anyone else know of the MVC (model - view - control) pattern
> used with JSP - Servlets and EJB?  I have read that a single servlet
> becomes that controlling mechanism to the EJBs.  I wondering how that is
> done?  
> 
> Cory
> 
> At 10:23 PM 11/5/00 +0100, Frank Eggink wrote:
> >My personal trade off was:
> >
> >Why not CMP 2.0 style:
> >- Too scared to use it for real as it is not even officially there ...
> >
> >Why choose for CMP 1.1? 
> >- CMP is more portable (across db's).
> >- Working already towards EJB2.0.
> >- The claim is CMP can be optimized better (I would be happy to know more
> details about that, until that time it is a bit
> >of a bet on a blackhorse for me).
> >
> >Why choose for BMP?
> >- I do not know yet whether I'll run into trouble with complex and highly
> flexible queries requirements
> >for Query By Example forms. The requirement for extra flexibility could
> become an argument.
> >
> >I would say if you can spend the time learning enough about CMP 1.1 I
> would go for that as a first option. The EJB1.1
> >specs are even written so that you can sub class a CMP bean to create a
> BMP bean.
> >
> >
> >One of the biggest disadavantages of EJB's is the tremendous amount of
> redundant code you have to write. Add for
> >instance a field to a bean. You'll have to change three files minimum and
> don't make mistakes as that will cost you time.
> >This disadavantage applies to both CMP and BMP and will apply to EJB2.0 as
> well.
> >
> >
> >What I'm doing is using EJB1.1 CMP and generate beans and stuff using a
> slightly more advanced bean
> >generator then the standard ones. Based on a datamodel (Entity-Relation)
> it generates a set of beans for
> >your application (including the remote and home interfaces and the *.xml
> files of course). The generated
> >beans include the fields, the finder queries, the additional methods to
> retrieve related beans etc.
> >
> >As an additional bonus the beans include a more abstract way to access the
> properties (myBean.getProperty(int index))
> >as the client side of orion does not allow reflection. I use that to
> generate forms and tables on the client.
> >
> >The generator adds a tremendous flexibility (I can switch to BMP / EJB2.0
> easily), makes CMP 1.1 managable and
> >keeps me away from EJB2.0 while it is still too early for me. For the
> rest: Im a notoruios mifftyper and am able to
> >spend tons of time debug typos in 2638 lines of very closely resembling
> code. That problem is solved as well :-)
> >
> >
> >Frank
> >
> >On Saturday, November 04, 2000 12:10 AM, Cory Adams
> [SMTP:[EMAIL PROTECTED]] wrote:
> >> At 11:44 PM 11/3/00 +0100, Robert Krueger wrote:
> >> >At 11:23 03.11.00 , you wrote:
> >> >>I have looked through the 2.0 spec and find the chapters regarding CMP to
> >> >>be daunting.  It appears as though the complexity of writing my own
> SQL in
> >> >>BMP has to be balanced against learning an entire new way of managin
> >> >>persistence within the XML deployment descriptors which seems to be no
> less
> >> >>or perhaps even more complicated than BMP
> >> >>
> >> >>Or am I missing something with regard to CMP being easier?
> >> >
> >> >yes, two things:
> >> >
> >> >1. your code including the queries is guaranteed to be portable between
> ejb 
> >> >servers and databases (that's the theory)
> >> >2. you cannot possibly make optimizations using BMP that the container
> can 
> >> >make using CMP
> >> >
> >> >why do you have to use ejb2.0 CMP? you didn't mention 1.1 cmp as an 
> >> >alternative?
> >> >
> >> 
> >> Hmmm.  I can find even less regarding 1.1 CMP.  I have the ORielly book
> >> as well as the Mastering EJB books.  The 2.0 spec is what I'm using because
> >> I would think (perhaps wrongly) that EJB 2.0 would maybe be easier and or
> >> offer more functionality???  Chapters 9 and 10 are over 100 pages which
> >> have to do with CMP.  The last thing I need to do is learn another query
> >> language which is what some of the 2.0 spec seemed to indicate I would need
> >> to do
> >> 
> >> I also understand points 1 and 2 above but they do not address my original
> >> question of the relative complexity between BMP and CMP.  Basically 1 and 2
> >> are irrelevant to me if I can not implement CMP and can not practically
> >> compare the relative complexity between the two because I just don't
> >> understand CMP so I will keep digging through examples and utilize the post
> >> that has been helpful that somebody posted earlier today :
> >> http://www.execpc.com/~gopalan/java/entity.html . 
> >> 
> >> Thanks,
> >> 
> >> Cory
> >> 
> >> 
> >> >regards,
> >> >
> >> >robert
> >> >
> >> >>Thanks,
> >> >>
> >> >>Cory
> >> >
> >> >(-) Robert Kruger
> >> >(-) SIGNAL 7 Gesellschaft fur Informationstechnologie mbH
> >> >(-) Bruder-Knau?-Str. 79 - 64285 Darmstadt,
> >