RE: [JBoss-user] [Persistence CMP/JBoss] - specify Postgres sequence name using XDoclet?

2004-09-28 Thread Victor Batista
Hi
   I think you are missing the tag @jboss.entity-command-attribute. I am
successfully using sequences with the two following tags (having the
sequence SEQUENCE_NAME previously created).


* @jboss.entity-command
* name=pk-sql
* @jboss.entity-command-attribute
*   name=pk-sql
*value=SELECT nextval('SEQUENCE_NAME')

Regards,
Victor Batista

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of mhixson
Sent: terça-feira, 28 de Setembro de 2004 1:25
To: [EMAIL PROTECTED]
Subject: [JBoss-user] [Persistence  CMP/JBoss] - specify Postgres sequence
name using XDoclet?

I currently have an entity bean with these xdoclet tags.

 * @ejb.bean
 * view-type=local
 * name=Content   
 * type=CMP 
 * cmp-version=2.x 
 * schema=content
 * primkey-field=contentId
 * local-jndi-name=Content
 * @ejb.interface
 * generate=local
 * local-extends=javax.ejb.EJBLocalObject
 * @ejb.home
 * local-extends=javax.ejb.EJBLocalHome
 * @ejb.persistence
 * table-name=content
 * @jboss.entity-command 
 * name=postgresql-fetch-seq
 * @jboss.method-attributes
 * pattern=get*
 * read-only=true


What I'd like to do is specify the sequence name.  Apparently JBoss is
assuming that the sequence name is content_content_id_seq when it actually
is named v_content_content_id_seq because of a wacky table naming convention
(the table used to be named v_content).
  I think I need to use @jboss.entity-command-attribute, but I don't know
what the name of the attribute should be.
  Thanks,
   -M@

View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849678#3849678

Reply to the post :
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849678


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project
Admins to receive an Apple iPod Mini FREE for your judgement on who ports
your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory.createNewArray...

2004-03-07 Thread Victor Batista



Hello! 

 I have 
been using jboss 3.2.1 bundled with tomcat 4.1.24 with no problem. Suddenly, I 
started getting the following error:

2004-03-08 
01:44:51,904 WARN [org.jboss.system.ServiceController] Problem starting 
service 
jboss.j2ee:jndiName=xpto.MyEntityBean,service=EJBjava.lang.NoSuchMethodError: 
org.apache.bcel.generic.InstructionFactory.createNewArray(Lorg/apache/bcel/generic/Type;S)Lorg/apache/bcel/generic/AllocationInstruction;at 
org.jboss.proxy.compiler.ProxyImplementationFactory.createProxyMethod(ProxyImplementationFactory.java:319)at 
org.jboss.proxy.compiler.ProxyCompiler.getCode(ProxyCompiler.java:167)at 
org.jboss.proxy.compiler.Runtime.makeProxyType(Runtime.java:66)at 
org.jboss.proxy.compiler.ProxyCompiler.init(ProxyCompiler.java:76)at 
org.jboss.proxy.compiler.Proxies$Impl.newTarget(Proxies.java:603)at 
org.jboss.proxy.compiler.Proxies.newTarget(Proxies.java:78)


I don't 
remember to have changed any thing
Does any one 
knows why is this happening?

 Thanks in 
advance,
 Victor 
Batista



RE: [JBoss-user] Web Service and file access

2004-03-06 Thread Victor Batista



Hi!
 Thanks for your 
reply!
 I can use java.io with no problem on 
Session Bean methods. I need to know if this is the best way to do this 
(although violatung the spec), or is there a better way to do what I 
neeed?

 Thanks in 
advance,
 Victor 
Batista


From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Maffeo 
GaetanoSent: sexta-feira, 5 de Março de 2004 13:18To: 
[EMAIL PROTECTED]Subject: R: [JBoss-user] Web Service 
and file access

 See to my code inside an EJB, that's 
my webservice server side:
dhDoc 
is my file

 public DatiRegistrazione 
InserimentoAllegato(String user, String password, String 
ente, String NomeDoc, DataHandler dhDoc, 
String NoteDoc, String progressivo, String 
dataRegistrazione) throws Exception { DatiRegistrazione 
datiRegistrazione = new DatiRegistrazione(); 
IObjectsPool 
profile = ""> 
Utente 
MyUtente = new Utente(); 
Protocollo 
MyProtocollo = new Protocollo(); java.sql.Date 
MydataRegistrazione = null;

 try 
{ 
...
 File MyFile = new 
java.io.File(dhDoc.getName());
.
 } catch(AppException ex) 
{ throw(ex); } 
catch(Exception ex1) { 
throw(ex1); } return 
datiRegistrazione; }Pay only attention so that the WDD 
contains:

 typeMapping 
xmlns:ns="http://activation.javax" 
qname="ns:DataHandler" 
type="java:javax.activation.DataHandler" 
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
/
That's all and works fine under Jboss 
3.2.3

gaetano

  -Messaggio originale-Da: Victor Batista 
  [mailto:[EMAIL PROTECTED]Inviato: venerdì 5 marzo 
  2004 13.41A: [EMAIL PROTECTED]Oggetto: 
  [JBoss-user] Web Service and file access
  Hello!
   
  I need to develop one web service which must manage file uploads. If I use 
  axis under JBoss, I can export SessionBean methods as web service methods. 
  Although, under the EJB spec, Enterprise Beans must not access 
  files:


[JBoss-user] Web Service and file access

2004-03-05 Thread Victor Batista



Hello!
 I 
need to develop one web service which must manage file uploads. If I use axis 
under JBoss, I can export SessionBean methods as web service methods. Although, 
under the EJB spec, Enterprise Beans must not access 
files:


[JBoss-user] Web Service and file access (complete email)

2004-03-05 Thread Victor Batista



Hello!
 Sorry por my previous post:the 
mail was incomplete.
 I need to develop one web service which must manage 
file uploads/downloads. If I use axis 
under JBoss, I can export SessionBean methods as web service methods. Although, 
under the EJB spec, Enterprise Beans must not access 
files:  "An enterprise bean must not 
use the java.io package to attempt to access files and directories in the file 
system."

 I know I will use JBoss and I will 
not migrate to another container.

 How should I do 
this?
Can I do the File accesses 
under a session bean method (it is working), although I am violating the 
spec?

 Any help would be 
welcome!

 Thanks in 
advance,
 Victor 
Batista

 



[JBoss-user] primary key: auto-increment

2004-02-05 Thread Victor Batista
Hello!
I am using JBoss 3.2.3 with Postgres 7.3.4. I am trying to generate primary
keys automatically. When I use the following entity-command, with the
sequence previously created, everything works fine:

* @jboss.entity-command
*name=pk-sql
* @jboss.entity-command-attribute
*name=pk-sql
*value=SELECT nextval('TEST_SEQ')


CMP declaration:

* @ejb:persistent-field
* @ejb:pk-field
*
* @jboss:column-name name=TEST_ID
* @jboss:persistence auto-increment=true



When I tried with the following entity-command:
* @jboss:entity-command
 *  name=postgresql-fetch-seq
 *
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand
 * @jboss:entity-command-attribute
 *  name=sequence
 *  value=TEST_SEQ


I got the following exception:

2004-02-05 17:48:20,132 ERROR
[org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand.Test]
Could not create entity
java.sql.SQLException: ERROR:  ExecInsert: Fail to add null value in not
null attribute test_id

at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection
.java:505)


Why is this happening?

Is there any way to have incremental primary keys without the explicit usage
of sequences? If yes, how?
What can I win with a unknown-pk declaration?
Is there any way to automatically create the sequences if they don't still
exist (something like: @jboss:create-table create=true)?


