RE: Adding a Session bean to an HttpSession

1999-12-25 Thread Mike Cannon-Brookes
I'm not sure if your code works Alex - but this is how I do it (so I know it works) Context ctx = new InitialContext(); Object homeObject = context.lookup("UserSession"); UserSessionHome home = (UserSessionHome)PortableRemoteObject.narrow(ctx.lookup("ejb.UserSession", UserSessionHome.class); Us

RE: How do I tell my Container Managed entity bean which datasourcetouse?

1999-12-25 Thread Mike Cannon-Brookes
G'day and a Merry Christmas to all, > Ok, so I made the following entries in to the datasources xml > file. Things > appear to work better. But I have three questions: > > 1. Which data source are my beans using? By default your beans use the DefaultXADS I believe - although I've never used a co

RE: Adding a Session bean to an HttpSession

1999-12-25 Thread Alex Paransky
First you would actually use the home interface to create your UserSession like so: Context context = new InitialContext(); Object homeObject = context.lookup("UserSession"); UserSessionHome home = (UserSessionHome)PortableRemoteObject.narrow(homeObject, UserSessionHome.class); UserSession us = (

Exceptions creating a container managed entity bean...

1999-12-25 Thread Alex Paransky
ORION 0.8.2 Windows NT 4sp5 I have an Entity bean which has the following home interface: public interface EntityHome extends EJBHome { public Entity create(String name) throws CreateException, RemoteException; public Entity create(long id, String name) throws CreateException, RemoteExceptio

Adding a Session bean to an HttpSession

1999-12-25 Thread Frank Apap
Could someone show me some example code for how to add a session bean to an HttpSession? This is the psuedo-code for what i want to do --//UserSession is a Session EJB UserSession us = new UserSession(); us.setName("MYNAME"); HttpSession sess = request.getSession(true); sess.add(us); I

RE: How do I tell my Container Managed entity bean which datasourcetouse?

1999-12-25 Thread Alex Paransky
Ok, so I made the following entries in to the datasources xml file. Things appear to work better. But I have three questions: 1. Which data source are my beans using? 2. How do I tell a particular bean to use a different data source? 3. Where did you find this information out? Thanks. -AP_

RE: How do I tell my Container Managed entity bean which data source touse?

1999-12-25 Thread Mike Cannon-Brookes
You need to specify at least one XA datasource (transactional) in your datasources.xml file. If you've done that, Orion will automatically use the default XA datasource when it creates the deployment descriptor orion-ejb-jar.xml (a mild annoyance as I often want to change it BEFORE orion creates