[jboss-user] [JBoss Seam] - Re: How to not propagate conversations??

2008-01-19 Thread sztank
Hello,
I had the similiar situation and will be very interested in finding the right 
solution. Actually I stop using conversations due to the fact that it will be 
hard to me to understand well how they should be used in the situations like 
this. Although I like the concept!


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121488#4121488

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121488
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: relative vs absolute urls (problem with proxy)

2008-01-18 Thread sztank
Ok, I managed to solve this problem. It was possible to configure Apache 
reverse proxy to translate jboss http headers (302 redirect). So now the JSF 
navigation works ok behind the proxy.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121205#4121205

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121205
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: relative vs absolute urls (problem with proxy)

2008-01-16 Thread sztank
Hi,
I still have this problem:(.. I found this article:

[url]
http://javanotepad.blogspot.com/2007/04/problem-sometimes-application-servers.html
[/url]

but that is about problem with links. I do not have any problem with links, 
just with form submit. 

Please could someone give me some help... 
I put much effort and time to know Seam but know I stack with this problem.




View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120588#4120588

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120588
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: relative vs absolute urls (problem with proxy)

2008-01-07 Thread sztank
Thanks for the tip!
Access through the proxy like that it is a common scenario  maybe there is some 
example available of such config or some resources that could helps?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117451#4117451

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117451
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - relative vs absolute urls (problem with proxy)

2008-01-05 Thread sztank
Hi,
I trying to deploy jboss seam application in the following configuration:

Apache as a front server and jboss as as my application server. The users 
connects to the server through the VPN or SSH tunnels. The apache sever work as 
a proxy. 

(user request) https://foo/bar -> apache proxy -> (jboss) 127.0.0.1:8080/bar

In pages.xml I'm using redirection like this:

 





I have the following problems with urls:

Problematic scenario:

1. User started the application using url https://foo/bar/page1

2.User click the action button (h:comandButton) 

3. The form is submited

4. User gets a WRONG url in the responce: http://127.0.0.1:8080/bar/page2

So it looks that jboss used absolute url. Is it possible to enforce using the 
relative url in the above scenario?

In places when the a4j:commandButton is used there is no problem like that. 
Currently a replace all commandButtons with a4j:buttons and redirect  to the 
proper page in pages.xml but It is awkward.

My jboss administrator is saing that this is jboss/releative/absolute url's 
configuration issue.

It is my first development using Jboss Seam. I would be very grateful for some 
advice. 

(I using seam 2.0.0.GA) 
Best regards!

Stoigniew Sztank






View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117309#4117309

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117309
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate outer/inner join problem

2007-11-15 Thread sztank
This was a question to ask on Hibernate specific forum but I miss this forum. 
I've found the answer there so it should be: 

  | crit.createAlias("product", "prod", Criteria.LEFT_JOIN);
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105217#4105217

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105217
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Hibernate outer/inner join problem

2007-11-15 Thread sztank
I found the old topic that says it is not possible to have an outer join with 
createAlias. Is it still this same?

http://forum.hibernate.org/viewtopic.php?t=934119 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104893#4104893

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104893
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Hibernate outer/inner join problem

2007-11-14 Thread sztank
Hello,
I trying to use Criteria to build some conditional query and I could not manage 
to set it up well.

The query is:

  | Criteria crit = session.createCriteria(Contract.class);
  |   crit.setFetchMode("product", FetchMode.JOIN);
  |   crit.createAlias("status", "stat");
  |   crit.createAlias("client", "cli");
  |   crit.createAlias("product", "prod");
  |   
  |   for(int i=0; i < searchArray.length ; i++) {
  |   crit.add( Restrictions.disjunction()
  |   .add( Restrictions.ilike("comment", searchArray, 
MatchMode.ANYWHERE))
  |   .add( Restrictions.ilike("clientContractId", searchArray, 
MatchMode.ANYWHERE))
  |   .add( Restrictions.ilike("cli.name", searchArray, 
MatchMode.ANYWHERE))
  |   
  |   );  
  |   }
  | 
  | crit.addOrder( Order.asc("contractId"));
  |   crit.addOrder( Order.asc("contractItem"));
  |   
  |   contracts = crit.list();
  | 

product is defined in the Contract entity as follows:

  | @ManyToOne
  |@JoinColumn(name="product")
  |public Product getProduct()
  |{
  |   return product;
  |}
  | 

and it can be a null value. 

The Sql is as follows:

  | select
  | this_.contract as contract132_3_,
  | this_.client as client132_3_,
  | this_.client_contract_id as client2_132_3_,
  | this_.comment as comment132_3_,
  | this_.contract_id as contract4_132_3_,
  | this_.contract_item as contract5_132_3_,
  | this_.date_client as date6_132_3_,
  | this_.date_closed as date7_132_3_,
  | this_.date_irga as date8_132_3_,
  | this_.date_opened as date9_132_3_,
  | this_.price as price132_3_,
  | this_.product as product132_3_,
  | this_.quantity as quantity132_3_,
  | this_.quantity_closed as quantity12_132_3_,
  | this_.source_contract as source13_132_3_,
  | this_.status as status132_3_,
  | this_.status_assembly as status14_132_3_,
  | this_.status_pcb as status15_132_3_,
  | this_.status_print as status16_132_3_,
  | this_.wz as wz132_3_,
  | cli2_.client as client134_0_,
  | cli2_.name as name134_0_,
  | prod3_.product as product143_1_,
  | prod3_.casual_name as casual2_143_1_,
  | prod3_.client as client143_1_,
  | prod3_.close_date as close3_143_1_,
  | prod3_.code_name as code4_143_1_,
  | prod3_.comments as comments143_1_,
  | prod3_.creator as creator143_1_,
  | prod3_.group_name as group7_143_1_,
  | prod3_.start_date as start8_143_1_,
  | stat1_.status as status133_2_,
  | stat1_.name as name133_2_ 
  | from
  | public.contract this_ 
  | inner join
  | public.client cli2_ 
  | on this_.client=cli2_.client 
  | inner join
  | public.product prod3_ 
  | on this_.product=prod3_.product 
  | inner join
  | public.contractstatus stat1_ 
  | on this_.status=stat1_.status 
  | where
  | (
  | this_.comment ilike ? 
  | or this_.client_contract_id ilike ? 
  | or cli2_.name ilike ?
  | ) 
  | order by
  | this_.contract_id asc,
  | this_.contract_item asc
  | 

 Now the select don't get the results with product set to null value.I can't 
manage to set Criteria to use outer join with product. I tried to put the 
setFetchMode("product", FetchMode.JOIN); in few places but it doesn't change 
anything in result sql. If someone could give me some light on it i would be 
gratefully!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104784#4104784

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104784
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:selectItems, entity-query, convertEntity stop working

2007-11-12 Thread sztank
Thanks! 
That was the reason. I do not have equals method. Now it is working.
BTW in my equals method i will have to check if obj is not null otherwise I 
have NullPointerException - don't understand why..

  | public boolean equals(Object obj) {
  | if(obj != null) {
  |return (this.client == ((Client)obj).getClient());
  | }
  | else return false;
  | }
  | 
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103912#4103912

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103912
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - s:selectItems, entity-query, convertEntity stop working

2007-11-08 Thread sztank
Hello,
When I migrate from seam 1.2 to 2.0 the following code stops to work properly:

View:
 
  | ..
  | 
  |  Client:
  | 
  | 
  | 
  |  
  | 
  | ..
  | 

where "clients" is the entity-query defined in components.xml file:

  | 
  | 

"contract" is the entity bean. 
That work perfectly in seam 1.2. In seam 2.0 it behaves this way:
When the view is rendered the selectOneMenu is always set to "Not defined" even 
when the contract.client field is set. So for example when I filled the form 
and select some "client" from  selectOneMenu and then post the form the proper 
value is set to contract.client field. I persist the contract entity to the 
database. Now when the enother (edit) form is displayed with the 
contract.client set the label is "Not defined"

I have read some posts that deal with s:selectItems migration problems but 
still can't solve the problem.
Thanks in advance for any help.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103081#4103081

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103081
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JCA/JBoss] - Re: Passing current user identity to the back-end database

