Re: User manager problems since 1.4.4

2001-01-23 Thread Tony Abbott

Hi Mike,

Hmm.. Have checked it and double checked it. Unless there has been an API 
change (and it doesn't look like based on my poking around) it should still
be calling isMemberOf to determine group/role membership but it isn't :(

-t

On Tue, Jan 23, 2001 at 02:19:10PM +1100, Mike Cannon-Brookes wrote:
 I'm not sure about your customer user manager (I'd recheck it closely if I
 were you! ;)) but in 1.4.5 all bugs re: EJBUserManager are fixed for me.
 
 -mike
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Tony Abbott
  Sent: Tuesday, January 23, 2001 12:44 PM
  To: Orion-Interest
  Subject: User manager problems since 1.4.4
 
 
  On Sat, Dec 16, 2000 at 05:40:06PM +1100, Mike Cannon-Brookes wrote:
   As far as I can tell, EJBUserManager and EJBUser are BROKEN in
  1.4.4+. The
   getGroups() method always returns null, and any role checking
  always returns
   false (isUserInRole(x)).
 
  the isUserInRole problem isn't specific to the EJBUserManager - I have a
  custom user manager which is also broken since 1.4.4 (well, between 1.4.0
  and 1.4.4 - havn't tested inbetween) and still broken in 1.4.5. In 1.4.0
  isUserInRole(String) eventually calls User.isMemberOf(Group) but in 1.4.4
  and 1.4.5 it doesn't, breaking isUserInRole badly. Mike, I see
  you mentioned
  it in bug #224 but it was not resolved. I have opened it
  separately as bug
  #257
 
  -t
 
  --
 
 Tony Abbott  [EMAIL PROTECTED]
 
 
 
 

-- 

   Tony Abbott  [EMAIL PROTECTED]





User manager problems since 1.4.4

2001-01-22 Thread Tony Abbott

On Sat, Dec 16, 2000 at 05:40:06PM +1100, Mike Cannon-Brookes wrote:
 As far as I can tell, EJBUserManager and EJBUser are BROKEN in 1.4.4+. The
 getGroups() method always returns null, and any role checking always returns
 false (isUserInRole(x)).

the isUserInRole problem isn't specific to the EJBUserManager - I have a 
custom user manager which is also broken since 1.4.4 (well, between 1.4.0
and 1.4.4 - havn't tested inbetween) and still broken in 1.4.5. In 1.4.0
isUserInRole(String) eventually calls User.isMemberOf(Group) but in 1.4.4
and 1.4.5 it doesn't, breaking isUserInRole badly. Mike, I see you mentioned 
it in bug #224 but it was not resolved. I have opened it separately as bug 
#257 

-t

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: Adding a site? - (2nd Post)

2000-11-07 Thread Tony Abbott

Judging from the error message you're probably not defining the TestSite
application. Add application name="TestSite" path="x" / to server.xml
where x is the path to the root directory of your application or the path
to your .ear file if you're using one...

-t

On Tue, Nov 07, 2000 at 07:36:18AM -0800, Thomas DeBruycker wrote:
 This is my second post for this question.  Are most
 users of Orion only using the default-web-app 
 site to deploy their applications?  It seems like it
 should be a simple thing to add another site.
 
 Can someone explain to me (clearly) how to add another
 site to Orion?  I have been successful in deploying
 EJBs and JSPs to the default-web-app location.  But I
 can not figure out how to create another site.  I have
 read all the earlier posting on how to do it but I
 continue to get the error:
 
 Error initializing site TestSite: No application named
 'TestSite' found in the server
 
 The steps if followed were:
 1) Copied the default-web-site.xml file to
 TestSite.xml.
 2) Edited TestSite.xml  Set the element
 default-web-app to application="TestSite"
 name="TestSite".  Set the element web-app to
 application="TestSite" name="TestSite"
 root="/TestSite"
 3) Added the line web-site path="./TestSite.xml" /
 to server.xml
 4) Added web-app application="TestSite"
 name="TestSite" root="/TestSite" / to
 default-web-app.
 
 I someone is can point out my error I would appreciate
 it.  Also if someone does post an example (PLEASE!) be
 consistent with file names and site / application
 names.
 
 The site I am trying to add only contains HTML and
 JSP.  There are no EJBs.
 
 Thanks in advance.
 
 Tom D.
 
 
 __
 Do You Yahoo!?
 Thousands of Stores.  Millions of Products.  All in one Place.
 http://shopping.yahoo.com/

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: list archives