Thanks in advance,
Victor Batista





---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] primary key: auto-increment

2004-02-05 Thread Victor Batista
Hi!
Thanks for your reply!

  Is there any way to have incremental primary keys without the
  explicit usage of sequences? If yes, how?

 What do you mean by implicit use of sequences?
Is it possible to have an incremental primary key without the usage of
sequences?

Which is the better way to have a incremental primary key?

1)
* @jboss.entity-command
*name=pk-sql
* @jboss.entity-command-attribute
*name=pk-sql
*value=SELECT nextval('TEST_SEQ')

2) Which I can't get working..
* @jboss:entity-command
 *  name=postgresql-fetch-seq
 *
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand
 * @jboss:entity-command-attribute
 *  name=sequence
 *  value=TEST_SEQ

3) Any other..



  What can I win with a unknown-pk declaration?
 There is a paragraph in the spec about it called Special case Unknown
 primary keys.
I have seen the spec, and for now I don't need the unknown-pk :-)



  Is there any way to automatically create the sequences if
  they don't still exist (something like: @jboss:create-table
  create=true)?

 At the moment, JBoss does not create sequences even if it is setup to
 create tables. As a workaround, I think, you could use something like
 @jboss.persistence post-table-create=CREATE SEQUENCE %%t_seq START WITH
 1 INCREMENT BY 1
Unfortunately the jboss.persistence tag doesn't seems to be working


Regards and thanks,
Victor Batista





---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Extend DatabaseServerLoginModule functionality.

2003-12-02 Thread Victor Batista
Hello!
   I have an enterprise application which is using the
DatabaseServerLoginModule to authenticate users. The web application is
using Form Based authentication, with the login-page and error-page defined
on the web.xml file.

   Now I need to extend the DatabaseServerLoginModule functionality with a
few additional features:
- Passwords expire after N days of inactivity;
- Users get blocked after N attempts lo Login with an erroneous password;
- .

   When a user can't login, I need to catch the error (invalid passwd,
blocked account, ...). I can set different messages for the LoginException,
and use the message to know the error. Although, where can I catch the
LoginException?

   I will also need to call the JAAS logout method when the user logs out,
or when the session expires. How can I do this explicitly?

   Which is the best solution for my problem? Extend the
DatabaseServerLoginModule, or is there a better solution (Use the
DatbaseServerLoginMethod and do all the verifications above only after,..)?

   Any help would be really appreciated.

   Thanks in advance,
Victor Batista
   I




---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JBoss+Tomcat answering for static files

2003-09-03 Thread Victor Batista
Hello!
I am using JBoss-3.2.1 with bundled Tomcat-4.1.24 (without Apache or any
other webserver).
  I need Tomcat to answer for static files which are on a remote dir.
How can I do this? I need to do something like the following (If I was
running Tomcat as a standalone process):

Context path=/img
docBase=G:\server\default\deploy\portal.war\mmserver\images/Context

Any help would be appreciated.
Thanks in advance,
Victor Batista




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JaasSecurityManagerSercvice flushing credentials

2003-02-28 Thread Victor Batista
Hi!
Thanks for your reply!
I think that, even with the method you refer, I'll continue having the
problem. Suppose I am user xpto, and I have somewhere in the application
(web in my case), the opportunity to change my password. In this case I
should flush my credentials, being them dropped from memory!
If credentials are dropped from memory (after being flushed), the user
which is logged looses all its credentials?
Is the behavior I am getting normal?

Thanks,
Victor Batista

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David Ward
Sent: quinta-feira, 27 de Fevereiro de 2003 20:32
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JaasSecurityManagerSercvice flushing
credentials


I have submitted this RFE that will allow flusing of just a single
user's credentials:
http://sourceforge.net/tracker/index.php?func=detailaid=677614group_id=228
66atid=376688

Hers is the original email thread:
http://www.mail-archive.com/jboss-user%40lists.sourceforge.net/msg25514.html

Scott Stark has picked it (the RFE) up and has said he would try to get
it in the next version.  I am hoping that means JBoss 3.0.7, not just
the final 3.2 release.

David

--

Victor Batista escribió::
 Hello!
   I am having problems after flushing the authentication cache at runtime.
I
 am using the code which is at the bottom of the email. The flush is done
 correctly, although, the user which executes this code looses all its
 permissions after this. According to the documentation this code drops all
 cached credentials and flushes them to the specified DataSource. How can I
 avoid to have the credentials being dropped from memory, or how can I
reload
 them.
   I am using this code only when I update User's data (Roles and/or
 Password).

   Any help would be welcome.
   Thanks in advance,
   Victor Batista


   java.util.ArrayList servers =
   MBeanServerFactory.findMBeanServer(null);
 if (servers.size() != 1)
 throw new EJBException(Not exactly one server found);
 MBeanServer mbeanServer = (MBeanServer) servers.get(0);
 String[] params = { DCSapdbDB };
 String[] signature = { java.lang.String };
 try {
 ObjectName name =
 new ObjectName(
 jboss.security,
 service,
 JaasSecurityManager);
 mbeanServer.invoke(
 name,
 flushAuthenticationCache,
 params,
 signature);

 } catch (Exception e) {
 e.printStackTrace();
 throw new EJBException(e);
 }






---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JaasSecurityManagerSercvice flushing credentials

2003-02-28 Thread Victor Batista
Hi!
The problem is that authentication isn't running again.
After I update my password, the user looses all its roles. If I try to
execute any method on EJBs, I get an
error. I have also inserted a printf before and after executing the code to
flush credentials:

This code is executed from a Servlet:
if(request.isUserInRole(XPTO)) {
System.out.println(USER IS IN ROLE XPTO);
} else {
System.out.println(USER IS NOOO IN ROLE XPTO);
}

Before I update credentials, the isUserInRole returns true. After
executing the updatePasswd which flushes credentials, the isUserInRole call
returns false

Acording to you, the call after flishing credentials should also return
true, right?

I am using JBoss3.0.4 with bundled Tomcat 4.0.6. Can this be the problem?

Thanks again,
Victor Batista







Hi,

That is right, but you should not think about that , beacause with next
access on each method on server,
the authentication will run again, and therefore the user will have all
new changes.


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Victor
Batista
Gesendet: Freitag, 28. Februar 2003 11:33
An: [EMAIL PROTECTED]
Betreff: RE: [JBoss-user] JaasSecurityManagerSercvice flushing
credentials


Hi!
Thanks for your reply!
I think that, even with the method you refer, I'll continue
having the problem. Suppose I am user xpto, and I have somewhere in the
application (web in my case), the opportunity to change my password. In
this case I should flush my credentials, being them dropped from memory!
If credentials are dropped from memory (after being flushed),
the user which is logged looses all its credentials?
Is the behavior I am getting normal?

Thanks,
Victor Batista

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David Ward
Sent: quinta-feira, 27 de Fevereiro de 2003 20:32
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JaasSecurityManagerSercvice flushing
credentials


I have submitted this RFE that will allow flusing of just a single
user's credentials:
http://sourceforge.net/tracker/index.php?func=detailaid=677614group_id
=228
66atid=376688

Hers is the original email thread:
http://www.mail-archive.com/jboss-user%40lists.sourceforge.net/msg25514.
html

Scott Stark has picked it (the RFE) up and has said he would try to get
it in the next version.  I am hoping that means JBoss 3.0.7, not just
the final 3.2 release.

David

--

Victor Batista escribió::
 Hello!
   I am having problems after flushing the authentication cache at
 runtime.
