[jboss-user] [EJB3] - Bean Instance Pools

2012-12-04 Thread Andrig Miller
Andrig Miller [https://community.jboss.org/people/andy.miller] created the 
discussion

"Bean Instance Pools"

To view the discussion, visit: https://community.jboss.org/message/779995#779995

--
During the development meeting in Brno in November, I was told that the bean 
instance pools were specific to each bean.  For example, if you had two 
stateless session beans, let's just call them Bean A, and Bean B, you could 
define a strict max instance pool for each one.  For the life of me I don't see 
how you can actually do this with the current schema.

There is nothing in the schema to associate a bean, by name or any other 
attribute, to a pool.

Is there a way to do this?

How does this really work?  It appears that there is really just one pool, and 
everything shares it, even if there are multiple deployments.
--

Reply to this message by going to Community
[https://community.jboss.org/message/779995#779995]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB3] - Re: Where did the @Clustered Annotation Go?

2011-08-18 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller] created the 
discussion

"Re: Where did the @Clustered Annotation Go?"

To view the discussion, visit: http://community.jboss.org/message/621784#621784

--
Okay, thanks Carlo.  It was there before, and disappeared, hence the 
confusion.  I also though the clustering implementation was complete.  
Interesting...

Thanks again.
--

Reply to this message by going to Community
[http://community.jboss.org/message/621784#621784]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB3] - Where did the @Clustered Annotation Go?

2011-08-18 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller] created the 
discussion

"Where did the @Clustered Annotation Go?"

To view the discussion, visit: http://community.jboss.org/message/621770#621770

--
I have spend some time updating my IDE for AS 7.0.1, and was updating my 
Eclipse user defined library for AS 7 from pointing at the Beta 3 code, to the 
AS 7.0.1.Final code, and the @Clustered annotation which used to be in the 
org.jboss.ejb3.annotation package in the jar called 
jboss-ejb3-ext-api-1.1.0.jar is no longer there.

AS 7.0.1.Final contains the same jar, but with a different version 
(jboss-ejb3-ext-api-2.0.0.beta-1.jar), but it no longer contains this class.

Where did it go?

Thanks.
--

Reply to this message by going to Community
[http://community.jboss.org/message/621770#621770]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB3] - Re: Where is the TransactionTimeout annotation in AS 7?

2011-03-16 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller] created the 
discussion

"Re: Where is the TransactionTimeout annotation in AS 7?"

To view the discussion, visit: http://community.jboss.org/message/593602#593602

--
> Carlo de Wolf wrote:
> 
> All extension annotations are not yet implemented in AS 7 Beta 1. This 
> depends on how we make things configurable through the domain. Once that has 
> been decided we'll see which extension annotations still make sense.
Well, just let me say that the TransactionTimeout annotation is appropriate.  
Regardless of what you can configure, which you should be able to configure the 
transaction timeout for JBossTS, as you can do that today.  The problem with 
that, is that it will be for all transactions.  So, if you have a single 
method, as in my case, that needs longer, and you don't want a longer 
transaction timeout for everything, then you need this ability.  This is a 
common use case, at least from my perspective.  So, I would appreciate this 
being implemented, and I know lots of other users will too.
--

Reply to this message by going to Community
[http://community.jboss.org/message/593602#593602]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB3] - Where is the TransactionTimeout annotation in AS 7?

2011-03-16 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller] created the 
discussion

"Where is the TransactionTimeout annotation in AS 7?"

To view the discussion, visit: http://community.jboss.org/message/593587#593587

--
I'm porting an application up to AS 7 Beta 1, and I cannot seem to find the 
org.jboss.ejb3.annotation.TransactionTimeout annotation.  Has it been 
implemented?  If so, where is it, since I cannot find it in any of the jars I 
see that are related to EJB 3.
--

Reply to this message by going to Community
[http://community.jboss.org/message/593587#593587]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB3] - Question about EJB 3 Entity Caching

2011-03-01 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller] created the 
discussion

"Question about EJB 3 Entity Caching"

To view the discussion, visit: http://community.jboss.org/message/590462#590462

--
You used to be able to specify the entities you wanted to cache in the 
persistence.xml, but all the documentation has now been changed to use the 
@Cache annotation.

Is the persistence.xml file capability still there?  I cannot remember the 
syntax, since its not in the documentation anymore, but if you can still do 
this, I would like to know the syntax again.

Thanks.
--

Reply to this message by going to Community
[http://community.jboss.org/message/590462#590462]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - How can you turn of EJB 3 invocation statistics

2010-05-20 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"How can you turn of EJB 3 invocation statistics"

To view the discussion, visit: http://community.jboss.org/message/544086#544086

--
> Carlo de Wolf wrote:
> 
> First I want to see some measurements to know the extend of the problem and 
> to have a base of comparison.
Well, I did measurements.  I ran a test with 5 stateless session beans that did 
nothing but call each other and return.  I did this on a 8 core system with 
Hyperthreading (16 virtual cores), at 600 users with no think times.  Just 
hammer the server.

In that test, I could only measure an average of 1.33% difference between 
running with the statistics, and running with a patched server with all 
statistics completely removed from the container.

After going through the trouble to remove the statistics competely from the 
container, the results make sense to me know.  The reason I thought this might 
be an issue is a customer had e-mailed me saying he thought it was a 
bottleneck.  I need to get back to him, and see why he thinks that is true, and 
what he is seeing.  My tests simply don't back that up.  In the code, we are 
already using volatiles for all the counters, and a ConcurrentReaderHashMap to 
store the instances of the InvocationStatistics object (which makes complete 
sense in that you only create the instance once and store it once, and the rest 
of the time is spend getting from the HashMap).  The only synchronization, that 
seemed problematic, is in the "concurrent calls" code (callIn, callOut 
methods), but my test proves its not a real issue.

So, I'll turn my attention elsewhere.

--

Reply to this message by going to Community
[http://community.jboss.org/message/544086#544086]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - Possible Bug with EJB 3 Timers

2010-04-30 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"Possible Bug with EJB 3 Timers"

To view the discussion, visit: http://community.jboss.org/message/540574#540574

------
> Andrig Miller wrote:
> 
> > jaikiran pai wrote:
> > 
> > If it's EAP-5.0.0, then it should already have the fixes that I was talking 
> > about. Let me see why you are running into this issue.
> > 
> > By the way, if you have the application at hand, can you just give it a try 
> > by changing the interval to maybe 5 minutes and see if it works? Just as a 
> > quick test.
> So, I got around to do a quicker test.  I changed the code to have the timer 
> expire in five minutes, and I got the same results.  The timer just does not 
> expire.  What's funny, is when I started up, the old timer that was still in 
> the table, did expire.
> 
> So, as a simply test, after the new 5 minute timer didn't expire, I decided 
> to shut down the server and restart it, and see if it expired on startup like 
> the old timer, but it didn't.
> 
> I'm not sure what's going on, but this definitely doesn't work.
Well, more weirdness.  I all seems to be working just fine now.  I'm going to 
try to set it back to 24 hours, and see what happens.  I put a log statement in 
the method annotated with the @Timeout, and restarted everything, including 
recreating the timer through the application, and its working as excepted.  
?

--

Reply to this message by going to Community
[http://community.jboss.org/message/540574#540574]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - Possible Bug with EJB 3 Timers

2010-04-30 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"Possible Bug with EJB 3 Timers"

To view the discussion, visit: http://community.jboss.org/message/540563#540563

--
> jaikiran pai wrote:
> 
> If it's EAP-5.0.0, then it should already have the fixes that I was talking 
> about. Let me see why you are running into this issue.
> 
> By the way, if you have the application at hand, can you just give it a try 
> by changing the interval to maybe 5 minutes and see if it works? Just as a 
> quick test.
So, I got around to do a quicker test.  I changed the code to have the timer 
expire in five minutes, and I got the same results.  The timer just does not 
expire.  What's funny, is when I started up, the old timer that was still in 
the table, did expire.

So, as a simply test, after the new 5 minute timer didn't expire, I decided to 
shut down the server and restart it, and see if it expired on startup like the 
old timer, but it didn't.

I'm not sure what's going on, but this definitely doesn't work.

--

Reply to this message by going to Community
[http://community.jboss.org/message/540563#540563]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - Possible Bug with EJB 3 Timers

2010-04-30 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"Possible Bug with EJB 3 Timers"

To view the discussion, visit: http://community.jboss.org/message/540474#540474

--
> jaikiran pai wrote:
> 
> If it's EAP-5.0.0, then it should already have the fixes that I was talking 
> about. Let me see why you are running into this issue.
> 
> By the way, if you have the application at hand, can you just give it a try 
> by changing the interval to maybe 5 minutes and see if it works? Just as a 
> quick test.
I will definitely modify the application for a shorter duration, like 5 minutes 
and give it another try.  I'll let you know when I have that done.  I am going 
through e-mail right now, and once I'm done with that, I'll shift my attention 
to another test.

--

Reply to this message by going to Community
[http://community.jboss.org/message/540474#540474]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - Possible Bug with EJB 3 Timers

2010-04-30 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"Possible Bug with EJB 3 Timers"

To view the discussion, visit: http://community.jboss.org/message/540468#540468

--
It's actually on EAP 5.0.0, and I was going to try EAP 5.0.1.  I would assume 
the fixes for this problem made it into EAP 5.0.0?

--

Reply to this message by going to Community
[http://community.jboss.org/message/540468#540468]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Possible Bug with EJB 3 Timers

2010-04-29 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
created the discussion

"Possible Bug with EJB 3 Timers"

To view the discussion, visit: http://community.jboss.org/message/540195#540195

--
I have recently added an EJB 3 Timer to my application, and in testing it out, 
the timer never expired, and called the method in the stateless session bean 
that has the @Timeout annotation.

Here is the code:

package services.ejb;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.ejb.Timeout;
import javax.ejb.Timer;
import javax.ejb.TimerService;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import services.ejb.OrderManager;
import services.entities.Address;
import services.entities.Customer;
import services.entities.Order;
import services.entities.OrderLine;
import services.exceptions.CreateDataException;

@Stateless
public class OrderManagerBean implements OrderManager {

    @Resource
    TimerService timerService;
    
    @PersistenceContext (unitName="services")
    protected EntityManager entityManager;

...
public void createOrderPurgeTimer(boolean runWithTimer) throws 
CreateDataException {
    
    for (Object object : timerService.getTimers()) {
    Timer timer = (Timer) object;
    timer.cancel();
    }
    
    if (runWithTimer) {
    long twentyFourHours = 1000 * 60 * 60 * 24;
    timerService.createTimer(twentyFourHours, twentyFourHours, null);
    }
    
    return;
    
    }
    
    @Timeout
    public void purgeOldOrders(Timer timer) {
    
    // Delete the previous days worth of orders
    
    Query query = entityManager.createNativeQuery("delete from Order where 
orderDate < :date");
    
    Calendar now = Calendar.getInstance();
    
    // Back up to the top of the hour, so we only delete orders from the 
previous period'
    
    now.set(Calendar.MINUTE, 0);
    now.set(Calendar.SECOND, 0);
    
    query.setParameter("date", new Date(now.getTimeInMillis()));
    query.executeUpdate();
    
    return;
    
    }

}

In the above stateless session bean, I have a method to create the timer, and 
the one that is the callback when the timer should expire.  It creates a single 
timer that should expire every twenty four hours, so the initial expiration, 
and the interval are both set to 24 hours.  I have a servlet that calls the 
method to create the timer, along with other reference data needed for the 
application, and I can see the timer has been persisted in the database, and 
here is what it looks like:

TIMERID = 1272464496401, TARGETID = 
[target=jboss.j2ee:ear=OrderManagerApp.ear,jar=OrderManagerEJB.jar,name=OrderManagerBean,service=EJB3],
 INITIALDATE=2010-04-29 08:26:29, TIMERINTERVAL=8640, INSTANCEPK=NULL, 
INFO=NULL

So, I created the timer through the createOrderPurgeTimer method on the 
OrderManagerBean, and everything looks correct.  The INITIALDATE is 24 hours 
after I created it, and the TIMERINTERVAL is 24 hours in milliseconds, as I 
would expect.

So, I was expecting, after allowing the application to run all day and night, 
that at 8:26:49 this morning (the INITIALDATE) the timer would expire, and call 
the purgeOldOrders method on the OrderManagerBean.

I know this didn't happen, because there is no error created from the method 
(maybe it failed), and because in looking at the invocation statistics from the 
JMX Console I see the following:

InvocationStatistics concurrentCalls='0'
method name='createOrderPurgeTimer' count='1' minTime='78' maxTime='78' 
totalTime='78' 
method name='createOrder' count='15' minTime='0' maxTime='4' totalTime='18'

As you can see, the only two methods called on the bean are the 
createOrderPurgeTimer, and the createOrder (I didn't include that method in the 
above code snippet).  No call to the purgeOldOrders method at all, and its more 
than 2 hours after the INITIALDATE that is in the TIMER table.

I don't believe I have done anything wrong in the code. 

--

Reply to this message by going to Community
[http://community.jboss.org/message/540195#540195]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - How can you turn of EJB 3 invocation statistics

2010-04-28 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"How can you turn of EJB 3 invocation statistics"

To view the discussion, visit: http://community.jboss.org/message/540103#540103

--
> Carlo de Wolf wrote:
> 
> First I want to see some measurements to know the extend of the problem and 
> to have a base of comparison.
I agree.  In looking at the code, all the action is in ServiceContainer and 
InvocationStatistics.  I will do some timings on the baseline, and then remove 
the invokeStats object completely, so I can see a delta.  To get enough 
concurrency to make it reasonable, I might borrow a large maching in the RHTS, 
so we could measure with 100's or even a 1,000 concurrent threads.  So, I'll 
try to get some comprehensize measurements, so we can quantify the overhead.

--

Reply to this message by going to Community
[http://community.jboss.org/message/540103#540103]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - How can you turn of EJB 3 invocation statistics

2010-04-27 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"How can you turn of EJB 3 invocation statistics"

To view the discussion, visit: http://community.jboss.org/message/539786#539786

--
> Carlo de Wolf wrote:
> 
>  
> http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas?view=revision&revision=57901
>  
> http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas?view=revision&revision=57901
> 
> You can't. And since the InvocationStatistics is mostly synchronized methods 
> it forms a natural bottleneck in the flow.
Any plans to change this?  I could take a look at it, if not.

--

Reply to this message by going to Community
[http://community.jboss.org/message/539786#539786]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - How

2010-04-26 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
created the discussion

"How"

To view the discussion, visit: http://community.jboss.org/message/539644#539644

--
I was wondering how you can turn of EJB 3 invocation statistics (number of 
calls, min and max response times, etc., that show up in the MBean view).

It doesn't seem to be documented anywhere.

--

Reply to this message by going to Community
[http://community.jboss.org/message/539644#539644]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


Re: [jboss-user] [EJB 3.0] - Multiple Persistence Units with the same entities

2010-04-09 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
replied to the discussion

"Multiple Persistence Units with the same entities"

To view the discussion, visit: http://community.jboss.org/message/536638#536638

--
> jaikiran pai wrote:
> 
> > Andrig Miller wrote:
> > 
> > 
> > So, I created two persistence units in my persistence.xml, with two 
> > different sets of Hibernate properties, pointing at the same database, and 
> > let it default to scanning for the Entities in my jar.
> > 
> I missed this earlier. So effectively, you are sharing the same entities 
> between multiple entity managers. Do those entity managers really "share" 
> those entities in your application? For example, if you try to access an 
> entity which is shared (i.e. you access the entity using both the entity 
> managers) then you will end up running into issues because each of these 
> entity managers, that come from different entity manager factories, will 
> (possibly) hold a different state.
Well, I don't use the same entities from two different entity manager's at the 
same time, or within the same transaction.  One entity manager is used to do an 
initial data load of a bunch of reference data into the database, and the other 
entity manager is used for transaction processing against that data.  The two 
processes are independent, and the OLTP processing cannot occur until after the 
batch process has completed anyway.  So, there is no overlap, where the same 
entity would be used in two entity managers at the same time, and have 
different state.

Before even doing this, I thought through that, but is this something that is 
compliant with the spec.  All the reading I have done, only vaguely hint at 
having the same entities into two different persistence units, and everything I 
have read basically says that a persistence unit is tied to one data source 
(maybe implying that multiple persistence units should have "unique" data 
sources).

So, while it works now, and based on the functions involved, there is no 
overlap, will this continue to work in the future?  If its not supported by the 
spec, then I have a reasonable expectation that this might break in the future.

--

Reply to this message by going to Community
[http://community.jboss.org/message/536638#536638]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - Multiple Persistence Units with the same entities

2010-04-08 Thread Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] 
created the discussion

"Multiple Persistence Units with the same entities"

To view the discussion, visit: http://community.jboss.org/message/536414#536414

--
In developing some code, it dawned on me that I had some batch processing, and 
some OLTP process, and that I really wanted to configure them differently, from 
a JPA perspective.

So, I created two persistence units in my persistence.xml, with two different 
sets of Hibernate properties, pointing at the same database, and let it default 
to scanning for the Entities in my jar.

I also then updated my stateless session beans to have two entity managers 
injected one, referencing one persistent unit name, and the other referencing 
the other.

In the batch processing methods I use the entity manager that is configured for 
batch processing, and in the other methods I use the one configured for OLTP 
processing.

This is all working, but when I was reading various sources for whether this 
"should" work, it wasn't clear.

So, while it does work, what I am wondering, is this spec compliant, or is this 
just dumb, blind luck that it works?

--

Reply to this message by going to Community
[http://community.jboss.org/message/536414#536414]

Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Re: Configuring the EJB timer service"

2010-03-16 Thread Andrig Miller
User development,

A new message was posted in the thread "Configuring the EJB timer service":

http://community.jboss.org/message/532369#532369

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> > mailto:andy.mil...@jboss.com wrote:
> >  The issue that this brings up in my mind is that this seems to be global.  
> > You can only have one retry policy defined.  Am I right about that?
> Yes right now it's a global timer service level retry policy.
>  
> > mailto:andy.mil...@jboss.com wrote:
> > Is there a way to make it so some timers use one retry policy and others 
> > use another?
> I am not sure whether adding a retry policy per timer is appropriate. I'll 
> read the specs for some details around this and update this thread.
I'm not sure about the specification, and I know EJB timers are changing quite 
a bit in EJB 3.1 (finally), but its very impractical to think that all EJB 
timers should be treated the same.  However, it doesn't appear that there is a 
way to do anthing but a global policy.  So, if you have this situation, where 
you want to do something different with different timers, you will have to 
break up the application into multiple instances of the server, which may not 
be practical.  This is probably something to think about in the new EJB 3.1 
stuff, then the old EJB 3 (which is just the same EJB 2.x stuff anyway).

--

To reply to this message visit the message page: 
http://community.jboss.org/message/532369#532369


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Re: Configuring the EJB timer service"

2010-03-12 Thread Andrig Miller
User development,

A new message was posted in the thread "Configuring the EJB timer service":

http://community.jboss.org/message/531760#531760

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> A quick look at the code suggests that commenting out the retry policy is 
> going to cause errors. It expects RetryPolicy as mandatory. I don't see any 
> NoOpRetryPolicy available. So maybe the user application has to create a 
> NoOpRetryPolicy and configure the timer service to use this.
Well, I created a NoRetryPolicy class and MBean, patterned after the 
FixedDelayRetryPolicy, and it works as expected.  The issue that this brings up 
in my mind is that this seems to be global.  You can only have one retry policy 
defined.  Am I right about that?  Is there a way to make it so some timers use 
one retry policy and others use another?

--

To reply to this message visit the message page: 
http://community.jboss.org/message/531760#531760


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Re: Configuring the EJB timer service"

2010-03-05 Thread Andrig Miller
User development,

A new message was posted in the thread "Configuring the EJB timer service":

http://community.jboss.org/message/530225#530225

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> A quick look at the code suggests that commenting out the retry policy is 
> going to cause errors. It expects RetryPolicy as mandatory. I don't see any 
> NoOpRetryPolicy available. So maybe the user application has to create a 
> NoOpRetryPolicy and configure the timer service to use this.
I was starting to think that.  I'll probably implement a NoRetryPolicy and 
configure that, and test it out.  Thanks.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/530225#530225


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Configuring the EJB timer service"

2010-03-05 Thread Andrig Miller
User development,

A new message was posted in the thread "Configuring the EJB timer service":

http://community.jboss.org/message/530191#530191

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
If I don't want failed EJB 3 timers to retry, can I just comment out the 
RetryPolicy attribute in the xml file?
--

To reply to this message visit the message page: 
http://community.jboss.org/message/530191#530191


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Re: Bi-directional dependency between two stateless session beans"

2010-02-17 Thread Andrig Miller
User development,

A new message was posted in the thread "Bi-directional dependency between two 
stateless session beans":

http://community.jboss.org/message/526789#526789

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> wolfc wrote:
>  
> Note that a cyclic dependency with two stateless beans should deploy just 
> fine, because the real bean instance is only needed when the first invocation 
> goes through.
>  
> I'm scheduling in https://jira.jboss.org/jira/browse/EJBTHREE-1074 to address 
> this problem.
That's great.  The @IgnoreDependency did work for me in the mean time.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/526789#526789


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Re: Bi-directional dependency between two stateless session beans"

2010-02-13 Thread Andrig Miller
User development,

A new message was posted in the thread "Bi-directional dependency between two 
stateless session beans":

http://community.jboss.org/message/526202#526202

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> Cyclic injection of @EJB is a known problem with JBoss EJB3. You will have to 
> add a @IgnoreDependency on either one side of the injection to get past this. 
> Here's a thread which discusses the same issue 
> http://community.jboss.org/message/366797#366797
Thanks Jaikiran.  I'll make that change to the code.  As always, your help is 
greatly appreciated.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/526202#526202


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] New message: "Bi-directional dependency between two stateless session beans"

2010-02-13 Thread Andrig Miller
User development,

A new message was posted in the thread "Bi-directional dependency between two 
stateless session beans":

http://community.jboss.org/message/526199#526199

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
I was updating an application that has many stateless session beans, and in 
adding some functionality, I have the following situation:
 
@Stateless
public class SupplierManagerBean implements SupplierManager {
 
 @EJB
 private ProductManager productManager;
 
...
 
 
@Stateless
public class ProductManagerBean implements ProductManager {
 
    @EJB
    private SupplierManager supplierManager;
 
...
 
 
So, this compiles just fine, but will not deploy cleanly.  The profile service 
says it fails, and says to look at previous errors of which there are none.  
Then the in the summary of incomplete deployments you get an error about the 
state of the SupplierManagerBean, and that its missing a dependency on the 
ProductManagerBean, and of course the ProductManagerBean says its missing a 
dependency on the SupplierManagerBean.
 
So, its obvious that the deployer cannot handle this situation, but the 
question is should it be able to?  I cannot find information that says whether 
this is something that should be supported or not.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/526199#526199


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI and Naming] New message: "Re: Context Lookup vs. Injection"

2010-02-03 Thread Andrig Miller
User development,

A new message was posted in the thread "Context Lookup vs. Injection":

http://community.jboss.org/message/523929#523929

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> > mailto:andy.mil...@jboss.com wrote:
> >  
> > 
> > Is there a difference in @Resource in a stateless session bean and an 
> > entity?
> JPA entities don't support injection.
Well, that explains it.  I will have to do what you did, which is inject the 
resource into a stateless session bean, and then pass the generated key to the 
constructor instead.  Thanks.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/523929#523929


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI and Naming] New message: "Re: Context Lookup vs. Injection"

2010-02-03 Thread Andrig Miller
User development,

A new message was posted in the thread "Context Lookup vs. Injection":

http://community.jboss.org/message/523924#523924

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
Okay, so it works from a stateless session bean.  I am trying to use it in an 
entity for the primary key, which today looks like this:
 
@Id
@GeneratedValue(generator="system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid")
public String getOrderId () {
    
    return orderId;
    
}
 
These are the Hibernate specific annotation (non-JPA) that do what I want.  I 
tried to replace those by injecting the key generator factory and using it in 
the default constructor of the entity.
 
So, code that looks like this:
 
Entity
public class Order implements Serializable {
    
    /**
    * 
    */
    private static final long serialVersionUID = -5721274468042182248L;
    private String orderId;
    private long customerId;
    private Address shippingAddress;
    private BigDecimal totalOrderAmount;
    private List orderLines;
    private Customer customer;
 
*...@resource(mappedName="UUIDKeyGeneratorFactory")*
*   KeyGeneratorFactory keyGeneratorFactory;*
    
    public Order() {
 
    shippingAddress  = new Address();
    totalOrderAmount = new BigDecimal(0);
 
*orderId = (String) keyGeneratoryFactory.getKeyGenerator().generateKey();*
    
    }
    
    @Id
    public String getOrderId () {
    
    return orderId;
    
    }
 
Is there a difference in @Resource in a stateless session bean and an entity?

--

To reply to this message visit the message page: 
http://community.jboss.org/message/523924#523924


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI and Naming] New message: "Re: Context Lookup vs. Injection"

2010-01-28 Thread Andrig Miller
User development,

A new message was posted in the thread "Context Lookup vs. Injection":

http://community.jboss.org/message/522738#522738

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
> jaikiran wrote:
>  
> How about:
>  
> @Resource(mappedName="jndiNameOfUUIDKeyGeneratorFactory")
> 
I tried that, but it didn't work.  Just get a NullPointerException when I try 
to reference the factory.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/522738#522738


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI and Naming] New message: "Context Lookup vs. Injection"

2010-01-27 Thread Andrig Miller
User development,

A new message was posted in the thread "Context Lookup vs. Injection":

http://community.jboss.org/message/522654#522654

Author  : Andrig Miller
Profile : http://community.jboss.org/people/andy.mil...@jboss.com

Message:
--
I was playing around with the UUIDKeyGeneratorFactory in an EJB 3 application, 
to generate a primary key.  Hibernate actually supports its own annotations for 
this (non-JPA standard), but I was wondering about using the 
KeyGeneratorFactory directly as an alternative.  I can definitely just create 
an IntialContext, and lookup "UUIDKeyGeneratorFactory", and that works as 
expected, and that's been in the application server since 3.2.x.
 
Is there a way to use EJB 3 @Resource annotation to inject the 
UUIDKeyGeneratorFactory.  I tried it in the code, but it didn't work, but maybe 
I missed something, or maybe the @Resource annotation isn't generalized to 
lookup anything in JNDI.
 
Anyway, if someone could shed some light on the subject that would be helpful.
 
Thanks.

--

To reply to this message visit the message page: 
http://community.jboss.org/message/522654#522654


___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user