[JBoss-user] [Security & JAAS/JBoss] - Re: jaas behaviour for unchecked URIs

2004-07-01 Thread snavjot
thx for a detailed reply that's not readily available at jboss forums.

Yes, I wrote a filter that will save the authenticated principal in session for me.

As i am moving away from existing app, that relies on  some jey in session. So, i got 
to save the principal in session. I found it better than digging the code of entire 
app.

I know i should have planned properly but never mind. Will refactor when i get some 
time.

thanks again.
Navjot Singh



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840571


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Re: Why do i get this

2004-06-30 Thread snavjot
hi,

this is my code snippet. Am i to close the QueueConnection also?

navjot

try{

QueueConnection qc = qcf.createQueueConnection();
QueueSession qs = qc.createQueueSession(true,QueueSession.AUTO_ACKNOWLEDGE);

QueueSender qsender = qs.createSender(q);
MapMessage msg = qs.createMapMessage();

msg.setString("TO","");
msg.setString("SUBJECT", "Order Confirmation");
msg.setString("DATA"," Thx for placing the order with us.");

qsender.send(msg);
qsender.close();
}
catch(..)




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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840485


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Why do i get this "Closing a connection" error?

2004-06-30 Thread snavjot
hi,

What should i do to go free of this error? I am sure i am not doing something that 
Jboss is accepting gracefully as my stupidity and giving me a warning.

TIA
Navjot Singh


21:11:47,289 INFO  [CachedConnectionManager] Closing a connection for you.  Please 
close them yourself: [EMAIL PROTECTED]
java.lang.Exception: STACKTRACE
at 
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
   at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at 
org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createQueueSession(JmsSessionFactoryImpl.java:119)



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840478


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - jaas behaviour for unchecked URIs

2004-06-30 Thread snavjot
Hi,

When we have a checked URI and we authenticate successfully, the principal is 
available from current request object.

However, if we navigate to an unchecked URL ( i mean with no security-constraint 
imposed) then the principal is not available.

I thought that the JAAS implementations save the principal in Session after 
authentication. But NO. Jboss seems to save this principal information *somewhere* and 
if web-resource with security-constraint is asked for, it checks, retreive and save 
principal in request object. Please correct me if my understanding is wrong.

Where does Jboss's JAAS impl store the authenticated principals and it's mapping with 
session ids??

Any help/pointer is appreciated.

TIA
Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840427


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: one remote bean cant find another remote bean

2004-06-30 Thread snavjot
oops!! sorry my mistake :-)

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840402


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation & Configuration] - commons logging in jboss

2004-06-29 Thread snavjot
Hi,

I am using apache commons to log from my EJBs.

I have also added the following tag in my conf/log4j.xml
   
 
   

But my log statements are not getting printed on console. Although server.log contains 
the log statements.

Am i missing anything? What should i do to make it on console?

Also, if there's some config where can i configure EAR specific logs.

TIA
Navjot Singh


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840302


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: Creating EJB object of local interface from servlet

2004-06-29 Thread snavjot
can you post you web.xml and jboss-web.xnl here?

in short do you have ejb-local-ref tag in web.xml and the correponding jndi mapping in 
jboss-web.xml and if they present. are they right?

navjot singh


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840301


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - one remote bean cant find another remote bean

2004-06-29 Thread snavjot
hi list,

In my CustomerManagerBean, i am able to find local entity beans  with JNDi names as 
"ejb/CustomerHome" and "ejb/CustomerLoginHome".

Similarly, i am trying to access a bean with JNDI name "ejb/ProductManagerHome"  from 
CartBean. Actually, the flow is like this

web delegate -> CartHome -> CartBean -> ProductManagerHome

NOTE - However, the same "ejb/ProductManagerHome" is found successfully from web tier 
if accessed directly. I mean if i keep mapping to ejb/ProductManagerHome in 
jboss-web.xml and look it up. it is found successfully.

14:44:16,058 ERROR [ServiceLocator] Cant locate ejb/ProductManagerHome
javax.naming.NameNotFoundException: ejb not bound

but earlier in the log, when the beans were getting deployed, it gave a success message

14:18:03,717 INFO  [StatelessSessionInstancePool] Started 
jboss.j2ee:jndiName=ejb/ProductManagerHome,plugin=pool,service=EJB
14:18:03,717 INFO  [StatelessSessionContainer] Started 
jboss.j2ee:jndiName=ejb/ProductManagerHome,service=EJB