2007-07-13 Thread sztank
Ok. Thanks a lot!

"[EMAIL PROTECTED]" wrote : 
  | The Seam policy is for the question "how do I know the user/password typed 
in
  | by the user is correct?". Your answer such be a real validation mechanism
  | NOT "use what is already established on thread" which is most likely 
nothing. :-)
  | 
  | This real policy will establish the subject on the thread. 
  | 
By the way, I was hoping that the following declaration in the Seam 
components.xml file ensure real validation mechanism and also will tell the 
Seam to set the login subject on the thread :


  | 
  | 

But I will try to explore this from the SEAM SIDE. 

Best Regards!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063857#4063857

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063857
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JCA/JBoss] - Re: Passing current user identity to the back-end database

2007-07-12 Thread sztank
I catch the policy question-answer thing, thanks:-) Good to hear that I'm step 
further. 

"[EMAIL PROTECTED]" wrote : 
  | You don't have a default user/password for such contexts.. 
  | 
Where can I set default user/password that can be used during deployment? In 
the datasource file:

  | 
  |
  |   dbtestDatasource
  |   jdbc:postgresql:dbtest
  |   org.postgresql.Driver
  |   testdbRealm
  |   deployment_usr
  |   deployment_pwd
  |
  | 
  | 

What about the name/password from the application-policy it can't be used in 
the deployment context?

  | 
  | 
  |   
  |   dumy
  |   dumy_pwd
  |  jboss.jca:service=LocalTxCM,name=dbtestDatasource
  |   
  |
  | 
  | 

 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063737#4063737

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063737
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JCA/JBoss] - Passing current user identity to the back-end database

