Would something like this work?
(new org.jboss.serial.io.MarshalledObject(entity)).get()
|
| or
|
| (new org.jboss.serial.io.MarshalledObjectForLocalCalls(entity)).get()
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3942944#3942944
Reply to the
I don't want the proxy, I want the entity bean WITHOUT the proxy.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3942973#3942973
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3942973
When I retrieve an entity bean from the entity manager it will most likely be
an AOP subclass. This is a problem with my custom XML serialization. So I would
like to strip the AOP proxy from the instance. Lazy loading collections may
safely return null or empty collections - I don't care.
I meant the magic that Hibernate does. Sorry for not being accurate. Any ideas?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3941000#3941000
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3941000
We get this exception with 10g, thin driver, XA ds, 4.0.3 and EJB3 too. However
once the exception happens there will be more of them in other seemingly
unrelated and subsequent transactions but always with the same entity bean.
View the original post :
Thanks. This is exactly what I am doing. But my 2.x bean is in an isolated EAR.
And that seems to be a problem. I have to use the deployment descriptor
reference because I must not hard code the JNDI name. Any ideas?
View the original post :
I am trying to do the same but without any success.
I want to inject the EJB 2 business interface into an EJB 3 MDB. So I write:
| @EJB(name=ejb/Esb)
| EsbAdapter adapter;
|
In the ejb-jar.xml I declare:
| message-driven
| ejb-nameOutflowMdb/ejb-name
|
|
IMHO this is intended behaviour. EJBContext.lookup only sees the private
namespace of the bean. You can not make global JNDI lookup with it. I know it
used to work in RC3, but that was not correct IMHO.
Use @EJB to inject bean references or use the deployment descriptor.
View the original post
A step further:
It seems that the ejb-ref in ejb-jar.xml is not necessary (as expected) and
this is equivalent to specifying a @EJB annotation.
Furthermore as the two EARs use separate class loaders we need this in the
jboss.xml
| ejb-ref
|
Okay this is only a problem in EJB-3RC3. It works in RC5.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3933124#3933124
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3933124
Hi,
I am trying to configure an EJB3 session bean for clustering. As my cluster
partition names are dependent on the deployment, I can not use the @Clustered
annotation because this would hardcode the name. So I want to use the jboss.xml
file to configure the clustering property. However I can
I have deplyoed a RAR in a EAR and also a datasource that uses the RAR. Now the
connection-factories/tx-connection-factory/rar-name element of the datasource
references the RAR like myapp.ear#myRA.rar. This is the name of the
RARDeployment service. But I don't like it that it has to contain the
I am trying to add an Interceptor to the chain, but without success. Does this
actually work with EJB3 session beans? Because when I set a break-point in my
bean in the debugger the stack shows lots of AOP interceptors, but none of the
interceptors from the container-configuration.
And I don't
If it doesn't use the old container config, how do we tune pool sizes now?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3926846#3926846
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3926846
Okay I found out now. This not supported by EJB3 beans.
I have to use the @Interceptors annotation as outlined in the specs or specify
them in the ejb-jar.xml
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3926844#3926844
Reply to the post :
Yeah, the tutorial refers to this class:
http://cvs.sourceforge.net/viewcvs.py/jboss/jboss-ejb3/src/main/org/jboss/ejb3/mdb/MDBConfig.java?rev=1.3view=auto
Would you care to add some API Docs please?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3926871#3926871
You get this when you don't specify a bind address. Do instead:
run -c all -b 127.0.0.1
But I really think this is a bug in the HA-JNDI config somewhere
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3926079#3926079
Reply to the post :
Alternatively you can comment out two lines in the cluster-service.xml in the
MBean jboss:service=HAJNDI:
attribute name=BindAddress${jboss.bind.address}/attribute
| attribute
name=AutoDiscoveryBindAddress${jboss.bind.address}/attribute[/code ]
|
| This makes HA-JNDI bind to all
Ep, apparently you have no experience with writing applications spanning
multiple time zones. I have. Your arguments are full of basic mistakes and
nonsense (no offense meant). This is not your fault. Everybody was a beginner
at some point. But working with time is a complex topic and it has
This is partly true only! JDBC offers methods:
PreparedStatement.setDate(int, Date, Calendar)
ResultSet.getDate(int, Calendar)
that can be used to control time zone conversions. I have done that when I used
JDBC in the past. So the persistence layer clearly has the possibility to
address this
Max, what you mean is
@Basic(temporalType=TemporalType.TIMESTAMP)
but as Timestamp follows the exact same semantics in JDBC as Date and Calendar
it's persistence is as broken.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924195#3924195
Reply to the post :
Emmanuel, the Date class does not imply any time zone semantics at all. It
stores a point in time in an abstract way. It took Sun a little while to figure
that out. This is why all methods in Date that implicitly imply a time zone
have been deprecated years ago. The getTime and setTime methods
Max, I have tested this quickly with PostgreSQL (used for development) and
found Timestamp behaves the same as Date and Calendar - the VM's default Tz is
used to apply some conversion. I still need to verify this with Oracle (used
for production DB).
View the original post :
Yes. This is the test case:
| IGenericEntityManagement dataManager =
lookup(IGenericEntityManagement.class);
| ITestBean testBean = lookup(ITestBean.class);
|
| TimeZone defaultTz = testBean.getDefaultTz();
| Parameter p1 = new Parameter();
|
what DB are you using, Max?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924276#3924276
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3924276
---
This SF.net email is
Ep, guess why they added overloads of those methods that take a Calendar
object. And that is exactly my point. It seems that you are finally starting to
understand me.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3924308#3924308
Reply to the post :
phon, the classpath you pass to JWS may be the same. But the classloader
structure in JWS is inherently different from a standalone application.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3923830#3923830
Reply to the post :
1. Persist an entity with a Date property
2. Change the time zone of the JBoss server (or call TimeZone.setDefault)
3. Read the entity from the persistence layer
Now the Date property has a different value than before!
This is extremely bad. Date objects are semantically not specific to a time
Clebert, all your investigations are highly appreciated!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3923520#3923520
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3923520
I am doing that as you can see in the test case attached to
http://jira.jboss.com/jira/browse/EJBTHREE-440
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3923606#3923606
Reply to the post :
Test case that reliably reproduces the problem added to new JIRA report:
http://jira.jboss.com/jira/browse/EJBTHREE-440
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3923273#3923273
Reply to the post :
I noticed that the whole client app very much depends on class loader issues.
For example when you change my ant script not to fork the VM for the test
target, you will get different exceptions. All depends a lot on the classpath
as well. If you miss out certain jar files you get quite strange
Same problem also with AS 4.0.4RC1
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3922234#3922234
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3922234
---
This SF.net
ANYBODY EXPERIENCING THIS BUG please speak up NOW!
I am surprised nobody else has noticed this as it must be very obvious in any
system. Either nobody has upgraded to RC5 yet or there is nobody using EJB3
with a real-world datamodel :-)
I can not think of any configuration badness which could
That's very interesting! So it seems to depend on the runtime environment. I am
seeing this bug when I run JUnit test from within Eclipse that are clients to a
locally running JBoss instance. My JUnit tests are using required libraries
directly from the JBoss installation directory.
What is
Same problem here: lazily initialized entity bean fields can not be marshalled
because of this! The problem is still present in RC5.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3921921#3921921
Reply to the post :
No answer?
Which MBean registers those methods? It is vital to be able to intermediately
suspend delivery to an MDB! Imagine a productive system and you discover an
error in your code that causes lots of messages to generate exceptions. Then
you will need to stop delivery (automatically) until
Well, easiest for me would be a callback method on the MDB like
void onCommitException(Throwable t);
(How to register it, is another issue). But as you say the commit is issued by
the pool I am not sure if that is still possible at that point or if the
instance has already been dismissed.
Adrian, I'm afraid you lost me here. I guess I am out of luck with CMT. The JCA
inflow sounds interesting. I saw the documentation on that and I'm sure I can
make JBoss use JCA inflow for my MDBs. But where do I go from there? Where do I
control the transaction then?
View the original post :
Well, it's not exactly committing a transaction in parts. But I might want to
send a response to a message even if the commit fails. And I need the exact
exception why the commit failed.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3910852#3910852
Reply to
Using CMT with an MDB. The MDB calls several methods on session beans. On
commit an exception happens (because of a constraint violation in the DB, or a
dirty read or similar). Those exceptions are interesting to me and I want to
react on them. Is there a way I can get to them without using
Why not just use a session bean from inside your XMBean to access your
persistence context?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3909564#3909564
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3909564
My app uses a username, userprofile and password to authenticate users.
I am authenticating from within a MDB, so I can call secured session bean
methods. All information needed to login comes with the message and I provide
this via a custom callback handler to JAAS.
I am using this login
Isn't that very clear: Check that a security-domain has been set for the
application.?
@SecurityDomain(yourdomain)
@Statless
public class MyBean {
}
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908368#3908368
Reply to the post :
Try and use the JBoss client login module on the HTTP servlet side. For this
define a new login config called http for instance:
http {
org.jboss.security.ClientLoginModule required multi-threaded=true;
};
and use this in your webapp to authenticate against.
For your EJB application then
Yes, exactly. For the http domain also set the multi-threaded=true option.
Otherwise this is not thread safe (very hazardous is a web environment...)!
I guess the error comes from the security interceptor of the session bean. Does
it say, WHY access was denied?
View the original post :
auth.conf is not a standard file. If you use it, some component must read it
and make a JAAS configuration object out of it. JBoss' DynamicLoginConfig can
do that for example. So for the moment do it in login-config.xml.
Oh and the correct use of the multi-threaded option is:
|
So you are still getting this exception? The servlet must of course use the
http policy! Have you configured that correctly?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908404#3908404
Reply to the post :
I think you want haqcsd for your beans as they are not clients.
The with no security context suggests that the container does not perform a
JAAS login for your servlet request. Make 100% sure that it does perform
authentication (try an invalid user and you should get an error). Then it will
When you use isCallerInRole(String) you have to specify all the roles you are
referring to in a @RolesReferenced({role1, role2}) at class level.
Otherwise they are not available.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908455#3908455
Reply to the post
Even worse. It drops the schema and recreates it.
Include this in your persistence.xml:
!-- Set to off in production! --
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908515#3908515
Reply to the post :
You should not have to turn off validation. It it the responsibility of JBoss
to provide a correct URI resolving machanism to the XML parser. There should be
no need to download the DTD from the web, as they are included in the JBoss
distribution. You may try and use a relative URI. If that
JBoss usually binds its services to only one network interface. You can check
on which interface JBoss listens with:
(Linux) netstat -ant
(Win32) netstat -an -p tcp
You should get something like:
TCP127.0.0.1:1098 0.0.0.0:0 LISTENING
TCP127.0.0.1:1099
You should add a version column to your entities
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908169#3908169
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3908169
---
You just need to read. The exception tells you: Update failed. Expected one
affected row: rowsAffected=0
There is just no such record that you are trying to update.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908236#3908236
Reply to the post :
Goodness, this error message is eplains it all. And you are still asking what
you are doing wrong? Read!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908082#3908082
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3908082
It is in deploy/ejb3.deployer/jboss-annotations-ejb3.jar
Adrian, your wrong forum postings do not help anyone.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908002#3908002
Reply to the post :
You have to register you resource with the resource manager. Normally this is
done by creating a resource adapter (RAR). Suggested reading: JTA, Java
connector architector, resource adapters.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908003#3908003
Reply
I understand the problem. As picking the wrong forum occurs frequently, this
might indicate that there are too many forums.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3908021#3908021
Reply to the post :
Hey where did you find this stopDelivery method in the JMX console? I am
desperately looking for it!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907799#3907799
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907799
sorry for hijacking. See
http://www.jboss.com/index.html?module=bbop=viewtopict=69690
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907808#3907808
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907808
What is SchemaAdmin? Just a stupid POJO? Then it is of course not JTA aware.
Please read at least the basics about what JTA is. It doesn't do any magic. If
it is an EJB then you must get it via JNDI and not create an instance yourself.
View the original post :
No, this guy is creating InitialContexts in a loop. Man, creating an
InitialContext is a expensive operation! How did you think RMI works? When in a
bean, use the lookup methods of the EjbContext. On a client, create an
InitialContext once. And don't forget to close it in a finally clause.
Read this before you loose your mind:
http://www.jboss.com/index.html?module=bbop=viewtopict=72597
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907725#3907725
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907725
wasn't JMX made for this purpose?
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907727#3907727
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907727
---
This SF.Net
For CMP:
* deploy a new datasource (with a name like cmpDS)
* use the cmpDS in your persistence.xml (if you use EJB3)
or change it globally in standardjbosscmp-jdbc.xml
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907734#3907734
Reply to the post :
Is timeStart a string? If not, use a parameter to pass in a Date. If yes, the
string constant should be in single quotes. And I doubt the Object cast is
necessary.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907347#3907347
Reply to the post :
Hey, why don't you read the specs? All your questions are answered there.
For the record: it's field IS NULL and no there is no way to have date/time
constants.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907404#3907404
Reply to the post :
that means your JAR file is broken
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907456#3907456
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907456
---
This SF.Net
I am successfully using PostgreSQL with JBoss 4.0.3 + EJB3 (all) for JMS and
the persistence layer. You need to do the following:
* Start PgSQL and create a new DB called jms
* remove the sample destinations:
deploy-hasingleton/jms/jbossmq-destinations-service.xml
* remove the HSQL JMS
I use the same config for the same purpose and I guess it is right. But I still
have to run tests!
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907579#3907579
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907579
Such a thing can not be achieved reliably if the code is in the hands of the
foe. You can not make any code tamper-safe. All code you give away is untrusted.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907173#3907173
Reply to the post :
Your session bean:
@SecurityDomain(mydomain)
@Stateless
@Remote({ITestBean.class})
public class TestBean implements ITestBean {
@RolesAllowed(myrole)
public String accessPermitted() {
return sc.getCallerPrincipal().getName();
}
}
Define the security domain in
1. Webapps are web clients, not application clients. Webapps should therefore
use the security mechanisms provided by the J2EE specs. i.e. you define the
realm and roles to use in the web.xml and jboss-web.xml
JAAS and the servlet container do the rest. The security context is
automatically
What you want does not scale. You need to pool DB connections. This contradicts
a per-user authentication with the DB. You can however write a JAAS login
module that authenticates against the users of a DB. But in the backend you
must use one single (technical) DB user for your application (DS)
Use a Tomcat Valve
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907239#3907239
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907239
---
This SF.Net email is sponsored
Read this http://www.odi.ch/weblog/posting.php?posting=210.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907255#3907255
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3907255
Does MySQL 5 support transactions? You need this when you use the JMS resource
adapter and want your messages be sent on commit and forgotten on rollback.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3907085#3907085
Reply to the post :
I get the same warning. I am using container managed transactions in the bean
and @TransactionAttribute(TransactionAttributeType.REQUIRED) on the timeout
method.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3906543#3906543
Reply to the post :
I read the FAQ and most of the posts concerning redelivery. However I did not
see this case covered specifically.
The EJB3 core specs say in 5.4.17:
anonymous wrote : If a message-driven bean uses bean-managed transaction
demarcation and throws a RuntimeException, the container should not
like so:
| @NamedQueries({
| @NamedQuery(name=night.lessRecentThan, queryString=select n from
Night n where n.date = :date),
| @NamedQuery(name=night.moreRecentThan, queryString=select n from
Night n where n.date = :date)
| })
|
View the original post :
see here for what it takes to solve the problem:
http://www.odi.ch/weblog/posting.php?posting=210
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3904426#3904426
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3904426
I am using JBoss 4.0.3-RC2 + EJB3-RC2. There is no stopDelivery() method on the
MDB MBeans.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3896294#3896294
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3896294
83 matches
Mail list logo