Re: NEWBIE QUESTION:Configuring a web application, that is not contained in a WAR file

2000-10-12 Thread Matt Brunner

the web app structure should look something like this(which is really just an
unpacked WAR)

web-app/
*.html, *.jsp, ...
WEB-INF/
web.xml
classes/
  loose classes(override lib
directory jarred classes)
lib/
 jar and zip files of classes


Then I believe you need to add a line to server.xml in orion/config that looks
like this:

application name="my app"  path="path/to/my/app"
deployment-directory="path/to/my/app/deploy" /


Hope this helps

-Matt





Re: EJB vs Servlets

2000-10-09 Thread Matt Brunner

I would say that using J2EE architecture and EJB is most useful if you don't have 
specific performance needs.  When you don't have leeway on performance
you have to bite the bullet and use whatever gives you the performance you need.  
Obviously EJB2.0 OR mapping is a huge key, this allows the full usage
of CMP as it's intended.  CMP is a huge benefit since it puts more code on the 
shoulders of the server vendor and not the application developer(or a
separate team of developers).  And using a standardized architecture that is supported 
by multiple app server vendors(who are in multiple price/quality
arenas) is a benefit in my eyes as well.

In the past we've done our own code generation for OR mapping, and at first it did not 
handle transactions and connection pooling for you.  We had to
upgrade it and maintain it to provide these features.  With J2EE servers you get all 
that stuff without having to maintain the code for it -- we've
upgraded our tier that has this code about 5 times over the past year and a half!  
Probably the majority of us out there right now are inbetween a
pre-J2EE/EJB solution and a post solution.  I'm looking forward to EJB2.0 and plan on 
writing or using one code-generator for CMP Entity beans and
possibly generating Session Beans as well, or Session Bean shells for the different 
interfaces and such.  This will take care of the 'time-to-develop'
problem, remember, the use of EJBs is supposed to cut development/maintenance time.

Also you get a fully distributed system(probably the performance hit) which has it's 
benefits if the application scope is right.  Can the tiers of
business code you have written be accessed(re-used) by any app running on any machine, 
no matter who develops it(VB team vs. Swing team vs. JSP or ASP
teams)?  If you've implemented them using RMI then you may be able to, but again you 
end up doing the maintenance and upgrades on that code too.

Even with all the benefits I've listed, I'm not developing production code with EJBs 
just yet - one prototype application is all - the bleeding edge of
EJB looks to be a sharp one if the project/application isn't right for it.
The bottom line is time to market and a solution that fits the price - bigger 
customers can afford to wait a bit and pay for WebLogic and the like - but
this list is most probably filled with us smaller company types who cater to smaller 
customers.

Hopefully this info is useful -
Matt







Re: Client application Please Help

2000-10-05 Thread Matt Brunner

It seems that you just need to use the standard structure for your ejb jar and
client app jar files.
The ejb jar file structure is shown in the orion and cmp primers on
www.jollem.com -- and the
application client jar should be structured like this:

app-client.jar
app-client.class
META-INF/
  application-client.xml


hope this helps
Matt


"Daniel C. DiCesare" wrote:

 Frank,
 I checked out your example but I am continuing to experience problems. Here
 is what I have. I have included the script for my xml files below.

 I have deployed an EJB called Team onto Orion. It sits in a EAR file which
 within it has a Team.jar file. The JAR file contains the following:
 Team.class -  ( remote interface )
 TeamHome.class - ( home interface )
 TeamEJB - ( EJB )
 ejb-jar.xml - ( deployment descriptor )

 I then created a team-client.jar which consists of the following:
 TeamClient.class - ( client )
 application-client.xml - ( client xml )

 In my TeamClient I attempt to connect to the TeamEJB as follows:
 Context ic  = new InitialContext();
 Object  obj = ic.lookup( "TeamBean" );
 _TeamHome   = ( TeamHome )PortableRemoteObject.narrow( obj,
 TeamHome.class );

 When I try to run the client I get the following message:
 javax.naming.NamingException: Error reading application-client descriptor:
 No location specified and no suitable instance of the type 'Team' found for
 the ejb-ref TeamBean
 at
 com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
 (JAX, Compiled Code)
 at
 javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:672)
 at
 javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250)
 at javax.naming.InitialContext.init(InitialContext.java:226)
 at javax.naming.InitialContext.init(InitialContext.java:182)
 at TeamRandomTrade.main(TeamRandomTrade.java, Compiled Code)

 Can you or anyone please advise as to what I am doing wrong?

 Thanks in advance.
 -Danno

 The ejb-jar.xml looks as follows:

 ?xml version="1.0" encoding="UTF-8"?
 !DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
 JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'

 ejb-jar
   descriptionno description/description
   display-nameTeamEJB/display-name
   enterprise-beans
 entity
   descriptionno description/description
   display-nameTeamBean/display-name
   ejb-nameTeamBean/ejb-name
   homeTeamHome/home
   remoteTeam/remote
   ejb-classTeamEJB/ejb-class
   persistence-typeBean/persistence-type
   prim-key-classjava.lang.Integer/prim-key-class
   reentrantFalse/reentrant
   resource-ref
  descriptionA description for ResourceRefName/description
  res-ref-namejdbc/SF/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref
 /entity
   /enterprise-beans
 /ejb-jar

 My application-client.xml file looks as follows:
 ?xml version="1.0"?
 !DOCTYPE application-client PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE
 Application Client 1.2//EN"
 "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd"
 application-client
  display-nameSportsFund/display-name
  description/description
  ejb-ref
   ejb-ref-nameTeamBean/ejb-ref-name
   ejb-ref-typeSession/ejb-ref-type
   homeTeamHome/home
   remoteTeam/remote
  /ejb-ref
 /application-client





Re: Deployment confusions

2000-09-08 Thread Matt Brunner

Richard Landon wrote:

 I need a command-line method to deploy the ear file once it gets built into
 the Orion server.

for this you just put the ear file in the applications directory and put one
line for each ear into server.xml.
example:  application name="ip" path="../applications/ip-app.ear" /


 I need a command-line method to acquire the client support files from the
 Orion server.

from what I gathered off your email yesterday you are used to getting a
client.jar file from Sun's J2EE RI.  I haven't found orion to do this for me so
I just create my own client jars by myself.
example structure:
   my-application-client.jar
  J2EEClient.class
  META-INF
MANIFEST.MF
application-client.xml

 I need a command-line method to invoke a EJB client(s).

to invoke ejb clients I write a shell script that sets any needed classpath for
the client program(this must include orion.jar from what I remember) and then
have the script execute my java program(ejb client) with the inline classpath
argument and a system property for the initial context factory.

example:
CLASSPATH=orion.jar:my-entity-ejb.jar:my-session-ejb.jar:my-application-client.jar

java  -classpath $CLASSPATH
-Djava.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory
my.package.MyProgramName



Also there is orionsupport web page at www.orionsupport.com site where you may
get more information.
It seems to me that you're assuming questions posted to the list must be
answered and answered correctly, however, the nature of this mailing list is a
community list where people exchange questions and answers out of the goodness
of their hearts(like give a penny take a penny).  There is no guaranteed
support on this type of mailing list.

Hopefully my answers are helpful -

Matt