2000-10-18 Thread Tony Abbott

Searchable archives are available at
http://www.mail-archive.com/orion-interest%40orionserver.com/

(linked under "Mailing list" on www.orionserver.com)


-t

On Wed, Oct 18, 2000 at 04:28:37PM -0500, Kemp Randy-W18971 wrote:
 How can I view the list archives for reviewing the discussion on running Orion 
server processes as someone other then root?  How do I view the list archives in 
general? 

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: FW: Primary Key problem

2000-09-27 Thread Tony Abbott

AFAIK the JDBC-ODBC bridge is single threaded - that's probably what you were 
running into...


-t

On Wed, Sep 27, 2000 at 06:20:48AM -0400, Goel, Deepak wrote:
 Hi Amir,
 
 I'm interested in finding how were you able to make Orion work with
 JDBC-ODBC layer. I was able to do it but I keep on getting error from the
 ODBC driver "Connection is busy with results from the previous statement".
 This I have seen to be a limitation of SQL Server driver, not of Orion or
 any other software.
 
 I'll appreciate if you can share your solution.
 
 Thanks,
 Deepak
 
 -Original Message-
 From: Amir Peivandi [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 25, 2000 1:26 PM
 To: Orion-Interest
 Subject: RE: Primary Key problem
 
 
 Yes I did, bug #64 
 
 -Original Message-
 From: Ernst de Haan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 25, 2000 2:06 PM
 To: Orion-Interest
 Subject: Re: Primary Key problem
 
 
 Hi Amir,
 
 Have you added this to the Bugzilla bug database ? This way you will get the
 attention of the Orion development team and you (and the rest of us) will be
 able to track the status. :)
 
 Ernst
 
 Amir Peivandi wrote:
  Hi,
  I had a problem and it took me about five hours to find and fix it. I
 though
  it could be useful for everybody to know and maybe it's a bug in Orion.
  When you have a CMP Entity bean which maps to a table with a certain
  condition as I explain here, the remove method fails with a message which
  says the object is being used and is locked by another active connection.
  This happens when you have a table with one, two or more fields and the
  primary key is a multi field key, consist of all the fields in the table.
 It
  also happens when there is only one field in the table which is the
 primary
  key. To resolve this issue you need to add at least a field to the table
  which is not part of the primary key!
  
  I'm using SQL server with ODBC/JDBC connection.
  
  Regards,
  Amir
  
  

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: Caching and object pooling in Orion

2000-09-27 Thread Tony Abbott

I'd also like to know a bit more about how the caching works. As for all those
"unnecessary" database writes - I guess they're there to help ensure data 
integrity in the event of a crash... You can eliminate many of them though -
from the FAQ:

Q: I am using CMP Entity beans and call many methods on it that do not modify 
the state of the bean. How can I help Orion figure out that I am not
changing the state and that it does not need to talk to the database? 

A: Implement the method "public boolean isModified()" in your bean to return a 
boolean flag that you set each time you modify your bean and clear in 
ejbStore(). If isModified() returns false, Orion knows that it doesn't need to 
talk to the database

Weblogic (I think - one of the "big" appservers anyway) does the same sort of 
thing.


-t