2007-07-12 Thread sztank
Hi,

I'm developing an application with the following requirement:

All users have a database accounts and the application level authorization 
should be used also with the database. So I need to pass through the current 
user identity to the back-end database. 

I'm using Jboss as 4.0.5 and Jboss Seam 1.2.1. The project I start with is 
generated with seam-gen utility. I get some directions  on the Seam forum that 
this should be possible with proper configuration of the JCA datasource.

According to the informations I founded on wiki and docs I trying to use 
CallerIdentityLoginModule in the following way:

I added policy to the login-config.xml file

  | 
  | 
  |   
  |   dumy
  |   dumy_pwd
  |  jboss.jca:service=LocalTxCM,name=dbtestDatasource
  |   
  |
  | 
  | 

datasource config file dbtest-ds.xml:

  | 
  |
  |   dbtestDatasource
  |   jdbc:postgresql:dbtest
  |   org.postgresql.Driver
  |   testdbRealm
  |
  | 
  | 

web.xml file:

  | 
  |   Restrict raw XHTML Documents
  |   
  |XHTML
  |*.xhtml
  |GET
  |POST
  |   
  |   
  |admin
  |   
  |  
  |  
  |   BASIC
  |   testdbRealm
  |  
  |  
  |   admin
  |  
  | 

And according to the Seam doc I set the jaas-config-name property in the 
components.xml file:

  | 
  | 


Now I have the following behavior:
The application deploys and works, the *.xhtml pages are displayed but 
application is not asking for authorization. The database connection is set 
with the default user and pwd provided in the login-config.xml file (dumy, 
dumy_pwd). 

When I try to remove the default user and pwd from the login-config.xml file:

  | 
  | 
  |   
  |  jboss.jca:service=LocalTxCM,name=dbtestDatasource
  |   
  |
  | 
  | 

then I have errors during deployment because the database connection can't be 
created (I'm not sure why - think that hibernate try to open the database 
during the deployment to do its mapping job). I see in server logs that 
CallerIdentityLoginModule is used. 

I stick on this problem and don't know how finish seting up things to enforce 
the behavior I write about on the beginning. Do I have to call 
CallerIdentityLoginModule directly from my application? 

I'm trying to resolve this issue for quite a long time. I'm not the JBoss and 
J2EE specialist (yet) (I'm the one who believed that building application's 
with JBoss + Seam combo is simple and trying to follow) so I appreciate any 
help and explanations how this mechanism works very much.

Best Regards


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063654#4063654

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063654
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Authentication using database accounts

2007-05-25 Thread sztank
Thanks for the directions. I will try with the JBoss JCA then.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048609#4048609

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048609
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Authentication using database accounts

2007-05-24 Thread sztank
Hello,

I'm trying to use Seam to build the application with the following requirement:

PostgreSQL database with a set of defined user accounts (username, password and 
some privileges granted).  The application has to use this accounts to 
authenticate application users. 

For example:
Database has a user "Tom" defined (name, password, privileges ).
When "Tom" login to the application the application should reconnect to the 
database with username and and password that "Tom" entered.

I wrote that application should reconect but I'm not sure when the Seam 
application actually connect to the database. I reckon that when it is deployed 
(is that right?). 

Is it possible to implement this scenario with Seam?

This requirement is set by my customer. The reason why to do it that way is to 
utilize the database build-in users activity reporting. Do you think it is good 
reason?

ps.
I'm new to Seam and hibarnate.


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048519#4048519

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048519
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user