What could possibly be wrong?

I am using ServiceLocator pattern to locate my beans.

Navjot

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840251


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Access to the requested resource has been denied - WHY??

2004-06-29 Thread snavjot
now, the picture is much clearer. Thanks to all whc shared the veiws with me.

Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840237


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: No UserRoles issue

2004-06-28 Thread snavjot
thanks a lot. it did help.

navjot

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840124


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Access to the requested resource has been denied - WHY??

2004-06-28 Thread snavjot
then i guess the rolesQuery should be contrained to
**select role from UserRoles where...**

why even ask for rolesgroup column when it HAS TO be "Roles"?

navjot


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840123


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - best way to lookup beans

2004-06-28 Thread snavjot
hi,

I am very confused about the beans lookup.

I mean i have a set of beans that Jboss 3.2.3 deploys like this

Started jboss.j2ee:jndiName=ejb/ProductManagerHome, service=EJB
Started jboss.j2ee:jndiName=ejb/CartHome, service=EJB

In jboss-web.xml, 
ejb/Cart maps to ejb/CartHome
ejb/ProductManager maps to ejb/ProductManagerHome

>From servlet, i lookup Cart using "java:comp/env/ejb/Cart". SUCCESS.
In my Cart bean, i lookup "java:comp/env/ejb/ProductManagerHome"

the it throws ERROR

javax.naming.NameNotFoundException: ProductManagerHome not bound

WHY??

Then i tried the following also. May be 3rd test is more relevant here.

1. I tried to look up from the standalone client like this
ic.lookup("ejb/ProductManagerHome"); and it got found. BUT if i printed the object 
found. it print "ejb/ProductManagerHomeHome" Why 1 extra Home??

2. I tried to look up from the standalone client like this
ic.lookup("java:comp/env/ejb/ProductManagerHome")

it says **javax.naming.NameNotFoundException: comp not bound**

3. I tried to look up from web client this
ic.lookup("java:comp/env/ejb/ProductManager")

It got found.

What am i doing wrong? 

Navjot

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840122


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Re: Access to the requested resource has been denied - WHY??

2004-06-26 Thread snavjot
hi,

i just made it work. Just replaced 


select role, role from CustomerLogin where custCode=?


WITH


select role, "Roles" from CustomerLogin where custCode=?



and it worked. I peeped into the jbossdx.jar code and found that "Roles" was hard 
coded there. WHY?

Navjot Singh


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840045


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Access to the requested resource has been denied - WHY??

2004-06-26 Thread snavjot
Hi,

I am using Jboss 3.2.3 + tomcat 4.1.29. I configured jboss for JAAS and modified my 
application to work with JAAS.

When i access AddToCart, Jboss challenges for LOGIN, i fill in username password. It 
throws the following error then.
It clearly shows that navis/navis is getting authenticated but something bad is 
happening later. may be something to do with roles. Can somebidy show some direction 
please???

TIA
Navjot Singh


Snippet from server.log - pls notice last few lines of this log.
===

[org.jboss.security.auth.spi.DatabaseServerLoginModule] initialize
[org.jboss.security.auth.spi.DatabaseServerLoginModule] DatabaseServerLoginModule, 
dsJndiName=java:/SmailDS
[org.jboss.security.auth.spi.DatabaseServerLoginModule] principalsQuery=select passwd 
from CustomerLogin where custCode=?
[org.jboss.security.auth.spi.DatabaseServerLoginModule] rolesQuery=select role, role 
from CustomerLogin where custCode=?
[org.jboss.security.auth.spi.DatabaseServerLoginModule] login
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection 
returning unassociated connection
TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] supplying 
ManagedConnection from pool: [EMAIL PROTECTED]
TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Getting 
connection from pool [InUse/Available/Max]: [1/1/20]
TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering 
connection from [EMAIL PROTECTED], connection : [EMAIL PROTECTED], key: null
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] connectionClosed 
called
TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering 
connection from [EMAIL PROTECTED], object: [EMAIL PROTECTED], key: null
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] unregisterConnection: 
0 handles left
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] delisting currenttx: 
null, ManagedConnection: [EMAIL PROTECTED]
TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] putting 
ManagedConnection back into pool
TRACE [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Returning 
connection to pool [InUse/Available/Max]: [0/1/20]
TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] User 'navis' 
authenticated, loginOk=true
TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] commit, loginOk=true
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] subject: null
TRACE [org.jboss.resource.connectionmanager.TxConnectionManager] getManagedConnection 
returning unassociated connection

[org.jboss.security.plugins.JaasSecurityManager.ShopexAuth] updateCache, 
subject=Subject:
Principal: navis
Principal: USER(members:USER)

[org.jboss.web.tomcat.security.JBossSecurityMgrRealm] User: navis is authenticated
[org.jboss.web.tomcat.security.JBossSecurityMgrRealm] End authenticate, principal=navis
[org.jboss.web.localhost.Engine] Authenticator[/shopex]: Authentication of 'navis' was 
successful
[org.jboss.web.localhost.Engine] Authenticator[/shopex]: Redirecting to original 
'/shopex/AddToCart.do?PROD_CODE=BM'
[org.jboss.web.localhost.Engine] Authenticator[/shopex]:  Failed authenticate() test
[org.jboss.web.localhost.Engine] StandardContext[/shopex]: Mapping 
contextPath='/shopex' with requestURI='/shopex/AddToCart.do' and 
relativeURI='/AddToCart.do'

web.xml
=



USER Restricted
Declarative USER restriction 
/AddToCart.do
GET




USER



no description
NONE




FORM
Default

/jsp/signin.jsp
/jsp/badlogin.jsp




A user allowed to buy items and place order
USER



jboss login-config.xml
==



java:/SmailDS
select passwd from CustomerLogin where 
custCode=?
select role, role from CustomerLogin where 
custCode=?




CustomerLogin
=
custCode | passwd | role
-
navis | navis | USER




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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840043


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - Proper Usage of Security at WEB and EJB layer?

2004-06-25 Thread snavjot
Hi,

I have just read an article on javaworld about j2ee/jaas. 

I understand that there will be apps that do care about the method level security of 
enterprise beans. be it session or entity.  With entity beans, probably, this is J2EE 
answer to cope with database level user permissions. 

But most apps hardly need this method level restrictions. All they are concerned about 
is the security at the WEB layer.

I just want my application to be secure in terms of USERs/ROLEs at WEB layer where i 
can specify that action A can be called by Role R and that's it. Which session bean 
they call and further which entity bean gets called. I don't care. But i think that 
this way my enterprise beans can be called by anyone. 

Now what i want is something like this that every request to enterprise bean carries 1 
ROLE defined by me in my WEB APP. All of my enterprise beans will be 
security-constrained by that 1 ROLE. 

How can i go about it? Please comment if you find that my approach is wrong. Please 
suggest what should i do then.

Any help or pointers.
Navjot Singh


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839977


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Security & JAAS/JBoss] - No UserRoles issue

2004-06-25 Thread snavjot
Hi,

I am fairly new to JAAS and have read the article mentioned in sticky post.

I have done all the configuration but I have a table structure like this. In my 
application, no user can have multiple roles.

Login
code | pass | role

I dont want to create 2 tables just for the sake of creating if i can use same table 
in both queries. 
Can i use the same table in principalsQuery and rolesQuery? As you can see i don't 
even have something like roleGroup, how would DatabaseServerLoginModule behave in that 
scenario? 

TIA
Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839974


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: Remote / Local Mismatch

2004-06-24 Thread snavjot
Thanks a lot, loubyansky.

May i know then how should i proceed with my development. I have a collection of 
entity beans. Some are remote and some are local. I have got them in heritage from old 
team ;-)

I have started adding CMR fields to the relations.

How do i decide which of them should be moved on to LOCAL? I might end up converting 
all my entities to LOCAL.  I can foresee lots of work on my part but this time i will 
do it for good.

TIA
Navjot Singh



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839783


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: Remote / Local Mismatch

2004-06-23 Thread snavjot
spec of whom?

I have created a REMOTE object. I am trying to retreive a collection of REMOTE objects 
and trying to add the create REMOTE object to that collection.

Then why is EJB Container expecting the object to be LOCAL.

loubyansky, I am surely missing your point but you can help me understand. Any 
pointers.

thx
Navjot

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839773


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Remote / Local Mismatch

2004-06-23 Thread snavjot
hi,

I have 2 entities CustomerLogin and CustomerProfile wth 1:N relation. Both local and 
remote interfaces are generated for them. 

ServiceLocator locator = ServiceLocator.getInstance();
CustomerProfileHome cpHome = (CustomerProfileHome) 
locator.getHome(CustomerProfileHome.JNDI_NAME, CustomerProfileHome.class);

try{
 CustomerProfile cp =cpHome.create(cpvo);
 getCustomerProfiles().add(cp); // exception line
}

This is my CustomerLogin bean, when i create new CustomerProfile and try to add. it 
throws the following error.
I have created a REMOTE CustomerProfile. Then why is it expecting a LOCAL 
CustomerProfile??? Any clues.

BTW, the getCustomerProfiles() return empty collection in this case.


Caused by: java.lang.IllegalArgumentException: Object must be an instance of 
com.fz.customer.interfaces.CustomerProfileLocal, but is an isntance of 
[com.fz.customer.interfaces.CustomerProfile]
at org.jboss.ejb.plugins.cmp.jdbc.bridge.RelationSet.add(RelationSet.java:117)

TIA
Navjot Singh
Jboss 3.2.3


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839770


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - Re: CMP field for key not found

2004-06-23 Thread snavjot
Greetings,

I know i couldn't expect any reply to this kind of problem. 

Anyway, i sat down and started digging out. I had to create the entire ER diagram and 
compare it with ejb-jar.xml, jbosscmp-jdbc.xml. Everything seemed to be allright in 
first go. But then, by luck, i struck to a point where i have a wrong relation between 
totally different entities. Customer and CustomerProfile. That was the problem for 
this error.

if anyone faces this problem, i will advise not to look at the error staright away but 
also start backtracking to the source relations.

HTH
Navjot Singh



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839670


---
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence & CMP/JBoss] - CMP field for key not found

2004-06-23 Thread snavjot
Hi,

I have 2 beans PurchaseOrderItem and Product that has the relation as defined below in 
the DD. When i deploy, this exception gets thrown.

==   Exception   =
16:51:03,017 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 
'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
  
Incompletely deployed packages:
  
MBeans waiting for classes:
  
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=ejb/PurchaseOrderHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode', ObjectName: 
jboss.j2ee:jndiName=ejb/CustomerProfileHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode', ObjectName: 
jboss.j2ee:jndiName=ejb/CustomerLoginHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode', ObjectName: 
jboss.j2ee:jndiName=ejb/PurchaseOrderItemHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode', ObjectName: 
jboss.j2ee:jndiName=ejb/ProductHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode', ObjectName: 
jboss.j2ee:jndiName=ejb/CategoryHome,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: org.jboss.deployment.DeploymentException: Role 
'PurchaseOrderItem-Has-Product' on Entity Bean 'PurchaseOrderItem' : CMP field for key 
not found: field name='prodCode']
==   Exception   =

I am sure many have might have faced this problem. i searched a lot and tried but 
couldn't get thru this problem.

Please help on this. Seems like i am digging the same hole deeper but actually i need 
to dig a new hole but where??

regards
Navjot Singh
Jboss  3.2.3

=== ejb-jar.xml relevant parts =

  
 
 PurchaseOrderItem
 PurchaseOrderItem  
com.fuzzylabz.order.interfaces.PurchaseOrderItemHome
com.fuzzylabz.order.interfaces.PurchaseOrderItem 
com.fuzzylabz.order.interfaces.PurchaseOrderItemLocalHome 
com.fuzzylabz.order.interfaces.PurchaseOrderItemLocal 
com.fuzzylabz.order.ejb.PurchaseOrderItemCMP
 Container
 java.lang.String
 False
 2.x
PurchaseOrderItem
 

poItemId
 
 

quantity
 
 poItemId

  
  

  
 
 Product

 Product

 com.fuzzylabz.product.interfaces.ProductHome
 com.fuzzylabz.product.interfaces.Product
 com.fuzzylabz.product.interfaces.ProductLocalHome
 com.fuzzylabz.product.interfaces.ProductLocal

 com.fuzzylabz.product.ejb.ProductCMP
 Container
 java.lang.String
 False
 2.x
 Product
 

prodCode
 
 

name
 
 

description
 
 

unitPrice
 
 

discountPercent
 
 

sellOnline
 
 prodCode

 

   findAll
   
   


 
  


  jboss.xml  relevant parts 

  
 PurchaseOrderItem
 ejb/PurchaseOrderItemHome
 ejb/PurchaseOrderItemLocalHome




  
  
 Product
 ejb/ProductHome
 ejb/ProductLocalHome




  

  jbosscmp-jdbc.xml  relevant parts 

  
 Product

 
prodCode
prodCode

VARCHAR
varchar(20)


 
name
name

VARCHAR
varchar(50)


 
description
description

VARCHAR
varchar(100)


 
unitPrice
unitPrice

DOUBLE
double


 
discountPercent
discountPercent

DOUBLE
double


 
sellOnline
sellOnline

 

[JBoss-user] [Installation & Configuration] - enable struts logging in jboss

2004-06-18 Thread snavjot
hi,

I have jboss 3.2.3 (with tomcat 4.1.29). I have just deployed a struts application in 
there.

I wish to see what struts is throwing to the log. How to enable that logging?
be at console or in some file?

TIA
Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839230


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [HTTPD, Servlets & JSP] - http 405 error whe try to access struts action

2004-06-18 Thread snavjot
hi,

I have deployed my app on Jboss 3.2.3(with Tomcat 4.1.29). Success.

When i try to access http://localhost:8080/myapp/ShowReg.do

It says
HTTP 405 : The specified HTTP method is not allowed for the requested resource (HTTP 
method GET is not supported by this URL).

No where in web.xml, i ahve declined the access to GET method to any URL.

However, if index.html file and another .jsp file is working.

Can anybody provide any insight how to dig into this? Or better how to turn on the 
logging for struts when the app is deployed on JBoss?

TIA
Navjot Singh 

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839228


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [J2EE Design Patterns] - Re: DAO or EJB

2004-06-18 Thread snavjot
EJBs are no doubt scalable. Usually you access data using

1. CMP
2. BMP
3. Sessions beans with JDBC.

Compare it to DAO that can help you to form your own persistence mechanism and policy 
not only to RDBMS but to any kind of data store. be it XML/file system. But CMP/BMPs 
can't help you with that as they stick only to RDBMS.

cant remmeber the link but there was some article related to what you are looking at 
serverside.com

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839226


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [J2EE Design Patterns] - Re: Data Transfer Object // WebServices

2004-06-18 Thread snavjot
You may access your DTO via proxy. It will be the proxy's responsibility to maintain 
the sanctity of your DTO.

Proxy can exploit monotonically increasing version numbers or timestamps.

HTH
Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839223


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [J2EE Design Patterns] - Re: how can I keep a kind of global object (Singleton) in JB

2004-06-18 Thread snavjot
hi,

you can read the data from DB, create an object ans save at some JNDI location.

Now, just access the same JNDI location.

Is that good enough solution?
Navjot Singh

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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839220


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Creating custom javax.jms.Message class

2004-05-18 Thread snavjot
Hi,

I have

public interface EmailMessage extends TextMessage
{
private String from;
private String to;
private String subject;
 
// getter setter follows
}

then i have

public class EmailMessageImpl extends com.sun.jms.TextMessageImpl implements 
EmailMessage
{
...
...
}


Now, in my SLSB, when i write 
EmailMessage em = new EmailMessageImpl();

Jboss gives me error on runtime, NoClassDefFoundError - EmailMessageImpl.

I have checked it's in my ejb jar. And i tested calling constructor from another 
class. That works.

So, i check the TextMessageImpl. It has empty public constructor. Then i checked 
com.sun.jms.MessageImpl also has empty constructor.

Now, in API terms, you create message from Queue/TopciSession, 

Do i have to extend QueueSession and add createEmailMessage()? 
OR
Do i have to extend TextMessageImpl of Jboss's SpyMQ i.e. SpyTextMessage (if i am not 
wrong)


Please correct me if am thinking in totally wrong direction.



I have made my code working by switiching to MapMessage as of now but i would really 
like a custom jms message.


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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835448


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS & JBossMQ] - Error - jms not bound

2004-05-17 Thread snavjot
Greetings,

I have an MDB that sends email out. All I am trying to do is to send Message to MDB 
from my SLSB.

__part of session bean tag in ejb-jar.xml__

   
   jms/QueueConnectionFactory
javax.jms.QueueConnectionFactory
Container
Shareable


__jboss.xml__



   
  MemberManager
  ejb/MemberManager


  Members
  ejb/Members


  EmailMDB
  queue/N4EmailQ




   
  mail/N4Email
  java:/Mail
   

   
  jms/QueueConnectionFactory
  java:/JmsXA





Now, whne i try to lookup queue factory

  qFactory = (QueueConnectionFactory) ctxt.lookup("jms/QueueConnectionFactory");

I got an error - "jms not bound".

Is there anything else i need to do with my configuration?

Any help is appreciated.

- Navjot Singh



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835310


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user