On Wed, Sep 27, 2000 at 10:52:34AM -0400, KirkYarina wrote:
 I'm also like to hear the answers - we're also seeing an apparent database 
 write per CMP bean reference.
 
 At this point our test programs (not our real application...) are clients 
 that access entity beans directly, rather than going through a session bean 
 facade.  We've speculated that the individual database writes somehow 
 result from the direct client accesses, but we're only guessing.  Changing 
 transaction attributes doesn't make any difference, and (for now) we have 
 exclusive-write-access="true" on every table.
 
 I have to periodically justify CMP vs BMP, not to mention Orion, and it's a 
 problem when I can't explain why caching doesn't seem to be working...
 
 Come on guys, share some details.  You don't have to delve into proprietary 
 information, but the 5 minute overview would make life a lot easier for 
 those of us who have to justify Orion to our investors - and ourselves - 
 when it comes time to bet our business on it.  We'd appreciate it.
 
 Kirk Yarina
 
 At 06:21 AM 9/27/00 -0400, you wrote:
 Hello everyone,
 
 This question has been asked before in this mailing list but there has been
 no answer yet. I hope that there is some response this time.
 
 The questions are:
 1. Does Orion implement EJB object caching? If yes, I'll appreciate some
 details on what has been implemented.
 2. I want to find out specifically about CMP based EJB caching. When are
 these beans cached and what evicts them from cache? I have implemented some
 CMP EJBs and I see that anytime I want to access these beans, a database
 call is made. To clarify, my client starts up and instantiates these beans
 and then exits. When I restart the client, when it accesses the same beans
 leads to database calls.
 3. Some details about session beans caching will also be appreciated. Does
 Orion allow that some number of session bean instances be pre-created? If
 yes, how can this be specified?
 
 Thanks,
 Deepak
 
 
 Kirk Yarina
 [EMAIL PROTECTED]
 

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: container transactions not working...

2000-09-21 Thread Tony Abbott

Hi Andre,

Thanks for the quick reply. Just tried it and still getting no joy. I'm sure
I'm missing something obvious...

-t

On Thu, Sep 21, 2000 at 07:13:09PM -0600, Andre Vanha wrote:
 Try using the XA datasource when you acquire a connection:
 jdbc/xa/myXADS
 
 In your ejb-jar file:
 resource-ref
   res-ref-namejdbc/myXADS/res-ref-name
   res-typejavax.sql.XADataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 
 In your bean:
 Context naming = new InitialContext();
 XADataSource ds = (XADataSource)naming.lookup("java:comp/env/jdbc/myXADS");
 Connection conn = ds.getXAConnection().getConnection();
 
 
 I use an XADatasource with orcale and transactions work correctly.
 Also I read somewhere if you use JDBC from within EJBs you should use the
 EJBDS resource, however everything works fine for me with XADatasource.
 EJBDS might only be applicable to Entity Beans.
 
 Andre
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Tony Abbott
 Sent: Thursday, September 21, 2000 6:33 PM
 To: Orion-Interest
 Subject: container transactions not working...
 
 
 hi
 
 hope someone can help me as i am now highly frustrated :) i am unable to get
 container managed transactions to work in conjunction with jdbc/oracle.
 basically i have a stateless session bean which writes to tables. It seems
 to
 me orion is not managing the transactions at all. With the setup and code
 below it does not roll back the transaction despite the setRollbackOnly().
 If
 I throw a system exception it does not roll back either. If I do multiple
 inserts in the method each insert is committed immediately and not as a
 single
 transaction at the end of the method. I'm really hoping I'm missing
 something
 obvious and this is not a serious problem in orion... Any help/suggestions
 would be highly appreciated!
 
 I'm using Oracle 8.1.6R2, classes12.zip (Oracle JDBC drivers), JDK1.3rc1 on
 Linux and have tried Orion 1.3.8 and 1.2.9 with the same results.
 
 data-sources.xml:
 
 data-source
 name="test"
 class="com.evermind.sql.ConnectionDataSource"
 location="jdbc/myDS"
 pooled-location="jdbc/myPooledDS"
 xa-location="jdbc/xa/myXADS"
 ejb-location="jdbc/myEJBDS"
 url="jdbc:oracle:oci8:@mydb"
 connection-driver="oracle.jdbc.driver.OracleDriver"
 username="user"
 password="password"
 /
 
 and in ejb-jar.xml
 
   session
  descriptionA session bean/description
  ejb-nameTestBean/ejb-name
  homeTestHome/home
  remoteTest/remote
  ejb-classTestBean/ejb-class
  session-typeStateless/session-type
  transaction-typeContainer/transaction-type
  resource-ref
 res-ref-namejdbc/myPooledDS/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
  /resource-ref
   /session
 and
assembly-descriptor
   container-transaction
  method
 ejb-nameTestBean/ejb-name
 method-nameload/method-name
  /method
  trans-attributeRequired/trans-attribute
   /container-transaction
/assembly-descriptor
 
 and the method:
 