I
 am using the code which is at the bottom of the email. The flush is
 done correctly, although, the user which executes this code looses all

 its permissions after this. According to the documentation this code
 drops all cached credentials and flushes them to the specified
 DataSource. How can I avoid to have the credentials being dropped from

 memory, or how can I
reload
 them.
   I am using this code only when I update User's data (Roles
and/or
 Password).

   Any help would be welcome.
   Thanks in advance,
   Victor Batista


   java.util.ArrayList servers =
   MBeanServerFactory.findMBeanServer(null);
 if (servers.size() != 1)
 throw new EJBException(Not exactly one server found);
 MBeanServer mbeanServer = (MBeanServer) servers.get(0);
 String[] params = { DCSapdbDB };
 String[] signature = { java.lang.String };
 try {
 ObjectName name =
 new ObjectName(
 jboss.security,
 service,
 JaasSecurityManager);
 mbeanServer.invoke(
 name,
 flushAuthenticationCache,
 params,
 signature);

 } catch (Exception e) {
 e.printStackTrace();
 throw new EJBException(e);
 }






---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf ___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf ___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

[JBoss-user] JaasSecurityManagerSercvice flushing credentials

2003-02-27 Thread Victor Batista
Hello!
I am having problems after flushing the authentication cache at runtime. I
am using the code which is at the bottom of the email. The flush is done
correctly, although, the user which executes this code looses all its
permissions after this. According to the documentation this code drops all
cached credentials and flushes them to the specified DataSource. How can I
avoid to have the credentials being dropped from memory, or how can I reload
them.
I am using this code only when I update User's data (Roles and/or
Password).

Any help would be welcome.
Thanks in advance,
Victor Batista


java.util.ArrayList servers =
MBeanServerFactory.findMBeanServer(null);
if (servers.size() != 1)
throw new EJBException(Not exactly one server found);
MBeanServer mbeanServer = (MBeanServer) servers.get(0);
String[] params = { DCSapdbDB };
String[] signature = { java.lang.String };
try {
ObjectName name =
new ObjectName(
jboss.security,
service,
JaasSecurityManager);
mbeanServer.invoke(
name,
flushAuthenticationCache,
params,
signature);

} catch (Exception e) {
e.printStackTrace();
throw new EJBException(e);
}





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] MBeanServer

2003-02-13 Thread Victor Batista
Hello!
I am using JBoss 3.0.4 bundled with Tomcat 4.0.6. I am using the code at
the end of the email to flush role's data when I update users on the
application. This is working correctly. My problem is that, after executing
the code , the user which is logged looses its roles.
If the code to flush role's data in executed on method updateUser of
sessionBean, I have the following, when updating a user from a servlet;

request.isUserInRole(xpto)
sessionBean.updateUser(someUser);
request.isUserInRole(xpto)

The first call to isUserInRole returns true, and the second false. If I
remove the flush code, it works fine.
I suppose that after flushing the data, the memory data is
invalidated/erased. How can I reload this data?
After executing the updateUser, I need to execute some other operations,
which require roles to execute.
Any help would be appreciated.
Thanks in advance,
Victor Batista



#
java.util.ArrayList servers =
MBeanServerFactory.findMBeanServer(null);
if (servers.size() != 1)
throw new EJBException(Not exactly one server found);
MBeanServer mbeanServer = (MBeanServer) servers.get(0);
String[] params = { XPTO };
String[] signature = { java.lang.String };
try {
ObjectName name =


new ObjectName(
jboss.security,
service,
JaasSecurityManager);
mbeanServer.invoke(
name,
flushAuthenticationCache,
params,
signature);

} catch (Exception e) {
e.printStackTrace();
throw new EJBException(e);
}
#



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Global index.html - DirectoryIndex

2003-01-15 Thread Victor Batista
Hello!
I am using JBoss with Bundled Tomcat. Tomcat is my first
front-end to clients (I am not using any web server to which Tomcat connects
to).
How can I have the Apache DirectoryIndex feature?
I have an index.html page which redirects clients to one
application's jsp. Where do I put this index.html?
This index.html is global, not relative to an application. I
want to do something like:
Redirect http://xxx.xxx.xxx.xxx/ to
http://xxx.xxx.xxx.xxx/XPTO/x.jsp 
My index.html wouldn't be included in the war file of
application XPTO
 
Thanks in advance,
Victor Batista
 
PS - If I have application XPTO.war, how can I access it through
a different context name than XPTO? Is there any web.xml configuration for
this?
 

attachment: winmail.dat

[JBoss-user] JBoss on a production environment

2003-01-13 Thread Victor Batista
Hello!
I am using JBoss 3.0.4 wit Bundled Tomcat 4.0.6. I was planning
to use this version for a production environment. I have just seen the
release of JBoss 3.0.5. Should I upgrade to this version? Are these versions
stable enough for production, or should I use any other version?
 
Which security considerations should I take care to move JBoss
to production?
On Linux, JBoss 3.0.4 uses the jmx-console to stop the service.
This way I can't remove jmx-console. One of the steps I am planning to do is
to activate the security of jmx-console. What other things should I change
to improve security/performance. I am using the default JBoss configuration.
 
I would appreciate your help, and to hear your experiences.
 
Thanks in advance,
Victor Batista

attachment: winmail.dat

[JBoss-user] DatabaseServerLoginModule is caching Roles Info...how to deactivate?

2003-01-07 Thread Victor Batista
Hello!
My JBoss is caching the user's roles info. How can I deactivate this
caching mechanism?
Suppose I am logged with a User with Roles A and B. If this user changes
his roles (Administrator :-)), and adds Role C, the user wan't have this
permission until JBoss is restarted. If I change the roles of a user who has
already loggen in any time, I get the same problem.
Is it possible to deactivate this caching mechanism, and force JBoss to
read data from the database every time?

Any help would be welcome.

Thanks in advance,
Victor Batista

PS - I am using JBoss 3.0.4 with bundled Tomcat 4.0.6. I am using
DatabaseServerLoginModule




---
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Using Apache web server - yes or no?

2002-12-10 Thread Victor Batista








Hello!

 I am using JBoss with bundled
Tomcat. The server which I am
running applications will only have dynamic applications (servlets
or servlets + EJBs).

 On
this case should I use the apache web server, or can I use Tomcat to answer to
HTTP requests directly?

 I
would appreciate to know opinions/experiences on this topic.



 Thanks
in advance,

 Victor
Batista

 








[JBoss-user] Dynamic query and read-ahead - Help!!

2002-11-21 Thread Victor Batista
Hello!
I am using JBoss 3.0.2 with bundled Tomcat 4.0.4.
I am having problems using read-ahead with Dynamic queries. I
configure my dynamic finder with the read-ahead feature, but it simply
ignores them and behaves always the same. With no Dynamic queries, it
works great.
I configured my finder using Xdoclet. The Xdcolet configuration,
the ejb-jar.xml extract and the jbosscmp-jbcd.xml extract are appended
below.
I need the dynamic feature because I need to execute a
SELECT...WHERE xpto IN (..,..).

Below are two log messages extracted from the JBoss log when my
dynamic query was a simple Select.
When I execute the finder (1), the query returns all columns (no
matter if my strategy is on-load or on-find). After this, if I
execute one method which returns one Value Object with all the columns,
another select is automatically executed by the 
container (2). This select shouldn't be necessary once I am still in the
same transaction, so the previous data is still valid.
If I only access columns from the Primary Key (instead of getting the VO
with all columns), the select (2) isn't executed.

