[JBossWS] - Using custom principal class with JBossWS
by ejb3workshop
I would like to use my own Principal class with my own LoginModule. I configured the LoginModule in login-config.xml and annotated by SLSB as follows :
| @Stateless(name="JobAPIWeb")
| @WebService(name="JobAPIWeb", portName="...Port", serviceName="JobAPIWebService", targetNamespace="...")
| @EndpointConfig(configName = "Standard WSSecurity Endpoint")
| @SecurityDomain(value="THZone")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
| public class JobAPIWeb implements JobAPIWebRemote {
| ...
|
Authentication takes place, however when I try to access the principal via
| m_sessionContext.getCallerPrincipal().getClass().getName()
|
it presents me with a org.jboss.ws.extensions.security.SimplePrincipal, rather then my own class returned in the LoginModules commit method.
My search so far led me to ReceiveUsernameOperation in which the UserNameToken is converted to a SimplePrincipal.
http://fisheye.jboss.com/browse/JBossWS/trunk/jbossws-core/src/main/java/...
Are there any configuration options which would allow me to access the principal object as it is returned by my LoginModule.
Thanks in advance.
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133910#4133910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133910
18 years, 1 month
[Beginners Corner] - Re: deploying problem ( customized directory structure )
by sajhak
Hi Peter,
Yes , i did read the above article but unfortunately that didnlt solve my problem .. let me explain my problem again ..
I am deploying j2EE archives into the JBOSS server using IntelliJ IDEA 7.0 , where it has inbuilt support for JBOSS integration.. when i deploy the archives , those are not goes to the "default/deploy" directory , instead it goes to the "default/tmp/deploy" directory ...
I want to deploy those into the "default/deploy" directly.. I can do it manually , by just copying the files to the server directly.But i think there should be a way to do it directly from the IDE ..
I tried those deployments using NetBeans 6.0 , there i didnt have to face any problems , then relevant archives deployed into the "default/deploy" directory ....
so what is the reason behind this could be ?? is that a bug with IntelliJ IDEA or do i have to configure the JBOSS server ???
plese help me .. im so desperate ... :(
Thanks n Regds
Sajith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133897#4133897
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133897
18 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - @Length not working on embedded component
by mars1412
When I use @Length annotation on the fields of my entity, the column in the table is created with the expected length (see email field in the example below)
But in embedded components, it seems that the @Length annotation is ignored (when creating the table) and the column in the table is always 255 characters long.
If I also add the @Column(lenght=xx) annotation on the embedded string, it works as expected.
* why is this different behavior?
| * what can I do about it?
| * or should I always use both annotations: @Length and @Column(lenght=xx)?
| |
| | @Entity
| | | @Table(appliesTo = "WEBUSER", indexes = { @Index(name = "IDX_WEBUSER_NAME_FIRSTNAME", columnNames = { "NAME", "FIRSTNAME" }) })
| | | @NamedQuery(name = "WebUser.getByEmail", query = "select u from WebUser u where u.email = :email")
| | | public class WebUser implements Serializable {
| | | private Long id;
| | | private String email;
| | | private Address address = new Address();
| | | ...
| | | @Id @GeneratedValue
| | | public Long getId() {
| | | return id;
| | | }
| | |
| | | @Length(max=100)
| | | @NotEmpty
| | | @Email
| | | public String getEmail() {
| | | return email;
| | | }
| | |
| | | @Valid
| | | @Embedded
| | | public Address getAddress() {
| | | return address;
| | | }
| | | ...
| | |
| | | }
| |
| | @Embeddable
| | | public class Address implements Serializable {
| | | private String city;
| | |
| | | @Length(max=30)
| | | @NotEmpty
| | | public String getCity() {
| | | return city;
| | | }
| | | ...
| | |
| |
| | length of email field in the table: 100 (as expected)
| | length of city field in table: 255 (30 expected)
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133895#4133895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133895
18 years, 1 month