public void load()
{
   Connection con = null;
   PreparedStatement ps = null;
   try
   {
  Context naming = new InitialContext();
  DataSource ds =
 (DataSource)naming.lookup("java:comp/env/jdbc/myPooledDS");
  con = ds.getConnection();
  ps = con.prepareStatement("insert into mytable (id, value) values
 (?, ?)"):
  ps.setInt(1, 1);
  ps.setString(2, "testing");
  ps.executeUpdate();
  context.setRollbackOnly();
   }
   catch (NamingException e)
   {
  throw new EJBException(e);
   }
   catch (SQLException e)
   {
  throw new EJBException(e);
   }
   finally
   {
  try
  {
 if (ps != null)
ps.close();
 if (con != null)
con.close();
  }
  catch (SQLException e)
  {
 e.printStackTrace();
  }
   }
}
 
 
 
 
 
 
 --
 
Tony Abbott[EMAIL PROTECTED]
 

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: User name and password (Newbie)

2000-09-07 Thread Tony Abbott

In your orion directory run "java -jar orion.jar -install" and enter a password.
Use admin and your chosen password to access the tools. Or you can just edit
config/principals.xml and remove deactivated="true" from the admin user...

-t


On Thu, Sep 07, 2000 at 02:53:59PM -0700, Richard Landon wrote:
 
 
 Many of the Orion related commands require the username and password
 So what are they?
 
 Simply installed the default, no changes. It prompts for these and 
 refuses to execute anything.
 
 Please help.
 

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: Newbie - Am I going mad? Broken links on home page

2000-09-04 Thread Tony Abbott
ffice.com.au - my site
  http://peakhour.com.au- company site
 
 

-- 

   Tony Abbott  [EMAIL PROTECTED]





Re: OrionCMTConnection not closed

2000-08-29 Thread Tony Abbott

Sounds to me like their code is missing a close() on the database connection.
You always need to do a close() on the connection so that it can be reused
within the connection pool.

-t


On Tue, Aug 29, 2000 at 04:03:29PM +0100, Chris Miller wrote:
 I have a BMP bean (3rd party, but I have the source code) that writes to a
 database. The write is fine and gets committed seemingly without problems.
 Once I continue surfing around the site however Orion then throws the
 following exception:
 
 OrionCMTConnection not closed, check your code!
 LogicalDriverManagerXAConnection not closed, check your code!
 Created at:
 java.lang.Throwable: OrionCMTConnection created
  at com.evermind.sql.ai.init(JAX)
  at com.evermind.sql.OrionCMTDataSource.getConnection(JAX)
  at
 com.cai.joe.component.PortableContext1_1.getDatabaseConnection(PortableConte
 xt1_1.java:49)
  at
 com.cai.joe.component.ComponentContext$DatabaseConnection.establishJDBCConne
 ction(ComponentContext.java:400)
  at
 com.cai.joe.component.ComponentContext$DatabaseConnection.init(ComponentCo
 ntext.java:303)
  at com.cai.joe.component.ComponentContext.init(ComponentContext.java:68)
  at
 com.cai.joe.component.ComponentContextFactory.create(ComponentContextFactory
 java:73)
  at
 com.cai.joe.component.InitialComponentContext.init(InitialComponentContext
 java:77)
  at
 com.sevenirene.qnacomponent.session.QuestionComponentSessionBean.createQuest
 ion(QuestionComponentSessionBean.java:54)
  at
 IQuestionComponentEJBObject_StatelessSessionBeanWrapper21.createQuestion(IQu
 estionComponentEJBObject_StatelessSessionBeanWrapper21.java:53)
  at com.lgfg.ejbwrapper.QuestionEJB.createQuestion(QuestionEJB.java:74)
  at com.lgfg.action.VoteSaveAction.perform(VoteSaveAction.java:102)
  at
 org.apache.struts.action.ActionServlet.processActionInstance(ActionServlet.j
 ava:794)
  at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702)
  at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:332)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java)
  at com.evermind.server.http.dk.p8(JAX)
  at com.evermind.server.http.dk.forward(JAX)
  at com.evermind.server.http.dt.qe(JAX)
  at com.evermind.server.http.dt.qd(JAX)
  at com.evermind.util.f.run(JAX)
 
 
 Any ideas/help/tips on this one? I'm not sure if it really is the code in
 the bean, or something to do with my config/deployment descriptor.
 

-- 

   Tony Abbott  [EMAIL PROTECTED]