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
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
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 = (
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
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
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_
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