I have concluded that I can't configure read-ahead on Dynamic
queries. Is this the expected behavior? Is it related with the JBoss
version I am using? Am I doing any thing wrong? I don't want to execute
two consecutive selects which return the same data...

Any help would be really appreciated!!

Thanks in advance,
Victor Batista

 

(1)
2002-11-22 00:17:11,109 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.User.findAllIn]
Executing SQL: SELECT t0_u.username, t0_u.name, t0_u.surname,
t0_u.passwd, t0_u.int_num, t0_u.description, t0_u.creation_date FROM
DC_USERS t0_u WHERE t0_u.username = 'vbatista'

(2)
2002-11-22 00:17:11,129 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.User] Executing
SQL: SELECT name, surname, passwd, int_num, description, creation_date
FROM DC_USERS WHERE (username=?) FOR UPDATE



  XDOCLET CONFIGURATION
 * @ejb:finder signature=java.util.Collection
findGeneric(java.lang.String query, java.lang.Object[] args)
 *  query=
 *
 * @jboss:query signature=java.util.Collection
findGeneric(java.lang.String query, java.lang.Object[] args)
 *  dynamic = true
 *  strategy=on-load




  EJB-JAR
 query
query-method
   method-namefindGeneric/method-name
   method-params
  method-paramjava.lang.String/method-param
  method-paramjava.lang.Object[]/method-param
   /method-params
/query-method
ejb-ql![CDATA[]]/ejb-ql
 /query


  JBOSSCMP-JDBC
 query
query-method
   method-namefindGeneric/method-name
   method-params
  method-paramjava.lang.String/method-param
  method-paramjava.lang.Object[]/method-param
   /method-params
/query-method
dynamic-ql/

read-ahead
strategyon-find/strategy
/read-ahead
 /query



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Dynamic query problem!

2002-11-19 Thread Victor Batista
Hello!
I am using JBoss jboss-3.0.2_tomcat-4.0.4. I am having a strange
behavior with a dynamic query. The problem is that the data returned by
my dynamic query (1) isn't kept in memory and than (when I start the
iteration through the results) another select is executed (2), which
returns exactly the same data. All the code should be executing in one
only transaction (according to my code). I have tried to change the
read-ahead policy from on-find to on-load, but nothing changes. I
don't seem to have control over the dynamic query. Is any one
experiencing this behavior? Can any one help me, please?

Thanks in advance,
Victor Batista

//
(1)
Executing SQL: SELECT t0_u.username, t0_u.name, t0_u.surname,
t0_u.passwd, t0_u.int_num, t0_u.description, t0_u.creation_date FROM
DC_USERS t0_u WHERE t0_u.username IN(?, ?, ?) ORDER BY t0_u.name ASC

(2)
Executing SQL: SELECT username, name, surname, passwd, int_num,
description, creation_date FROM DC_USERS WHERE (username=?) OR
(username=?) OR (username=?) FOR UPDATE
//

jbosscmp-jdbc excerpt with on-find strategy. I have also tried with
on-load with different page-size values, always with the result
above (including for page-size=1).
 query
query-method
   method-namefindAllIn/method-name
   method-params
  method-paramjava.lang.String/method-param
  method-paramjava.lang.Object[]/method-param
   /method-params
/query-method
dynamic-ql/

read-ahead
strategyon-find/strategy
/read-ahead
/query



---
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Does CMR Collections have to be accessed (iterated) inside a transaction?

2002-11-05 Thread Victor Batista
Hello!
I am developing two entity beans which have a relatinship 1-N (One User can
have Many Roles).
I have also a Facade session bean to handle the business operations. I have
declared the Transaction property of my beans (Entity and session) as
Supports. The methods which insert or update data are declared as
Required. I don't want read-only operations to be executed inside
transactions.
I have one method (getUser) which returns a VO with the User data and calls
the relation method (getRoles() which returns a Collection of Roles). As
this is a read operation, I don't want a transaction to handle this method.
Although I am having one exception when I try to iterate the list of roles
returned by the getRoles method


java.lang.IllegalStateException: A CMR collection may only be used within
the transction in which it was created


Does CMR collections have to be accessed inside transactions?

Thanks in advance,
Victor Batista





---
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power  Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] org.firebirdsql.gds.GDSException: deadlock

2002-10-19 Thread Victor Batista
Hello!
  Can you please clarify a little more, please? Why does this happens
with Firebird? The sequences is just an example. I could have this
problem on any
other situation.
I can't understand why does the second Tx waits for the first Tx
to finish, and on firebird it gets the wrong value? Why isn't it getting
the right value like Oracle?

What's the meaning of the following property which is on my
firebird-service.xml?

TransactionIsolationName=TRANSACTION_REPEATABLE_READ

Any help would be appreciated!

Thanks in advance,
Victor Batista


On Fri, 18 Oct 2002, David Jencks wrote:

 I think you should be using a sequence on Oracle and a generator on
 Firebird.  I think you can write stored procedures on each to provide an
 identical interface.
 
 If you wish to keep using a table, in firebird you will need to set up a
 separate connection pool with serializable isolation to defeat the record
 versioning, or keep trying until you get a successful update.
 
 david jencks
 
 On 2002.10.18 15:14:33 -0400 Victor Batista wrote:
  Hello!
  I am using JBoss 3.0.2 with bundled tomcat 4.0.4.  I am also
  using the Firebird database with
  Firebird-jca-jdbc-driver RC1 (I also tried RC1a).
  I am having the following exception when I have two
  concurrent Transactions:
   
  19:13:47,351 ERROR [GlobalTxEntityMap] Store failed on entity: [.xpto.]
  javax.ejb.EJBException: Store failed; CausedByException is:
  GDS exception: org.firebirdsql.gds.GDSException: deadlock
  update conflicts with concurrent update
   
  I have a session bean which handles sequence values through
  an Entity Bean. The session bean starts one transaction each time the
  sequence must be incremented (this is done in one method of the session
  bean):
   
  sessionMethod
  start transaction
  query sequence value
  update sequence value with previous
  value + 1
  end transaction
   
   
  If I have two concurrent transactions to increment the same
  sequence, Firebird crashes with the exception above. I have tested this
  with Oracle and it works fine. I have accomplished my test inserting a
  sleep of several seconds (30) between the query and the update. 
  The second transaction blocks before the read, and only
  continues after the first one finishes. With Oracle, the second
  transaction reads the value stored by the previously transaction with
  firebird, it reads the same value as the previous transaction (Although
  it waits for the first to finish).
  For instance, if the value of one sequence is 10 and I start
  2 concurrent transactions to get the new value, I get the following:
   
  Oracle:
  Tx1 - gets 10, stores 11 and the session method returns 11
  Tx2 - waits for the first Tx to finish, gets 11, stores 12
  and the session method returns 12.
   
  Firebird:
  Tx1 - gets 10, stores 11 and the session method returns 11
  Tx2 - waits for the first Tx to finish, gets 10, tries to
  store 11, but crashes with the exception above.
   
  Can any one help me, please? Any help would be welcome.
   
  Thanks in advance,
  Victor Batista
  
  html xmlns:o=urn:schemas-microsoft-com:office:office
  xmlns:w=urn:schemas-microsoft-com:office:word
  xmlns:st1=urn:schemas-microsoft-com:office:smarttags
  xmlns=http://www.w3.org/TR/REC-html40;
  
  head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=us-ascii
  
  
  meta name=ProgId content=Word.Document
  meta name=Generator content=Microsoft Word 10
  meta name=Originator content=Microsoft Word 10
  link rel=File-List href=cid:filelist.xml;01C276E2.F8AF7510
  o:SmartTagType namespaceuri=urn:schemas-microsoft-com:office:smarttags
   name=time/
  !--[if gte mso 9]xml
   o:OfficeDocumentSettings
