[Security & JAAS/JBoss] - Re: Problems with my security proxy
by fosodguez
hi j2ee_junkie,
I know ClientLofinModules hasn't any authenticacton logic, I'm following what it's said in this document, point 8.4.1:
http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch8.chapter.html
Login client side has done sucessfully and after doing lc.login() () if I put this line lc.getSubject().getPrincipals() I get as principal the name I have filled in the username field.
In the second step it is said that if i obtain the EJB home interface and create a bean, this results in a home interface method invocation being sent to the JBoss server. The invocation includes the method arguments passed by the client along with the user identity and credentials from the client-side JAAS login performed in step 1.
To invoke create method calls first setEJBContext (EJBContext ctx) but ctx is null and then invokeHome method. If i want to do an authentication in the server side I need to know the principal and the credential obtained in first step. How can i get the principal obtained in the first step in security proxy without sending them as parameters when i invoke create method if ctx is null in sec proxy?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964665#3964665
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964665
19 years, 9 months
[EJB 3.0] - MDB and EJB3--Newbie Question
by morganr
Hi,
I'm trying to get a mdb working with jboss4.0.4.ga however i can't seam to get the examples to run. the ear file deploys but i do not see the queue that i indicate as the destination in the jndi namespace. and as a result i get a name not found exception when i do a context lookup.
does anyone have any suggestions as to what i'm missing.
here is the code in my example project:
MessageBean@MessageDriven(name ="MessageBean",activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdb")
| })
| public class MessageBean implements MessageListener {
|
| public void onMessage(Message arg0) {
| ...
|
| }
|
| }
application.xml<?xml version="1.0" encoding="UTF-8"?>
| <application>
| <display-name>jms2</display-name>
| <module>
| <ejb>jms2.jar</ejb>
| </module>
| </application>
jboss-app.xml<?xml version="1.0" encoding="UTF-8"?>
| <jboss-app>
| <loader-repository>
| jms2:loader=ejb3
| </loader-repository>
| </jboss-app>
Thanks very much
-R-
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964662#3964662
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964662
19 years, 9 months
[EJB 3.0] - bean class has no local, webservice, or remote interfaces de
by kamra
I too get the same problem when I try to implement EJB Style Webservice and Servlet Style Webservice in the same project (same ear).
2006-08-11 12:16:28,093 DEBUG [org.jboss.ejb3.Ejb3Module] Initialization failed jboss.j2ee:service=EJB3,module=RefDataServletModule-ejb.jar
java.lang.RuntimeException: bean class has no local, webservice, or remote interfaces defined and does not implement at least one business interface at org.jboss.ejb3.ProxyFactoryHelper.getLocalInterfaces(ProxyFactoryHelper.java:105)
at org.jboss.ejb3.ProxyDeployer.initializeLocalBindingMetadata(ProxyDeployer.java:117)
at org.jboss.ejb3.SessionContainer.instantiated(SessionContainer.java:71)
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:573)
I m using jboss 4.04 GA
EJB contianer - jboss-EJB-3.0_RC8-FD
and JBoss WS - jbossws-1.0.1.GA
Does anyone know Y is this error message comming.
Another intresting point is, When i keep only one type of Webservice, that is either EJB Style Web service or Servlet Style web service at a time in the EAR file, every thing works fine. It is only when i keep both the web services in the same EAR file, I get this problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964661#3964661
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964661
19 years, 9 months
[Persistence, JBoss/CMP, Hibernate, Database] - Incorrect SQL created by DynamicQL when using left-joins
by cniermei
I am getting an SQLException from the SQL generated by a DynamicQL statement. I did not got this error until I added left-joins to my jbosscmp-jdbc.xml. I will try to explain as best I can the circumstances which have led to this error.
I am using Jboss 4.0.3SP1 connecting to a PostgreSQL 8.0.4 server.
I have a DynamicQL query, which can look something like this:
DYNAMIC-QL: SELECT DISTINCT Object (r)
| FROM Recording r
| WHERE 1=1
| AND r.phoneCall.dateOfCall >= ?1
| AND r.phoneCall.dateOfCall <= ?2
| AND r.phoneCall.startTime >= ?3
| AND r.phoneCall.callCentre.key = ?4
| ORDER BY r.phoneCall.key, r.timestampSequence
It can take over 5 minutes to get the results and populate classes with the values from the recording table and all of its CMR fields, so I'm trying to use read-ahead on-find and left-joins to see if that speeds it up. The read ahead is:
<read-ahead>
| <strategy>on-find</strategy>
| <page-size>4</page-size>
| <eager-load-group>*</eager-load-group>
| <left-join cmr-field="question" eager-load-group="*"/>
| <left-join cmr-field="phoneCall" eager-load-group="*">
| <left-join cmr-field="interviewerEmp" eager-load-group="*">
| <left-join cmr-field="dept" eager-load-group="*">
| <left-join cmr-field="parentDept" eager-load-group="*"/>
| </left-join>
| <left-join cmr-field="title" eager-load-group="*"/>
| </left-join>
| <left-join cmr-field="versionStatus" eager-load-group="*"/>
| <left-join cmr-field="version" eager-load-group="tss">
| <left-join cmr-field="study" eager-load-group="*"/>
| </left-join>
| <left-join cmr-field="dashCase" eager-load-group="*">
| <left-join cmr-field="form" eager-load-group="*">
| <left-join cmr-field="studyDetail" eager-load-group="*">
| <left-join cmr-field="study" eager-load-group="*">
| </left-join>
| </left-join>
| </left-join>
| </left-join>
| <left-join cmr-field="callStatus" eager-load-group="*"/>
| </left-join>
| <left-join cmr-field="monitoringEmp" eager-load-group="*">
| <left-join cmr-field="dept" eager-load-group="*">
| <left-join cmr-field="parentDept" eager-load-group="*"/>
| </left-join>
| <left-join cmr-field="title" eager-load-group="*"/>
| </left-join>
| </read-ahead>
|
The SQL generated by this query fails, appearantly because of the strange way it combines left outer joins and WHERE clauses to join the classes together.
In the FROM clause:
FROM dash.recording t0_r,
| dash.phone_call t2_r_phoneCall,
| call_centre_view t19_r_phoneCall_callCentre LEFT OUTER JOIN dash.question t1_r_question ON t0_r.question_id=t1_r_question.id
| LEFT OUTER JOIN...
In there WHERE clause:
...AND t0_r.phone_call_id=t2_r_phoneCall.id
| AND t2_r_phoneCall.call_centre_id=t19_r_phoneCall_callCentre.id))
| AND t0_r.phone_call_id=t2_r_phoneCall.id
The resulting error is:
anonymous wrote : javax.ejb.FinderException: Find failed: java.sql.SQLException: ERROR: relation "t0_r" does not exist
Is there something wrong with the way I'm setting up the left-joins, or might this be a bug in the sql generation code?
Thanks in advance for any help,
Chris Niermeier
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964660#3964660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964660
19 years, 9 months
[Messaging, JMS & JBossMQ] - message driven beans with EJB3
by morganr
Hi,
I'm trying to get a message driven bean to work with ejb3 on jboss 4.0.4.GA
I have looked at the trailblazer, the documentation and the wiki but i am not able to get the client to lookup to queue.
When i look at the jmx consol at the jndi namespace the queue that i am listening to does not appear.
Can someone point me towards a Hello World tutorial or somthing simple to look at.
here is the message bean that im using.
@MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination", propertyValue="queue/mdb")
| })
| public class MessageBean implements MessageListener {
|
| public void onMessage(Message arg0) {
| System.out.println("Hello World");
|
| }
|
| }
Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964659#3964659
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964659
19 years, 9 months