Question: I have a single business interface that is implemented by multiple stateless beans.
Each implementation has a annotation at Class level with a unique value.
I use CDI injection as 

```
@Any Instance<MyInterface> implementations;

```

I want to look up a specific implemenattion based a value (which matches the annotation value).
Now since all implementations are EJBs I get an EJB proxy and unable to parse annotation. Please suggest a way to parse the annotation meta data from the proxy.

Also what are the other ways to get the EJB other than JNDI look up in above scenario?

Answer: 
This is the simplest example that I can think of. The key is

1. Parent is `display:flex`
2. Child has `flex-grow:1`
3. Parent MUST have `height` specified. If you specify `height:100%` on a parent div, then remember, the parent exists in a `<body>` and you'll see the body isn't 100% unless you add `height:100%` on the body too.

<http://jsfiddle.net/Ljbzsmvf/2/>

```css
div#parent {
  height: 300px;
  display: flex;
  flex-direction: column;
}

div#child {
  border: thin solid red;
  flex-grow: 1;
}
```

```html
<div id='parent'>
  Parent
  <div id='child'>
    Child
  </div>
</div>
```
Here is the **codepen demo** showing the solution:

* [Demo - Fill remaining vertical space with CSS using display:flex](https://codepen.io/mprinc/pen/JjGQvae)

Important highlights:

* all containers from `html`, `body`, ... `.container`, should have the **height set** to 100%
* **introducing `flex`** to ANY of the flex items will trigger calculation of the items sizes based on flex distribution:
	+ if only one cell is set to `flex`, for example: `flex: 1` then this flex item will **occupy the remaining of the space**
	+ if there are **more than one** with the `flex` property, the calculation will be more complicated. For example, if the item 1 is set to `flex: 1` and the item 2 is se to `flex: 2` then the item 2 will take twice more of the **remaining space**
		- **NOT TRUE**: the item 2 will be **twice larger** than the item 1
		- check more about the concept of the **remaining space**: <https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow>
* [Main Size Property](https://www.w3.org/TR/css-flexbox-1/#main-size-property)
	+ depends on the value of the `flex-direction` property
	+ in our case height is just a [**preferred** size](https://www.w3.org/TR/css-sizing-3/#preferred-size-properties)
	+ it will be overwritten in the presence of `flex` property: <https://www.w3.org/TR/css-flexbox-1/#propdef-flex>
		- When a box is a flex item, flex is consulted **instead of the [main size property](https://www.w3.org/TR/css-flexbox-1/#main-size-property)** to determine the main size of the box
	+ `min-*` and `max-*` will be respected