o:DoNotRelyOnCSS/
   /o:OfficeDocumentSettings
  /xml![endif]--!--[if gte mso 9]xml
   w:WordDocument
w:SpellingStateClean/w:SpellingState
w:GrammarStateClean/w:GrammarState
w:DocumentKindDocumentEmail/w:DocumentKind
w:EnvelopeVis/
w:Compatibility
 w:BreakWrappedTables/
 w:SnapToGridInCell/
 w:WrapTextWithPunct/
 w:UseAsianBreakRules/
/w:Compatibility
w:BrowserLevelMicrosoftInternetExplorer4/w:BrowserLevel
   /w:WordDocument
  /xml![endif]--!--[if !mso]
  style
  st1\:*{behavior:url(#default#ieooui) }
  /style
  ![endif]--
  style
  !--
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
  {mso-style-parent:;
  margin:0in;
  margin-bottom:.0001pt;
  mso-pagination:widow-orphan;
  font-size:12.0pt;
  font-family:Times New Roman;
  mso-fareast-font-family:Times New Roman;
  mso-ansi-language:PT;}
  a:link, span.MsoHyperlink
  {color:blue

[JBoss-user] org.firebirdsql.gds.GDSException: deadlock

2002-10-18 Thread Victor Batista








Hello!

 I am using JBoss 3.0.2 with bundled tomcat 4.0.4. I am also using the Firebird database
with

Firebird-jca-jdbc-driver RC1 (I also tried
RC1a).

 I
am having the following exception when I have two concurrent Transactions:



19:13:47,351 ERROR [GlobalTxEntityMap] Store failed
on entity: [.xpto.]

javax.ejb.EJBException: Store failed; CausedByException is:

 GDS
exception: org.firebirdsql.gds.GDSException: deadlock

update conflicts
with concurrent update



 I have a session bean which
handles sequence values through an Entity Bean. The session bean starts one
transaction each time the sequence must be incremented (this is done in one
method of the session bean):



 sessionMethod

 start transaction

  query sequence value

   update sequence value with previous value + 1

 end transaction





 If
I have two concurrent transactions to increment the same sequence, Firebird
crashes with the exception above. I have tested this with Oracle and it works
fine. I have accomplished my test inserting a sleep of several seconds (30)
between the query and the update. 

 The
second transaction blocks before the read, and only continues after the first
one finishes. With Oracle, the second transaction reads the value stored by the
previously transaction with firebird, it reads the same value as the previous
transaction (Although it waits for the first to finish).

 For
instance, if the value of one sequence is 10 and I start 2 concurrent
transactions to get the new value, I get the following:



 Oracle:

 Tx1
 gets 10, stores 11 and the session method returns 11

 Tx2
 waits for the first Tx
to finish, gets 11, stores 12 and the session method returns 12.



 Firebird:

 Tx1
 gets 10, stores 11 and the session method returns 11

 Tx2
 waits for the first Tx
to finish, gets 10, tries to store 11, but crashes with the exception above.



 Can
any one help me, please? Any help would be welcome.



 Thanks
in advance,

 Victor
Batista








RE: [JBoss-user] Firebird - Long mapping error

2002-10-02 Thread Victor Batista

Hello!
You are right. The problem is with Marathon!
Thanks for your reply/ help!

Regards,
Victor Batista

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of David
Jencks
Sent: terça-feira, 1 de Outubro de 2002 14:31
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Firebird - Long mapping error

This seems highly implausible.  Does your app work?  Can you check with
isql to see what the table structure actually is (by looking at
RDB$RELATION_FIELDS as I recall)?  I think a problem with Marathon is
more
likely than one with the jca driver or the Firebird engine...  In any
case
if there really is a problem the firebird lists will get you better
info.

david jencks


On 2002.10.01 09:06:36 -0400 Victor Batista wrote:
 
 Hi!
 
 The create table generated by JBoss is:
 
 13:57:12,283 DEBUG [FBManagedConnection] preparing sql: CREATE TABLE
 DC_USERS (username VARCHAR(30) NOT NULL, name VARCHAR(30), surname
 VARCHAR(30), passwd VARCHAR(30), phone VARCHAR(30), address
 VARCHAR(250), description VARCHAR(250), creation_date NUMERIC(18,0)
NOT
 NULL, CONSTRAINT PK_DC_USERS PRIMARY KEY (username))
 
 The Numeric(18,0) is being converted to the previous datatype
 (Description Iin this case). With description-VARCHAR(250), I get
 creation_data-VARCHAR(250). I changed description to VARCHAR(150) and
I
 got creation_date VARCHAR(150).
 
 
 Thanks again,
   Victor Batista
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] On Behalf Of David
 Jencks
 Sent: terça-feira, 1 de Outubro de 2002 13:14
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Firebird - Long mapping error
 
 This is certainly not what I expect.  What is the create table sql
 generated by jboss?
 
 david jencks
 
 
 On 2002.10.01 07:22:29 -0400 Victor Batista wrote:
  Hi!
  I have changed the database dialect from 1 to 3!
  Now I correctly create the tables, although, my longs are
  converter to VARCHAR(250) - When I consult the database with the
  Marathon client.
  
  My long mapping is:
  
   mapping
  java-typejava.lang.Long/java-type
  jdbc-typeBIGINT/jdbc-type
  sql-typeNUMERIC(18,0)/sql-type
   /mapping
  
  Is this the expected behaviour?
  
  Thanks again,
  Victor Batista
  
  -Original Message-
  From: David Jencks [mailto:[EMAIL PROTECTED]] 
  Sent: sexta-feira, 27 de Setembro de 2002 21:12
  To: Victor Batista
  Subject: Re: [JBoss-user] Firebird - Long mapping error
  
  I don't remember if you can change the dialect of an existing db.
 Using
  the FirebirdManager mbean you can create a new dialect 3 db.  You
can
  also
  do this with isql, but I don't remember the syntax.  Ask on the
 firebird
  lists or look at the docs.
  
  david jencks
  
  On 2002.09.27 06:11:39 -0400 Victor Batista wrote:
   Hello!
 Thanks for your reply!
 I am a newbie with Firebird. How can I change the dialect
 from
   1! To 3. 
 Thanks and regards,
 Victor Batista
   
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]] On Behalf Of David
   Jencks
   Sent: quinta-feira, 26 de Setembro de 2002 16:51
   To: [EMAIL PROTECTED]
   Subject: Re: [JBoss-user] Firebird - Long mapping error
   
   The best way is to use a dialect 3 database and the supplied
 mapping. 
   Double precision is a really unsatisfactory way to represent a
large
   integer, I suggest if you need to use a dialect 1 db you not use
 Long.
   
   david jencks
   
   On 2002.09.26 11:07:14 -0400 Victor Batista wrote:
Hello!
I am using tomcat 3.0.0 with bundled tomcat 4.0.3. I
 am
using the database Firebird (Firebird-1.0.0.796) with the driver
FirebirdSQL-1.0_RC1. I am using the InterBase
mapping
   which
is defined standardjbosscmp-jdbc.xml file. I am having
problems 
when I use long fields within my CMP entity beans.
According to standardjbosscmp-jdbc.xml, the long mapping is:
 mapping
   
java-typejava.lang.Long/java-type
jdbc-typeBIGINT/jdbc-type
sql-typeNUMERIC(18,0)/sql-type
 /mapping
 
