[Resin-interest] java:comp/env/caucho/auth

2008-03-09 Thread Ron Pitts
Getting some werid problem using resin 3.1.5, I was using 3.1.4 without any
problems but looks like my form login is now broken.

Its returning an error javax.naming.NameNotFoundException:
java:comp/env/caucho/auth

Abtract of the class is as follows :


 public class CFormLogin extends com.caucho.server.security.FormLogin

  public ServletAuthenticator getAuthenticator()
  {
log.debug(get servletauthenticator);

if (_auth == null) {
  log.debug(auth =  null);
  try {
javax.naming.Context ic = new javax.naming.InitialContext();
_auth = (ServletAuthenticator) ic.lookup
(java:comp/env/caucho/auth);
  log.debug(_auth.toString());
  } catch (Exception e) {
log.debug(e.toString());
  }

Abtract of Web.xml

  authenticator type='jw.jaas.CServletAuthenticator'
init
 data-sourcejdbc/mysql/data-source
/init
  /authenticator

  !-- Default login configuration uses form-based authentication --
  login-config type=jw.jaas.CFormLogin
  auth-methodformc/auth-method
  realm-nameAnonymous Form-Based Authentication Area/realm-name
init
form-login-page/index.jsp/form-login-page
form-error-page/error.jsp/form-error-page
internal-forward/protected/menu.jsp/internal-forward
  /init

  form-login-config
form-login-page/protected/login.jsp/form-login-page
form-error-page/error.jsp/form-error-page
  internal-forward/protected/menu.jsp/internal-forward
  /form-login-config
  /login-config


Any ideas

thanks
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] Quercus: Online docs incomplete in crucial area

2008-03-09 Thread Stargazer
Crucial for me right now anyway ;-)
http://quercus.caucho.com/quercus-3.1/doc/quercus.xtp#php.ini
The section under JNDI DataSource ... WEB-INF/resin-web.xml has 
malformed xml for the database tag.
Any chance of a fuller example please?

The problem is I'm trying to associate a MySQL Pligg db on a different 
server to the one resin 3.1.5 is running on. All my attempts to patch 
things by updating the relevant *.php files stil result in 
localhost:3306 references in the error messages, when I really want to 
use (and see) foo.com:3306 there. Nothing I am doing seems to prevent 
it from looking at localhost.

The comment above the paragraph I mentioned seems strange too - it 
suggests a db config there will override anything in the php scripts, 
which is pretty much what I want. Does this really mean the params 
defined in the php scripts are irrelevant?



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] small question about entity ejb

2008-03-09 Thread Matt Johnston
I think you will need to use either the persist() or merge() methods of 
the EntityManager in order to save your data to the database. In your 
case since you are updating an existing record, you will need to use:

m_manager.merge(homeobj)


Matt

Riccardo Cohen wrote:
 Hi
 I used to play with entity ejb with resin 3.0 with no problem. Now in 
 3.1.5 I have this code :
 
@PersistenceContext(name=public) private EntityManager m_manager;
 
public boolean set_homeinfo(int id_user,String title)
{
  boolean success=false;
  Query hqr=m_manager.createQuery(select h from homeinfo h where 
 h.id_user=+id_user);
  Listhomeinfo hitems = (Listhomeinfo)hqr.getResultList();
  if (hitems.size()==1)
  {
homeinfo homeobj=hitems.get(0);
System.out.println(title was +homeobj.getTitle());
homeobj.setTitle(title);
success=true;
  }
  return(success);
}
 
 The select works all right, but the title field is never modified. I 
 added finer info on sql to see database requests in log, and there is no 
 update. Did I miss something ?
 
 I looked at the resin amber tutorials, but there are only select 
 samples, I did not see insert and update samples... I remember 
 problems like this with 3.0 when the entity bean was reused, it was not 
 saved, but here it is not the case.
 
 Thanks for any help.
 


-- 

Matt Johnston
http://www.lattaoutdoors.com
http://www.gearapalooza.com


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest