[JBoss-user] Problems invoking bean from stateless

2002-10-17 Thread jfina
hi all!
This may not be jboss related, but something is wrong with, hopefully, my code.
I'm trying to invoke an entitybean from within a stateless sessionbean method. The 
problem is that it seems like the newly created
bean is rolled back when the method return back to the client invoker.

any idea of where the problem may be?

(stateless method below)
using jboss 3.0.0

-Jon

  public OIA createOIA(PersonaliaData invoice, PersonaliaData shipTo)
throws java.rmi.RemoteException {
OIA oia = null;
System.out.println(PersonaliaSessionBean.createOIA());
try {
  oia = OIAUtil.getHome().create();

  oia.setInvoiceName(TEZTING TESTING);
  System.out.println(1: + ((OIAPK) 
oia.getPrimaryKey()).getOIAId());
  System.out.println(2: + oia.getInvoiceName()); // returns 
TEZTING TESTING
} catch (Exception e) {
  e.printStackTrace();
}

return oia;
  }



---
This sf.net email is sponsored by: viaVerio will pay you up to
$1,000 for every account that you consolidate with us.
http://ad.doubleclick.net/clk;4749864;7604308;v?
http://www.viaverio.com/consolidator/osdn.cfm
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] where is the webserver loading classes from?

2002-06-21 Thread jfina

hi.
The the webserver(:8083) uses its registered classloaders classpath to load classes 
from. But when i, as a client, want to use
dynamic classloading and retrieve the required client jars through my URLClassLoader 
the webserver cant find them.
Is the webserver only intended for providing classes to RMI?
What is the reccomended way to do dynamic classloading in jboss? (by now i use my own 
webserver pointing to a location with all the
.jars)

/Jon



---
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] adding new roles at runtime?

2002-06-06 Thread jfina

hi!

I can't see that there is an easy way to dynamically change the method roles at 
run-time. In a database(normally) it's quite easy to
add a role and assign tables and rigths to that role. But since the method permission 
role-name exists in ejb-jar.xml in my bean jar
file it isn't very easy to change - though not impossible.

E.g.
If I have an account bean with the default permission role: teller and a customer 
wants to change the roles setup in my account bean
to a bit more detailed like: tellerRead and tellerWrite.

Am i totally wrong?
ideas?

/Jon


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] A security question

2002-06-05 Thread jfina

hi!

I'm trying to configure client login and have some issues to clear out (jboss3.0 
latest).

1: My entitybean role is configured using xdoclet and the tag: @ejb:security-role-ref 
role-name=administrator
role-link=administrator.

2: I guessed that the role administrator must exist in the roles.properties file. so 
this file is like:
jon.Roles=administrator
jon.CallerPrincipal=caller_jon

3: I've defined users in users.properties like:
jon=mypwd

4: So, with my testclient i create the logincontext: LoginContext(other, handler) 
with jon and mypwd in handler using the other
module in login-conf.xml

5: I get this error:
 +++ Running ClientTest with username=jon, password=[C@45a877
 java.lang.SecurityException: Unable to locate a login configuration

First question : What am i missing?

Second question: Are all the roles defined in the roles.properties and edited there?

Third question : In login-conf.xml the following is defined:
application-policy name = MySqlDbRealm
   authentication
  login-module code = 
org.jboss.resource.security.ConfiguredIdentityLoginModule
 flag = required
 module-option name = principaladministrator/module-option
 module-option name = userNameroot/module-option
 module-option name = password/module-option
 module-option name = 
managedConnectionFactoryNamejboss.jca:service=LocalTxCM,name=MySqlDS module-option
  /login-module
   /authentication
/application-policy
What is the principal module-option good for?

/Jon


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] A security question

2002-06-05 Thread jfina

 Do you have jaas config file on the client side? For example let's
 call it jaas.config:
 /** Login Configuration for JAAS **/
 TestClient {
 org.jboss.security.ClientLoginModule required unauthenticatedIdentity=nobody;
 };

 Then you have to add this option to command line running the client:
 -Djava.security.auth.login.config=path\to\the\jaas_config_file\jaas.config

thanks,
I tried doing so; but i was able to call the create the bean with/without a 
username/pwd - which is weird since i've declared the
ejbcreate methods to be: @ejb:permission role-name=administrator.

I've renamed 'TestClient' to 'other' which is defined in login-conf.xml.

Anyhow, i dont get the errormessage even if 'my' security is bypassed :-)
Sure i'm still missing something

/Jon


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: Re[2]: [JBoss-user] A security question

2002-06-05 Thread jfina

 have you declared security-domain in jboss.xml?

no, i can find very little about it in the jboss doc's.
xdoclet mentions something about a jboss-security file that is supposed to contain 
such information but i dont know the format. Is
this meant to be an additional file in the server folder or in my bean jar file?

 That's wrong. You need to declare other in security-domain element
 in jboss.xml.

I cant find that xdoclet does this so i quess i must do it manually then.


 And the client code should look like this:
 try {
   AppCallbackHandler handler = new AppCallbackHandler(name, password);
   LoginContext lc = new LoginContext(TestClient, handler);
   cat.debug(Created LoginContext);
   lc.login();
 } catch(LoginException le) {
   cat.debug(Login failed, le);

ok, thanks. So the sercuritydomain maps the TestClient to the other module then?

/Jon


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] BMP examples?

2002-05-29 Thread jfina

Hi!
Anyone who can share some good jboss BMP example source?
Appreciate it!

/Jon

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] log directory missing in jboss-3.0.0beta_tomcat-4.0.2 distribution

2002-03-22 Thread jfina

/Jon

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] How modular is EJB and jboss?

2002-03-07 Thread jfina

Hi!

My challenge is to get the ejb model to fit into my needs. I'm writing a system that 
needs to be very modular and alive. A operation
must be implemented differently depending of the type.

Like: If I have a Zone object I need different zone handlers depending of the type of 
zone registred in the database (parking,
regular, pool etc...). The handlers may monitor the zone and more or less continually 
do different tasks depending on the logic.
Normally I would have solved this using inheritence, contained objects and threads.

My intention was to use MDB's to receive the phycial passings and call the different 
stateless zone sessionbeans which will process
the message further depending on type.

Is this really possible to solve with jboss?

At this time I only see the use of jboss as a pure persistence engine...or am i wrong 
in my views?

/Jon


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] JBoss as general service container?

2002-02-01 Thread jfina

Hi!
Can jboss be used as a general purpose service container?
If thats true I may build network services deployed in the jboss container and use the 
ejb as a peristent back-end store for the
services.
...or i may just run JINI and use jboss as the persistent engine.

What do you think?

/Jon


___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user