The exception is:   
org.jboss.deployment.DeploymentException: Error
while
creating table; - nested throwable: 
(org.firebirdsql.jdbc.FBSQLException: GDS Exception:
org.firebirdsql.gds.GDSException: 
Dynamic SQL ErrorSQL error code = -817
Metadata update statement is not allowed by the
 current
database SQL dialect 1 null 
 
I have changed NUMERIC(18,0) by DOUBLE
PRECISION.
 I
   have
done this, because I tried to create one table from the
Marathon client with one column NUMERIC(18,0 and
 on
   the
DB I had the type Double

RE: [JBoss-user] Firebird - Long mapping error

2002-10-01 Thread Victor Batista

Hi!
I have changed the database dialect from 1 to 3!
Now I correctly create the tables, although, my longs are
converter to VARCHAR(250) - When I consult the database with the
Marathon client.

My long mapping is:

 mapping
java-typejava.lang.Long/java-type
jdbc-typeBIGINT/jdbc-type
sql-typeNUMERIC(18,0)/sql-type
 /mapping

Is this the expected behaviour?

Thanks again,
Victor Batista

-Original Message-
From: David Jencks [mailto:[EMAIL PROTECTED]] 
Sent: sexta-feira, 27 de Setembro de 2002 21:12
To: Victor Batista
Subject: Re: [JBoss-user] Firebird - Long mapping error

I don't remember if you can change the dialect of an existing db.  Using
the FirebirdManager mbean you can create a new dialect 3 db.  You can
also
do this with isql, but I don't remember the syntax.  Ask on the firebird
lists or look at the docs.

david jencks

On 2002.09.27 06:11:39 -0400 Victor Batista wrote:
 Hello!
   Thanks for your reply!
   I am a newbie with Firebird. How can I change the dialect from
 1! To 3. 
   Thanks and regards,
   Victor Batista
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] On Behalf Of David
 Jencks
 Sent: quinta-feira, 26 de Setembro de 2002 16:51
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Firebird - Long mapping error
 
 The best way is to use a dialect 3 database and the supplied mapping. 
 Double precision is a really unsatisfactory way to represent a large
 integer, I suggest if you need to use a dialect 1 db you not use Long.
 
 david jencks
 
 On 2002.09.26 11:07:14 -0400 Victor Batista wrote:
  Hello!
  I am using tomcat 3.0.0 with bundled tomcat 4.0.3. I am
  using the database Firebird (Firebird-1.0.0.796) with the driver
  FirebirdSQL-1.0_RC1. I am using the InterBase mapping
 which
  is defined standardjbosscmp-jdbc.xml file. I am having problems 
  when I use long fields within my CMP entity beans.
  According to standardjbosscmp-jdbc.xml, the long mapping is:
   mapping
  java-typejava.lang.Long/java-type
  jdbc-typeBIGINT/jdbc-type
  sql-typeNUMERIC(18,0)/sql-type
   /mapping
   
  The exception is:   
  org.jboss.deployment.DeploymentException: Error while
  creating table; - nested throwable: 
  (org.firebirdsql.jdbc.FBSQLException: GDS Exception:
  org.firebirdsql.gds.GDSException: 
  Dynamic SQL ErrorSQL error code = -817
  Metadata update statement is not allowed by the current
  database SQL dialect 1 null 
   
  I have changed NUMERIC(18,0) by DOUBLE PRECISION. I
 have
  done this, because I tried to create one table from the
  Marathon client with one column NUMERIC(18,0 and on
 the
  DB I had the type Double Precision for that column.
   
  My new mapping:
   mapping
  java-typejava.lang.Long/java-type
  jdbc-typeBIGINT/jdbc-type
  sql-typeDOUBLE PRECISION/sql-type
   /mapping
   
  
  Can anyone tell me which is the best way to map Longs
with
  Firebird?
   
   
  Thanks in advance,
  Victor Batista
  
  html xmlns:o=urn:schemas-microsoft-com:office:office
  xmlns:w=urn:schemas-microsoft-com:office:word
  xmlns=http://www.w3.org/TR/REC-html40;
  
  head
  META HTTP-EQUIV=Content-Type CONTENT=text/html;
charset=us-ascii
  
  
  meta name=ProgId content=Word.Document
  meta name=Generator content=Microsoft Word 10
  meta name=Originator content=Microsoft Word 10
  link rel=File-List href=cid:[EMAIL PROTECTED];
  !--[if gte mso 9]xml
   o:OfficeDocumentSettings
o:DoNotRelyOnCSS/
   /o:OfficeDocumentSettings
  /xml![endif]--!--[if gte mso 9]xml
   w:WordDocument
w:SpellingStateClean/w:SpellingState
w:GrammarStateClean/w:GrammarState
w:DocumentKindDocumentEmail/w:DocumentKind
w:EnvelopeVis/
w:Compatibility
 w:BreakWrappedTables/
 w:SnapToGridInCell/
 w:WrapTextWithPunct/
 w:UseAsianBreakRules/
/w:Compatibility
w:BrowserLevelMicrosoftInternetExplorer4/w:BrowserLevel
   /w:WordDocument
  /xml![endif]--
  style
  !--
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
  {mso-style-parent:;
  margin:0in;
  margin-bottom:.0001pt;
  mso-pagination:widow-orphan;
  font-size:12.0pt;
  font-family:Times New Roman;
  mso-fareast-font-family:Times New Roman;
  mso-ansi-language:PT;}
  a:link, span.MsoHyperlink
  {color:blue;
  text-decoration:underline;
  text-underline:single;}
  a:visited, span.MsoHyperlinkFollowed
  {color:purple;
  text

RE: [JBoss-user] Firebird - Long mapping error

2002-10-01 Thread Victor Batista


Hi!

The create table generated by JBoss is:

13:57:12,283 DEBUG [FBManagedConnection] preparing sql: CREATE TABLE
DC_USERS (username VARCHAR(30) NOT NULL, name VARCHAR(30), surname
VARCHAR(30), passwd VARCHAR(30), phone VARCHAR(30), address
VARCHAR(250), description VARCHAR(250), creation_date NUMERIC(18,0) NOT
NULL, CONSTRAINT PK_DC_USERS PRIMARY KEY (username))

The Numeric(18,0) is being converted to the previous datatype
(Description Iin this case). With description-VARCHAR(250), I get
creation_data-VARCHAR(250). I changed description to VARCHAR(150) and I
got creation_date VARCHAR(150).


Thanks again,
Victor Batista

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of David
Jencks
Sent: terça-feira, 1 de Outubro de 2002 13:14
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Firebird - Long mapping error

This is certainly not what I expect.  What is the create table sql
generated by jboss?

david jencks


On 2002.10.01 07:22:29 -0400 Victor Batista wrote:
 Hi!
   I have changed the database dialect from 1 to 3!
   Now I correctly create the tables, although, my longs are
 converter to VARCHAR(250) - When I consult the database with the
 Marathon client.
 
   My long mapping is:
   
  mapping
 java-typejava.lang.Long/java-type
 jdbc-typeBIGINT/jdbc-type
 sql-typeNUMERIC(18,0)/sql-type
  /mapping
 
   Is this the expected behaviour?
 
   Thanks again,
   Victor Batista
 
 -Original Message-
 From: David Jencks [mailto:[EMAIL PROTECTED]] 
 Sent: sexta-feira, 27 de Setembro de 2002 21:12
 To: Victor Batista
 Subject: Re: [JBoss-user] Firebird - Long mapping error
 
 I don't remember if you can change the dialect of an existing db.
Using
 the FirebirdManager mbean you can create a new dialect 3 db.  You can
 also
 do this with isql, but I don't remember the syntax.  Ask on the
firebird
 lists or look at the docs.
 
 david jencks
 
 On 2002.09.27 06:11:39 -0400 Victor Batista wrote:
  Hello!
  Thanks for your reply!
  I am a newbie with Firebird. How can I change the dialect from
  1! To 3. 
  Thanks and regards,
  Victor Batista
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]] On Behalf Of David
  Jencks
  Sent: quinta-feira, 26 de Setembro de 2002 16:51
  To: [EMAIL PROTECTED]
  Subject: Re: [JBoss-user] Firebird - Long mapping error
  
  The best way is to use a dialect 3 database and the supplied
mapping. 
  Double precision is a really unsatisfactory way to represent a large
  integer, I suggest if you need to use a dialect 1 db you not use
Long.
  
  david jencks
  
  On 2002.09.26 11:07:14 -0400 Victor Batista wrote:
   Hello!
   I am using tomcat 3.0.0 with bundled tomcat 4.0.3. I
am
   using the database Firebird (Firebird-1.0.0.796) with the driver
   FirebirdSQL-1.0_RC1. I am using the InterBase mapping
  which
   is defined standardjbosscmp-jdbc.xml file. I am having problems 
   when I use long fields within my CMP entity beans.
   According to standardjbosscmp-jdbc.xml, the long mapping is:
mapping
   java-typejava.lang.Long/java-type
   jdbc-typeBIGINT/jdbc-type
   sql-typeNUMERIC(18,0)/sql-type
/mapping

   The exception is:   
   org.jboss.deployment.DeploymentException: Error while
   creating table; - nested throwable: 
   (org.firebirdsql.jdbc.FBSQLException: GDS Exception:
   org.firebirdsql.gds.GDSException: 
   Dynamic SQL ErrorSQL error code = -817
   Metadata update statement is not allowed by the
current
   database SQL dialect 1 null 

   I have changed NUMERIC(18,0) by DOUBLE PRECISION.
I
  have
   done this, because I tried to create one table from the
   Marathon client with one column NUMERIC(18,0 and
on
  the
   DB I had the type Double Precision for that column.

   My new mapping:
mapping
   java-typejava.lang.Long/java-type
   jdbc-typeBIGINT/jdbc-type
   sql-typeDOUBLE PRECISION/sql-type
/mapping

   
   Can anyone tell me which is the best way to map Longs
 with
   Firebird?


   Thanks in advance,
   Victor Batista
   
   html xmlns:o=urn:schemas-microsoft-com:office:office
   xmlns:w=urn:schemas-microsoft-com:office:word
   xmlns=http://www.w3.org/TR/REC-html40;
   
   head
   META HTTP-EQUIV=Content-Type CONTENT=text/html;
 charset=us-ascii
   
   
   meta name=ProgId content=Word.Document
   meta name=Generator content=Microsoft Word 10
   meta name=Originator content

[JBoss-user] DatabaseServerLoginModule problem

2002-09-28 Thread Victor Batista








Hello!

I am having problems validating users with DatabaseServerLoginModule. I am trying to validate users
with 

MySQL and Firebird, but with no success in both of them. I am
using Jboss 3.0.0 with bundled Tomcat 4.0.3. 

When I use UsersRolesLoginModule,
I can do the Login correctly.



I have one ConfiguredIdentityLoginModule
for each database. My CMP tables are correctly created.



When I try lo Login using DatabaseServerLoginModule I always get redirected to
the error page,

without any log message on the server. My login-config.xml
has the following Policies:



 application-policy
name=MyFirebirdDBRealm

 authentication

 login-module
code=org.jboss.resource.security.auth.spi.DatabaseServerLoginModule
flag=required

 module-option
name=dsJndiNamejava:/FirebirdDS/module-option

 module-option
name=principalsQuerySELECT passorwd FROM USERS WHERE USERNAME=?/module-option

 module-option
name=rolesQuerySELECT roles, 'Roles'
FROM USERROLES WHERE USERNAME=?/module-option

 /login-module

 /authentication

 /application-policy





 application-policy
name=MyMysql

 authentication

 login-module
code=org.jboss.resource.security.auth.spi.DatabaseServerLoginModule
flag=required

 module-option
name=dsJndiNamejava:/MySqlDS/module-option

 module-option
name=principalsQuerySELECT password
FROM users WHERE username='?'/module-option

 module-option
name=rolesQuerySELECT roles, 'Roles'
FROM userroles WHERE
username='?'/module-option

 /login-module

 /authentication

 /application-policy



Can any one help me, please?



Are DatabaseServerLoginModule
and ConfiguredIdentityLoginModule indepenents?

Can I use ConfiguredIdentityLoginModule
to log into one database (ex:mysql)
and DatabaseServerLoginModule (Ex:Firebird) to validate my users?



Thanks in advance,

 Victor
Batista








[JBoss-user] Firebird - Long mapping error

2002-09-26 Thread Victor Batista








Hello!

 I
am using tomcat 3.0.0 with bundled tomcat 4.0.3. I am using the database
Firebird (Firebird-1.0.0.796) with the driver

 FirebirdSQL-1.0_RC1.
I am using the InterBase mapping which is defined
standardjbosscmp-jdbc.xml file. I am having problems 

 when
I use long fields within my CMP entity beans. According to
standardjbosscmp-jdbc.xml, the long mapping is:

 mapping

 
java-typejava.lang.Long/java-type

  jdbc-typeBIGINT/jdbc-type

  sql-typeNUMERIC(18,0)/sql-type

  /mapping



 The
exception is: 

 org.jboss.deployment.DeploymentException:
Error while creating table; - nested throwable: 

 (org.firebirdsql.jdbc.FBSQLException:
GDS Exception: org.firebirdsql.gds.GDSException: 

 Dynamic
SQL ErrorSQL error code = -817

 Metadata
update statement is not allowed by the current database SQL dialect 1 null 



 I
have changed NUMERIC(18,0) by DOUBLE PRECISION. I have
done this, because I tried to create one table from the

 Marathon
client with one column NUMERIC(18,0 and on the DB I had the type
Double Precision for that column.



 My
new mapping:

 mapping

  java-typejava.lang.Long/java-type

  jdbc-typeBIGINT/jdbc-type

  sql-typeDOUBLE
PRECISION/sql-type

 /mapping



 

 Can
anyone tell me which is the best way to map Longs with Firebird?





 Thanks in
advance,

 Victor Batista








[JBoss-user] CMP and relationships -

2002-09-24 Thread Victor Batista

Hello!
I am developing a J2EE application with JBoss 3.0.0. My application has
10-15 Entity beans. I am using CMP for all of them and I am also creating
all the relationships between them. Can any one tell me if this is the best
option, or can this be very hard-processing?
I would really appreciate to have your feedback with this issue.

Thanks in advance,
Victor Batista



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] M-N relationship error -xdoclet

2002-09-23 Thread Victor Batista


Hello!
I am having problems while creating a M-N relationship using xdoclet. I am
using jboss3.0.0 with bundled Tomcat 4.0.3. I am also using xdoclet 1.1.2.
Do i need to get the latest xdcolet from CVS?

I am getting the following exception for both roles:
org.jboss.deployment.DeploymentException: Both roles of a relation-table
mapped relationship must have key fields: ejb-relation-name=User-Role

My xdoclet tags are:

UserBean:
#
@ejb:relation   name=User-Role
role-name=User-Has-Many-Roles
@jboss:relation-table   table-name=xpto
@jboss:target-relation  related-pk-field=id
fk-column=roleid
#
where id is the name of the primary key on the Role bean and roleid is
the name of the column in the relation table (xpto).

RoleBean:
#
@ejb:relation   name=User-Role
role-name=Role-Has-Many-Users
@jboss:relation-table   table-name=xpto
create-table=true
remove-table=true
@jboss:target-relation  related-pk-field=id
fk-column=userid
#
where id is the name of the primary key on the User bean and userid is
the name of the column in the relation table (xpto).


I have tried with jboss:relation instead of jboss:target-relation but
with the same results.

Can any one help me, please?

Thank you in advance,
Victor Batista



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Entity beans relationship problems

2002-09-12 Thread Victor Batista

Hello!
  I am trying to establish a relationship between two entity beans.
Although, when I try to call any of the accessors, I get the following
exception:

16:24:46,744 ERROR [LogInterceptor] TransactionRolledbackException, causedBy:
java.lang.ClassCastException: enk.interfaces.PlaceData
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstance
alue(JDBCCMRFieldBridge.java:624)
at
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JD
CCMRFieldBridge.java:563)
at
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invok
(EntityBridgeInvocationHandler.java:125)
at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at enk.entity.PersonCMP$Proxy.setPlace(generated)


I am using JBoss 3.0.0 with bundled tomcat 4.0.3. I am using only local
interfaces to access the relation methods.
My beans are Person and Place. Each person belongs to one place, and each
place can have multiple Persons (1-N).

Person Bean:
/** 
*
* @ejb:relation name=Person-Place
*   role-name=Person-Has-One-Place
*   target-multiple=yes
* 
* @jboss:relation   related-pk-field=placeId
*   fk-column=pplaceid
* 
* @ejb:interface-method view-type=local
*   
**/
public abstract enk.interfaces.PlaceData getPlace();

/**
* @ejb:interface-method view-type=local
**/
public abstract void setPlace(enk.interfaces.PlaceData place);

Place Bean:
/** 
*
* @ejb:relation name=Person-Place
*   role-name=Place-Has-Many-Addresses
* @ejb:interface-method view-type=local
*   
**/
public abstract java.util.Set getPersons();

/**
* @ejb:interface-method view-type=local
* 
**/
public abstract void setPersons(java.util.Set persons);




I create persons from a Session Bean through the local interface of the
Person bean:
/**
 * insertPerson method.
 * 
 * @return an int value.
 * 
 * @ejb:interface-method view-type=local
 * 
 */
public int insertPerson(String person, int placeId)
//  throws RemoteException
{
int ret = 0;
try {   
PlaceData place = getPlace(placeId); //Returns the correct PlaceData object
PersonData lData = null;
Context lContext = new InitialContext();
   
PersonLocalHome lHome = (PersonLocalHome)
lContext.lookup(ejb/test/PersonLocal);

lData = new PersonData();
lData.setName(person);
PersonLocal lEntity = lHome.create( lData, place );


PersonPK pk = (PersonPK) lEntity.getPrimaryKey();
ret = pk.getId();   
} catch ( Exception e ) {
  e.printStackTrace();
}   
return ret;
}

The ejbCreate of the Person Bean is as follows:
public PersonPK ejbCreate(PersonData key, PlaceData place)
  throws
 InvalidValueException,
 EJBException,
 CreateException
{   
setId(count++);
setName(key.getName());
setPlace(place);
return null;
}

First of all, I create a few places.
When I try to create the one person, I get the exception above.

I would appreciate any help. I am getting crazy .


Thanks in advance,
Victor Batista
--
Victor Nelson Marques Batista
Present Technologies, Lda.


http://www.present-technologies.com

Praceta Alberto de Oliveira, 18 - 1º
3000 - 015 Coimbra Portugal
Phone (+351) 239 781834
Fax (+351) 239 781835


mailto:[EMAIL PROTECTED]
-- 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] method-permission +xdoclet

2002-09-08 Thread Victor Batista

Hello!
I am using jboss-3.0.0 with bundled Tomcat 4.0.3. I am also using
Xdoclets.
I have a Java servlet which is a client to an EJB. I have configured
Security, but I am having some problems with the communication between the
servlet and the EJB. My servlet asks for username/password and validates
it. Calling 
request.getUserPrincipal() I get the right answer.

Whhen the servlet tries to access the EJB, I get the following error:
15:10:22,922 ERROR [SecurityInterceptor] No method permissions assigned to
method=create
15:10:22,932 ERROR [STDERR]
java.rmi.ServerException: checkSecurityAssociation;
nested exception is:
java.lang.SecurityException: No method permissions assigned to
method=create;


My jboss-security.xml is the following:

security-domainjava:/jaas/MyTEST/security-domain
assembly-descriptor
security-role
role-nameManager/role-name
/security-role

method-permission
unchecked/
method
ejb-nametest/MyTestSession/ejb-name
method-namecreate/method-name
/method
/method-permission

method-permission
role-nameManager/role-name
method
ejb-nametest/MyTestSession/ejb-name
method-name*/method-name
/method
/method-permission 
/assembly-descriptor


The file is in the right place (directory), because I get the
security-domain working.
Isn't this file the right one to include method-permission declarations?

Can any one help me, please.

Thank you in advance,
Victor Batista 



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] eclipse with xdoclet and jboss

2002-08-30 Thread Victor Batista

Hello!
 I had the same problem. I solved it adding the following line to my
ant.properties file:
  ant.home=ANT INSTALL DIR

 I have the ANT_HOME environment variable set, but eclipse isn't able to
catch it.

 Now it is working fine.

 Regards,
  Victor Batista

At 14:45 8/30/2002 +0100, you wrote: 

Bruce,

I think this is quite common problem. Try sticking your JDK's tools.jar into the list of ant libraries. Go to Preferences/External Tools/Ant and add it there. 

Personally, I think Eclipse is wonderful. However, I've never learnt EMACS in any of its forms.
Ciao,
Jonathan O'Connor
Ph: +353 1 872 3305
Mob: +353 86 824 9736
Fax: +353 1 873 3612 


Bruce Scharlau [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED] 

30.08.2002 12:07 
Please respond to jboss-user 
        
        To:        [EMAIL PROTECTED] 
        cc:         
        Subject:        [JBoss-user] eclipse with xdoclet and jboss 


Hi all,

I'm trying out eclipse (instead of xemacs) for doing projects with JBoss, 
but have encountered a problem.

The Jboss3.0 Example with the template compiles, and builds fine in xemacs 
with the xdoclets, but doesn't do so in eclipse.

The stacktrace shows:
javadoc: In doclet class xdoclet.DocletTask$DocletMain,  method start has 
thrown an exception
java.lang.reflect.InvocationTargetException
java.lang.NoClassDefFoundError: org/apache/tools/ant/types/EnumeratedAttribute

When I check the ant.jar, EnumeratedAttribute is there, and ant of course 
starts fine, so what's the problem?

Any clues greatly appreciated.


cheers,

Bruce

Dr. Bruce Scharlau
Dept. of Computing Science
University of Aberdeen
Aberdeen AB24 3UE
01224 272193
http://www.csd.abdn.ac.uk/~bscharla
mailto:[EMAIL PROTECTED]



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




--
Victor Nelson Marques Batista
Present Technologies, Lda.


http://www.present-technologies.com

Praceta Alberto de Oliveira, 18 - 1º
3000 - 015 Coimbra Portugal
Phone (+351) 239 781834
Fax (+351) 239 781835


mailto:[EMAIL PROTECTED]
-- 



---
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1=vs3390
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user